var language;
$(document).ready(function(){
	language	= $("#language").val();
	var altoPie	= $("#pie").height();
	$(".box-pie").height(altoPie - 40);
	
	$(".menu-vertical-item").click(function(){
		location.href = $(this).find("a").attr("href");
	});
	
	$(".menu-vertical-item").hover(
		function(){
			$(this).addClass("menu-vertical-item-hover");
		},
		function(){
			$(this).removeClass("menu-vertical-item-hover");
		}
	);
	
	$("#reloadCaptcha").click(function(){
		var url	= "class/captcha/securimage_show.php?sid=" + Math.random();
		$("#imgCaptcha").attr("src", url);
	});
	
	anchor.init();
});

anchor = {
	init : function() {
		$("a.anchorLink").click(function () {
			elementClick = $(this).attr("href")
			destination = $(elementClick).offset().top;
			$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination}, 800);
			return false;
		});
	}
}



Cufon.replace(".item-level-1 span, .menu-top-level-2 span", { fontFamily: "squart" , hover : true});
//Cufon.now();





var monotype = { src: 'flash/monotype.swf' };
sIFR.activate(monotype);
sIFR.activate();
//	sIFR.replace({ src: 'flash/monotype.swf', 
//				   selector: '.item-level-1 span', 
//				   css: '.sIFR-root {color: #B3AAA3; font-size: 13px;}, a{color: #a1aba3;text-decoration:none;}, a:hover{color: #006C90;}',
//				   forceSingleLine  : true,
//				   tuneHeight : -4,
//				   fixFocus: 'true'
//				});
//	
//	sIFR.replace({ src: 'flash/monotype.swf', 
//				   selector: '.item-level-222 span', 
//				   css: '.sIFR-root {color: #B3AAA3; font-size: 11px;}, a{color: #FFFFFF;text-decoration:none;}, a:hover{color: #006C90;}',
//				   forceSingleLine  : true,
//				   wmode : 'transparent',
//				   tuneHeight : -4,
//				   fixFocus: 'true',
//				   onReplacement : function(){
//						$(".menu-top-level-1 .menu-top-level-2").css("display", "none");
//				   }
//				});
	
sIFR.replace({ src: 'flash/monotype.swf', 
			   selector: '.cajaDerTitulo span', 
			   css: '.sIFR-root {color: #00799F; font-size: 18px;}, a{color: #FFFFFF;text-decoration:none;}, a:hover{color: #FFFFFF;}',
			   forceSingleLine  : true, 
			   wmode : 'transparent',
			   tuneHeight : -4
			 });
sIFR.replace({ src: 'flash/monotype.swf', 
			   selector: '.menu-vertical-item-parent', 
			   css: '.sIFR-root {color: #00799F; font-size: 18px;cursor:pointer;}, a{color: #00799F;text-decoration:none;}, a:hover{color: #00799F;}',
			   forceSingleLine  : true, 
			   wmode : 'transparent',
			   tuneHeight : -4,
			   filters: {DropShadow: {knockout: false, distance: 0, color: '#A8B0A8', strength: 0}}
			 });
sIFR.replace({ src: 'flash/monotype.swf', 
			   selector: '.menu-vertical-item-child', 
			   css: '.sIFR-root {color: #FFFFFF; font-size: 13px;cursor:pointer;}, a{color: #FFFFFF;text-decoration:none;}, a:hover{color: #FFFFFF;}',
			   forceSingleLine  : false, 
			   wmode : 'transparent',
			   tuneHeight : -4,
			   filters: {DropShadow: {knockout: false, distance: 0, color: '#808C80', strength: 0}}
			 });

sIFR.replace({ src: 'flash/monotype.swf', selector: '.title-content0', css: '.sIFR-root {color: #006C90; font-size: 18px;}',forceSingleLine  : true, wmode : 'transparent'});
sIFR.replace({ src: 'flash/monotype.swf', selector: '.title-content1', css: '.sIFR-root {color: #B3AAA3; font-size: 18px;}',forceSingleLine  : true, wmode : 'transparent'});
sIFR.replace({ src: 'flash/monotype.swf', selector: '.title-content-separator', css: '.sIFR-root {color: #006C90; font-size: 15px;}',forceSingleLine  : true, wmode : 'transparent'});
sIFR.replace({ src: 'flash/monotype.swf', 
			   selector: '.title-content-foot', 
			   css: '.sIFR-root {color: #FFFFFF; font-size: 15px;font-weight: normal;}',
			   forceSingleLine  : true, 
			   wmode : 'transparent',
			   tuneHeight : -4,
			   filters: {DropShadow: {knockout: false, distance: 0, color: '#808C80', strength: 0}}
			});




