$(function(){

	//Preload Images
	$(window).bind('load', function() {
		var preload = new Array();
		$(".hover").each(function() {
			s = $(this).attr("src").replace(/\.(...)$/, "_on.$1");
			//alert(s);
			preload.push(s)
		});
		var img = document.createElement('img');
		$(img).bind('load', function() {
			if(preload[0]) {
				this.src = preload.shift();
			}
		}).trigger('load');
	});

	//Rollover Images
	$(".hover").hover(function(){
		if($(this).is("img")){
			
					
			//var temp = $(this).attr("src").split(".");
			//$(this).attr("src", temp[0]+"_on."+temp[1]);
			
			s = $(this).attr("src").replace(/\.(...)$/, "_on.$1");
			$(this).attr("src", s);
		}
	},function(){
		if($(this).is("img")){
		  $(this).attr("src", $(this).attr("src").replace("_on", ""));
		}
	});

	$('img[@src$=.png]').ifixpng();

});
