$(document).ready(function(){

	//video transition
	$("#video-play").hover(function(){
		$("#video-play .video-bg").stop(true, false).animate({'opacity': '0.5'}, 300);
		$("#video-play .video-trans").stop(true, false).animate({'top': '50px'});
	},
	function(){
		$("#video-play .video-bg").stop(true, false).animate({'opacity': '1'}, 300);
		$("#video-play .video-trans").stop(true, false).animate({'top': '-40px'});
	});

	//image mouseovers
	$("img.mo").hover(function(){
		extension = this.src.substr(this.src.lastIndexOf('.'));
		this.src = this.src.replace(extension,"-mo"+extension);
	},
	function(){
		this.src = this.src.replace("-mo"+extension,extension);
	});
	
	$("#search-text").click(function(){
		if($(this).css("color") == "rgb(128, 128, 128)"){
			$(this).val("");
			$(this).css({"color": "black"});
		}
	});
	
	$("#search-text").focusout(function(){
		if($(this).val() == ""){
			$(this).css({"color": "grey"});
			$(this).val("Search this site");
		}
	});
	
	$("#slider img").hover(function(){
		extension = this.src.substr(this.src.lastIndexOf('.'));
		this.src = this.src.replace("-blue"+extension,"-orange"+extension);
	},
	function(){
		this.src = this.src.replace("-orange"+extension,"-blue"+extension);
	});
	
	//coloured button moseovers
	$(".bt-read-more-mo").hover(function(){
		$(this).addClass("orange");
		$(this).removeClass("blue");
	},
	function(){
		$(this).addClass("blue");
		$(this).removeClass("orange");
	});
});
