/* Menu principal */
function mainmenu(){
	$(" #nav ul ").css({display: "none"}); //opera

	$(" #nav li").hover(function(){
		$(this).css('background',"#617847");
		$(this).find('ul:first').css({visibility: "visible",display: "none"}).slideDown(150);
	},function(){
		$(this).css('background','');
		$(this).find('ul:first').css({visibility: "hidden"});
	});
}

function viewElement(nom) {
	veureElement(nom);
	return true;
}
function veureElement(nom) {
		$("#"+nom).slideToggle();

	}


$(document).ready(function(){
	mainmenu();

	/* L'inombrable sense FLIR,  que no es veu bé */
	ieVer='';
	if(/MSIE 6.0/i.test(navigator.userAgent)) {ieVer=6;}
	if (ieVer!=6) {

		FLIR.init({path:'http://en.canjou.com/horsetrails/'});
		$("a.pare").each( function() { FLIR.replace(this, new FLIRStyle({ cFont:'conduit' , mode:'wrap',cSize:15 })) } );
		$("h1").each( function() { FLIR.replace(this, new FLIRStyle({ cFont:'conduit-bold' , mode:'wrap',cSize:24 })) } );
		$(".h1").each( function() { FLIR.replace(this, new FLIRStyle({ cFont:'conduit' , mode:'wrap',cSize:35 })) } );
		$("#capcal h2").each( function() { FLIR.replace(this, new FLIRStyle({ cFont:'conduit' , mode:'wrap',cSize:30 })) } );
		$("h3").each( function() { FLIR.replace(this, new FLIRStyle({ cFont:'conduit' , mode:'wrap',cSize:18 })) } );

		$("h2").each( function() { FLIR.replace(this, new FLIRStyle({ cFont:'conduit' , mode:'wrap',cSize:25 })) } );
		$("p.galeria").each( function() { FLIR.replace(this, new FLIRStyle({ cFont:'conduit' ,cSize:25 })) } );
		$("h5 span").each( function() { FLIR.replace(this, new FLIRStyle({ cFont:'conduit' , mode:'wrap',cSize:16 })) } );
		$("h4").each( function() { FLIR.replace(this, new FLIRStyle({ cFont:'conduit' , mode:'wrap',cSize:18 })) } );
		//$("h4 a").each( function() { FLIR.replace(this, new FLIRStyle({ cFont:'conduit' , mode:'wrap',cSize:18 })) } );
		$("h6").each( function() { FLIR.replace(this, new FLIRStyle({ cFont:'conduit' , mode:'wrap',cSize:16 })) } );

		$(".infodia .dia").each( function() { FLIR.replace(this, new FLIRStyle({ cFont:'conduit' , mode:'wrap',cSize:27 })) } );
		$(".infodia .text").each( function() { FLIR.replace(this, new FLIRStyle({ cFont:'conduit' , mode:'wrap',cSize:18 })) } );

	}

});



