$(function(){
	/*Validate
	$(".validate").each(function(){
		$(this).validate({errorElement: 'span'});
	});*/

	// rollover menu
	$("#menu li a img").not(".selected").hover(
		function(){$(this).attr("src", $(this).attr("src").replace(".gif", "_on.gif"));},
		function(){$(this).attr("src", $(this).attr("src").replace("_on", ""));}
	).each(function(){
		var _loader = new Image();
		$(_loader).attr("src", $(this).attr("src").replace(".gif", "_on.gif"));
	});
	
	// rollover geral
	$(".hover").hover(
		function(){$(this).attr("src", $(this).attr("src").replace(".gif", "_on.gif"));},
		function(){$(this).attr("src", $(this).attr("src").replace("_on", ""));}
	).each(function(){
		var _loader = new Image();
		$(_loader).attr("src", $(this).attr("src").replace(".gif", "_on.gif"));
	});
	// Scroll
	if ($("#media_content").height() < $("#content_scroll").height()){
		$("#scrollArea").hide();
	}
		 	
	//png
	$('img[@src$=.png]').ifixpng();
	
	//flash homepage 
	$("#flashHome").flash(
		{
			src: webroot + "swf/flash_home_casablanca.swf",
			wmode: "transparent",
			width: "100%",
			height: 845
		},
		{
			version: 8,
			expressInstall: true
		}
	);
	$("body").rightClick( function(el) {
        alert("Images protected.");
    });

	$('.lightbox').lightBox({fixedNavigation:true});
});