$(document).ready(function(){

	//General function for rollover images
	$(".rollover").hover(
		function(){
			if($(this).attr("src").indexOf("_over") == -1) {
				var newSrc = $(this).attr("src").replace(".gif","_over.gif#hover");
				$(this).attr("src",newSrc);
			}
		},
		function(){
			if($(this).attr("src").indexOf("_over.gif#hover") != -1) {
				var oldSrc = $(this).attr("src").replace("_over.gif#hover",".gif");
				$(this).attr("src",oldSrc);
			}
		}
	);

	$('.new').attr("target","_blank");
	
	$(".text").focus(function(){
		var strValue = $(this).attr("value");
		if(strValue = "Site search"){
			$(this).attr({value: ""});
		}
	});
	$(".text").blur(function(){
		var strValue = $(".text").attr("value");
		if(strValue == ""){
			$(".text").attr({value: "Site search"});
		}
	});
	
	$(".flyer").hover(
		function () {
			$("a",this).css("color","#999");
		}, 
		function () {
			$("a",this).css("color","#0070a1");
		}
	);

	$('pre code').each(function() {
		eval($(this).text());
	});

});
