//JQuery document enhancement
$(document).ready(function(){

	function resizeSearch() { //Resize search input
		win=$(window);
		w=win.width();
		width=w-810;
		$("#keyword").css("width",width);
	}

	window.onresize = function() {
		resizeSearch();
	}


	$(".rollover").hover( //Image rollovers
		function(){
			if($(this).attr("src").indexOf("-over")==-1) {
				var newSrc = $(this).attr("src").replace(".gif","_d.gif");
				newSrc = newSrc.replace(".png","_d.png");
				$(this).attr("src",newSrc);
			}
		},
		function(){
			if($(this).attr("src").indexOf("_d")!=-1) {
				var oldSrc = $(this).attr("src").replace("_d.gif",".gif");
				oldSrc = oldSrc.replace("_d.png",".png");
				$(this).attr("src",oldSrc);
			}
		}
	);
	
	resizeSearch();

});