<!--
function menu(a){
	subMenuSobre = a;
	elegida = a;
	if(subMenuSobreOld!=subMenuSobre){
			  $(".subMenu_"+subMenuSobreOld).animate({ 
			top: -33
		  }, 500);
	}
	 $(".menu a:eq("+subMenuSobre+")").css({'background':'url(images/bg_menu_on.jpg) no-repeat'});
	  $(".subMenu_"+subMenuSobre).animate({ 
			top: 0
		  }, 500);
}
function subMenu(a){
	menuSelected = a;
	marcada = $(".subMenu_"+elegida+" a:eq("+menuSelected+")");
	var ancho =   $(".subMenu_"+subMenuSobre+" a:eq("+a+")").width();
		  var laY =  $(".subMenu_"+subMenuSobre+" a:eq("+a+")").position().left;
		  var padre =  $(".subMenu_"+subMenuSobre).position().left;
		  $(".subMenu_"+subMenuSobre+" a:eq("+a+")").css({'color':'#333'});
		 //alert(padre);
		$(".fondo").animate({ 
			left: (laY-7)+padre
		  }, 500);
		$(".fondo_2").animate({ 
				width: ancho
			  }, 500 );
		$(".fondo_1").animate({ 
				width: 7
			  }, 500 );
		$(".fondo_3").animate({ 
				width: 7
			  }, 500 );
}
	var marcada;
var elegida;
var menuSelected;
var subMenuSobre;
var subMenuSobreOld;
$(document).ready(function(){
  $.preloadCssImages();
 
  $("a[rel^='prettyPopin']").prettyPopin({
		modal : false, /* true/false */
		width : false, /* false/integer */
		height: false, /* false/integer */
		opacity: 0.7, /* value from 0 to 1 */
		animationSpeed: 'fast', /* slow/medium/fast/integer */
		followScroll: true, /* true/false */
		loader_path: 'images/prettyPopin/loader.gif', /* path to your loading image */
		callback: function(){} /* callback called when closing the popin */
	});
  $("a[rel^='prettyPopin2']").prettyPopin({
		modal : false, /* true/false */
		width : 595 ,/* false/integer */
		height: 429, /* false/integer */
		opacity: 0.7, /* value from 0 to 1 */
		animationSpeed: 'fast', /* slow/medium/fast/integer */
		followScroll: true, /* true/false */
		loader_path: 'images/prettyPopin/loader.gif', /* path to your loading image */
		callback: function(){} /* callback called when closing the popin */
	});
  $(".sliderInt").jCarouselLite({
		auto: 1000,
		speed: 3000
 	});
  
  $("a.scroll").click(function (){
		var orden =$("a.scroll").index(this);	
		$('.izda2').css({ 'overflow-y':'hidden','padding':'0 48px 0 0','width':'544px'});
		$('#scroll').stop().scrollTo( '#seccion_'+orden, 600, {			
			onAfter:function(){
				$('.izda2').css({'overflow-y':'auto','padding':'0 30px 0 0','width':'562px'});
			}
		});														  
																			  
			
			
		
		
   });
 //$('#scroll').stop().scrollTo( '#seccion_1', 800 );;
/* droplinemenu.buildmenu("mydroplinemenu");*/
$('.images_1  .laC1').bt({
  fill: '#fff',
  cssStyles: {color: '#333', fontWeight: 'bold'},
  shrinkToFit: true,
  padding: 10,
  cornerRadius: 10,
  spikeLength: 15,
  spikeGirth: 5,
  positions: ['right','left',  'bottom']
});
$('.images_1  .laC2').bt({
  fill: '#fff',
  cssStyles: {color: '#333', fontWeight: 'bold'},
  shrinkToFit: true,
  padding: 10,
  cornerRadius: 10,
  spikeLength: 15,
  spikeGirth: 5,
  positions: ['left',  'right','bottom']
});
/* $(".menu a").click(function (){
		subMenuSobreOld = subMenuSobre;
		  subMenuSobre =$(".menu a").index(this);
		  if(subMenuSobreOld!=subMenuSobre){
			  $(".subMenu_"+subMenuSobreOld).animate({ 
			top: -33
		  }, 100);
         $(".fondo").animate({ 
			left: 0
		  }, 100);
		 $(".fondo_2").animate({ 
				width: 0
			  }, 100 );
		 $(".fondo_1").animate({ 
				width: 0
			  }, 100 );
		$(".fondo_3").animate({ 
				width: 0
			  }, 100 );
			  $(".menu a:eq("+subMenuSobreOld+")").css({'background':'none'});
			  $(".subMenu_"+subMenuSobreOld).animate({ 
				top: -33
			  }, 100);
		  }
		   $(".menu a:eq("+subMenuSobre+")").css({'background':'url(images/bg_menu_on.jpg) no-repeat'});
        $(".subMenu_"+subMenuSobre).animate({ 
			top: 0
		  }, 100);
      }
    );
*/

 
 $(".subMenu h3 a").hover(
      function () {
		  var ancho = $(this).width();
		  var laY =  $(this).position().left;
		  var padre =  $(this).parent().parent().parent().parent().position().left;
		  $(this).css({'color':'#333'});
		 //alert(padre);
		$(".fondo").animate({ 
			left: (laY-7)+padre
		  }, 100);
		$(".fondo_2").animate({ 
				width: ancho
			  }, 100 );
		$(".fondo_1").animate({ 
				width: 7
			  }, 100 );
		$(".fondo_3").animate({ 
				width: 7
			  }, 100 );

      }, 
      function () {
		  //alert(marcada.attr()"id");
		  if($(this).attr('id')!=marcada.attr('id')){
       		 $(this).css({'color':'#999'});
		  }
      }
    );

	 $(".subMenu  ul").hover(
      function () {
        
      }, 
      function () {
		  
		 
		/*$(".menu a:eq("+subMenuSobre+")").css({'background':'none'});
		 $(".subMenu_"+subMenuSobre).animate({ 
			top: -33
		  }, 500);*/
         
		 /*if(menuSelected!=undefined){
			  menu(elegida);
			subMenu(menuSelected);
	  	}
		else{
			$(".fondo").animate({ 
			left: 0
		  }, 500);
		 $(".fondo_2").animate({ 
				width: 0
			  }, 500 );
		 $(".fondo_1").animate({ 
				width: 0
			  }, 500 );
		$(".fondo_3").animate({ 
				width: 0
			  }, 500 );*/
		//}
      }
	  
    );


 
}); 
function abrir(a,e,b,c,d){
	if(document.all){var ventanaW=document.body.clientWidth;}
	else{var ventanaW=window.innerWidth}
	if(document.all){var ventanaH=document.body.clientHeight+150;}
	else{var ventanaH=window.innerHeight}
	var w = ventanaW/2;
	w = w-(b/2);
	var h = ventanaH/2;
	h = h-(c/2);
	window.open(a, e, 'width='+b+', height='+c+', top='+h+',left='+w+', scrollbars='+d+', location=0');
}


//-->