var $j= jQuery;

// Categories Menu
  $j(function() {
    $j('#nav').droppy();
  });
  
//----------------------------//


// The Tabber
$j(document).ready(function() {
//When page loads...
$j(".tab_content").hide(); //Hide all content
$j("ul.tabs li:first").addClass("active").show(); //Activate first tab
$j(".tab_content:first").show(); //Show first tab content
//On Click Event
$j("ul.tabs li").click(function() {
$j("ul.tabs li").removeClass("active"); //Remove any "active" class
$j(this).addClass("active"); //Add "active" class to selected tab
$j(".tab_content").hide(); //Hide all tab content
var activeTab = $j(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
$j(activeTab).fadeIn(); //Fade in the active ID content
return false;
});
});

//------------------------------//

//Page Menu

$j(document).ready(function() {
$j("#topnav li").prepend("<span></span>"); 
$j("#topnav li").each(function() { 
var linkText = $j(this).find("a").html(); 
$j(this).find("span").show().html(linkText); 
}); 
$j("#topnav li").hover(function() {	
$j(this).find("span").stop().animate({
marginTop: "-40" 
}, 250);
} , function() { 
$j(this).find("span").stop().animate({
marginTop: "0"  
}, 250);
});
});

//---------------------------------//

// The Slider
$j(document).ready(function(){	
$j("#slider").easySlider({
		auto: true,
		continuous: true,
		speed: 2000,
		pause: 5000,
		prevId: 'prevBtn',
		nextId: 'nextBtn'
	});
});	

//-----------------------------//

// Back to top

$j(document).ready(function() {
$j('a[href=#top]').click(function(){
$j('html, body').animate({scrollTop: '0px'}, 3000);
return false;
});
});
//------------------------------//

