// JavaScript Document
// to avoid jquery conflicts catch the prototype 1.6.2
var _$=jQuery;

function menuInt(_$){
	
_$(".menuBtn ").mouseenter(function(){

	

	if(_$(this).hasClass("hasSubmenu")){

	_$(_$(this).children()[1]).fadeIn("slow")

	}else{$(".subMenu").fadeOut("slow")}

	

}).mouseleave(function(){

_$(".subMenu").fadeOut("slow",0)

})
	
}

$(document).ready(function(){
	
	if(  String($("#descripcionNotica > p ").html()).indexOf("[embed]") != -1){
		var stringEmbed=String($("#descripcionNotica >p ").html());
		
		var urlEmbed=stringEmbed.substring(stringEmbed.indexOf("[embed]") +7,stringEmbed.indexOf("[:embed]"));
		
		$("#descripcionNotica > p ").html("").html('<div id="alfaPlayer"></div>');
		
		var params = { allowScriptAccess: "always",wmode:"opaque" };
		  // The element id of the Flash embed
		 var atts = { id: "alfaPlayer"};
		  // All of the magic handled by SWFObject (http://code.google.com/p/swfobject/)
		 swfobject.embedSWF("http://www.youtube.com/v/" + urlEmbed + 
							 "?version=3&enablejsapi=1&playerapiid=player1", 
							 "alfaPlayer", "480", "295", "9", null, null, params, atts);
			
			
		//$(".infoWidth").css("height","400px")
		
		
	}
	

try{
	menuInt($);
}catch(e){
	menuInt(_$);
}

<!-- end menu interact -->
try{
/*$("#productsMenu p.menu_head").click(function(){
				$("p.menu_head").removeClass("activeMenuProd")
				$(this).addClass("activeMenuProd").next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
				$(this).siblings()
});*/
$("#thumbHolder img").mouseenter(function(){ $(this).stop(true,false).fadeTo("slow",1)});
$("#thumbHolder img").mouseleave(function(){ $(this).stop(true,false).fadeTo("slow",.6)});
$("#thumbHolder img").click(function(){ 

	var img=$($(this).parent()).attr("href");
	
	$("#zoom1").attr("src",img )
	$("#zoom1").html('<img width="326" height="218" style="display: block;" src="'+img+'" >')

})

}catch(e){
	
}

try{

$('#slider').css("visibility","visible").cycle(

{ 

   fx: 'uncover' ,

   direction: 'right',

	 speed: 1000, 

	 timeout: 10000,

	 pager:"#menuSliderHolder",

	 pagerAnchorBuilder: function(idx, slide) { 

	 return '<div class="textCenter sliderBtn " >'+slide.alt+'<img src="images/separadorSlider.png"  width="1" height="27"/></div>'

       

    } 

});





}catch(e){}

})


