var d= 80;


$(document).ready(function(){
$("#top_menu").find("li").hover(
function(){$(this).removeClass("dw");$(this).addClass("up");var h= this;setTimeout(function(){m(h,'up')},d);}
,function(){$(this).removeClass("up");$(this).addClass("dw");var h= this;setTimeout(function(){m(h,'dw')},500);});
});

var m= function menu(obj,dir){
if(!$(obj).hasClass("up")&&!$(obj).hasClass("dw"))return;
if($(obj).hasClass("dw")){
if($(obj).hasClass("menu1")){$(obj).removeClass("menu1");$(obj).addClass("menu0");}
else if($(obj).hasClass("menu2")){$(obj).removeClass("menu2");$(obj).addClass("menu1");setTimeout(function(){m(obj,'dw')},d);}
else if($(obj).hasClass("menu3")){$(obj).removeClass("menu3");$(obj).addClass("menu2");setTimeout(function(){m(obj,'dw')},d);}}
else{
if($(obj).hasClass("menu0")){$(obj).removeClass("menu0");$(obj).addClass("menu1");setTimeout(function(){m(obj,'up')},d);}
else if($(obj).hasClass("menu1")){$(obj).removeClass("menu1");$(obj).addClass("menu2");setTimeout(function(){m(obj,'up')},d);}
else if($(obj).hasClass("menu2")){$(obj).removeClass("menu2");$(obj).addClass("menu3");}}}



function formatText(index, panel) {
		  return "";
	    }
  
$(document).ready(function(){  

		

		
		
        
            $('#anythingSlider').anythingSlider({
                easing: "easeInOutBack",        // Anything other than "linear" or "swing" requires the easing plugin easeInBack
                autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
                delay: 6500,                    // How long between slide transitions in AutoPlay mode
                startStopped: false,            // If autoPlay is on, this can force it to start stopped
                animationTime: 1500,             // How long the slide transition takes
                hashTags: false,                 // Should links change the hashtag in the URL?
                buildNavigation: false,          // If true, builds and list of anchor links to link to each slide
        		pauseOnHover: false,             // If true, and autoPlay is enabled, the show will pause on hover
        		startText: "Go",             // Start text
		        stopText: "Stop",               // Stop text
		        navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)
            });
            
            $("#slide-jump").click(function(){
                $('.anythingSlider').anythingSlider(6);
            });
            
        });
		
		
		
		
		

$(document).ready(function(){
$(".change_back").hover(
      function () {
		$(this).stop();
		$(this).css('opacity',1.00);
		$(document).find("#photo div").css('background-image','none');
		$(this).fadeOut(d2,function(){$(document).find("#photo div").css('background-image','url('+dir+'/media/loading.gif)');});
      }, 
      function () {
	  }
    );
});
$(document).ready(function(){
$(".change").hover(
      function () {
	  }, 
      function () {
		$(this).stop();
		$(this).parent("div").find(".change_back").css('opacity',1.00);
		$(document).find("#photo div").css('background-image','none');
		$(this).parent("div").find(".change_back").fadeIn(d2,function(){$(document).find("#photo div").css('background-image','url('+dir+'/media/loading.gif)');}); 
      }
    );

});		
		
		
		
