
$(document).ready(function (){

$("a.clinicas").fancybox();
/*
$.fancybox(
		'<a href="http://pegaso.com/club/?p=227"><img src="nimages/flyer_curso_defensivo_ok.jpg" border="0"  /></a>',
		{
        		'autoDimensions'	: false,
			'width'         		: 'auto',
			'height'        		: 'auto',
			'transitionIn'		: 'none',
			'transitionOut'		: 'none'
		}
	);*/


$('div.jimgMenu ul li a').hover(function() {
    
    // if the element is currently being animated (to a easeOut)...
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "550px"}, {duration: 450, easing:"easeOutQuad"});
    } else {
      // ease in quickly
      $(this).stop().animate({width: "550px"}, {duration: 400, easing:"easeOutQuad"});
    }
  }, function () {
    // on hovering out, ease the element out
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "200px"}, {duration: 400, easing:"easeInOutQuad"})
    } else {
      // ease out slowly
      $(this).stop('animated:').animate({width: "200px"}, {duration: 450, easing:"easeInOutQuad"});
     $("#finslider").stop('animated:').animate({width: "550px"}, {duration: 450, easing:"easeInOutQuad"});
    }
  });


$("#divisiones a img, #divisiones a div.titulodivision ").hover(
		function(){
			var noefecto2=$(this).parents('a').children('img');
			$("#divisiones a img").not(noefecto2).stop().fadeTo("fast",.2);
		},
		function(){
			$("#divisiones a img").stop().fadeTo("fast",1);
		}
);
	$('#pane3').jScrollPane({scrollbarWidth:20, scrollbarMargin:10});
	
	$("#idioma").toggle(primer,segundo);
	
	/*$('#pane3').jScrollPane({showArrows:true,scrollbarWidth:10});*/
	
	
	
	
	
});




function primer()
{
	$("#espa").hide();
	$("#ingles").show();
	$(this).attr({src:'nimages/_r1_c1.png'});
	$(".dvidioma").attr({id:'videostexto3a'});
	
}
function segundo()
{
	$("#espa").show();
	$("#ingles").hide();
	$(this).attr({src:'nimages/Bandera_USA.png'});
	$(".dvidioma").attr({id:'videostexto3'});
	
}
