(function($) {
var ti = false;
	$(function() {
	   //$("#rhuman").jScrollPane();
        $("#demoo img[title]").tooltip();
		$("#scroller").simplyScroll({

			speed: 5

		});
        $("#demoo2 img[title]").tooltip();
		$("#scroller2").simplyScroll({

			speed: 5

		});
        $("#demoo3 img[title]").tooltip();
		$("#scroller3").simplyScroll({

			speed: 5

		});
        $("#demoo4 img[title]").tooltip();
		$("#scroller4").simplyScroll({

			speed: 5

		});
        $("#demoo5 img[title]").tooltip();
		$("#scroller5").simplyScroll({

			speed: 5

		});
	});
    
    $("#scroller").width("1300px");
    $("#scroller2").width("1300px");
    $("#scroller3").width("1300px");
    $("#scroller4").width("1300px");
    $("#scroller5").width("1300px");

})(jQuery);
$(document).ready(function(){
    var x = true;
    var x2 = false;
    var x3 = false;
    var x4 = false;
    
    $('.movi a').stop().animate({'opacity' : '0'}, 1);
    $("#scroller").width("2186px");
    $("#dmz").width("1px");
    $("#scroller2").width("992px");
    $("#dmz2").width("1px");
    $("#scroller3").width("992px");
    $("#dmz3").width("1px");    
    $("#scroller4").width("992px");
    $("#dmz4").width("1px");  
    $("#scroller5").width("992px");
    $("#dmz5").width("1px");  
   /*
  $('.movi a').hover(function(){  
     $(this).stop().animate({'opacity' : '0'}, 500);  
     }, function(){
          $(this).stop().animate({'opacity' : '1'}, 500);    
      }); 
  */ 
    $('.movi a').mouseover(function(){  
   $(this).stop().animate({'opacity' : '0'}, 500);  
   });
    $('.movi a').mouseout(function(){
        if(!x)
        $(this).stop().animate({'opacity' : '1'}, 500);    
    });
    
    $('.movi2 a').mouseover(function(){  
   $(this).stop().animate({'opacity' : '0'}, 500);  
   });
    $('.movi2 a').mouseout(function(){
        if(!x2)
        $(this).stop().animate({'opacity' : '1'}, 500);    
    });
    
    $('.movi3 a').mouseover(function(){  
   $(this).stop().animate({'opacity' : '0'}, 500);  
   });
    $('.movi3 a').mouseout(function(){
        if(!x3)
        $(this).stop().animate({'opacity' : '1'}, 500);    
    });
    
    $('.movi4 a').mouseover(function(){  
   $(this).stop().animate({'opacity' : '0'}, 500);  
   });
    $('.movi4 a').mouseout(function(){
        if(!x4)
        $(this).stop().animate({'opacity' : '1'}, 500);    
    });
    

    
    
    $("#DF").click(function(){
       $("#demoo").show();
       $("#demoo2").hide();
       $("#demoo3").hide();
       $("#demoo4").hide();
       $("#demoo5").hide();
       $("#mexlink").show();
       $("#sallink").hide();
       $("#monlink").hide();
       x=true;
       x2=false;
       x3=false;
       x4=false;
       $('.movi4 a').stop().animate({'opacity' : '1'}, 1);
       $('.movi3 a').stop().animate({'opacity' : '1'}, 1);
       $('.movi2 a').stop().animate({'opacity' : '1'}, 1);
       $(this).find('a').animate({'opacity' : '0'}, 500);
       
    });
    $("#Mx").click(function(){
       $("#demoo2").show();
       $("#demoo").hide();
       $("#demoo3").hide();
       $("#demoo4").hide();
       $("#demoo5").hide();
    });
    $("#mon").click(function(){
       $("#demoo3").show();
       $("#demoo").hide();
       $("#demoo2").hide();
       $("#demoo4").hide();
       $("#demoo5").hide();
       $("#monlink").show();
       $("#sallink").hide();
       $("#mexlink").hide();
       x=false;
       x2=false;
       x3=true;
       x4=false;
       $('.movi4 a').stop().animate({'opacity' : '1'}, 1);
       $('.movi a').stop().animate({'opacity' : '1'}, 1);
       $('.movi2 a').stop().animate({'opacity' : '1'}, 1);
       $(this).find('a').animate({'opacity' : '0'}, 500);
    });
    $("#pue").click(function(){
       $("#demoo4").show();
       $("#demoo").hide();
       $("#demoo2").hide();
       $("#demoo3").hide();
       $("#demoo5").hide();
       $("#sallink").show();
       $("#monlink").show();
       $("#mexlink").show();
       x=false;
       x2=false;
       x3=false;
       x4=true;
       $('.movi a').stop().animate({'opacity' : '1'}, 1);
       $('.movi3 a').stop().animate({'opacity' : '1'}, 1);
       $('.movi2 a').stop().animate({'opacity' : '1'}, 1);
       $(this).find('a').animate({'opacity' : '0'}, 500);
    });
    $("#sal").click(function(){
       $("#demoo5").show();
       $("#demoo").hide();
       $("#demoo2").hide();
       $("#demoo3").hide();
       $("#demoo4").hide();
       $("#sallink").show();
       $("#mexlink").hide();
       $("#monlink").hide();
       x=false;
       x2=true;
       x3=false;
       x4=false;
       $('.movi4 a').stop().animate({'opacity' : '1'}, 1);
       $('.movi3 a').stop().animate({'opacity' : '1'}, 1);
       $('.movi a').stop().animate({'opacity' : '1'}, 1);
       $(this).find('a').animate({'opacity' : '0'}, 500);
    });
});
