$(document).ready(function() {

	$("#slider").easySlider({
		auto: true,
		continuous: true,
		numeric: true
	});

	//Default Action
	$(".tab_contentHome").hide(); //Hide all content
	$("ul.tabsHome li:first").addClass("active").show(); //Activate first tab
	$(".tab_contentHome:first").show(); //Show first tab content
	
	//On Click Event
	$("ul.tabsHome li").click(function() {
		$("ul.tabsHome li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_contentHome").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).show(); //Fade in the active content
		return false;
	});
	
	//dropdown.js
	
	$("ul.dropdown > li").hover(function(){
        $(this).addClass("menuhover");
        $('ul:first',this).fadeIn(400);
    }, function(){	
        $(this).removeClass("menuhover");
        $('ul:first',this).fadeOut(400);
		
 
    });
	
	$('#cycle').cycle({ 
			    fx: 'fade',
				sync: 1,
				timeout: 4000, 
			    speed:  1500, 
				pager:  '#featurenav',
				cleartype:  true,
    			cleartypeNoBg:  true
			 });
			

			
		//Overide page numbers on cycle feature with custom text
			$("div#featurenav").children("a").each(function() {
												if($(this).html() == "1") {$(this).html('<span class="nav_thumb" style="background: transparent url() no-repeat 0 0;"><span class="nav_overlay">&nbsp;</span></span>');}
												if($(this).html() == "2") {$(this).html('<span class="nav_thumb" style="background: transparent url() no-repeat 0 0;"><span class="nav_overlay">&nbsp;</span></span>');}
												if($(this).html() == "3") {$(this).html('<span class="nav_thumb" style="background: transparent url() no-repeat 0 0;"><span class="nav_overlay">&nbsp;</span></span>');}
												if($(this).html() == "4") {$(this).html('<span class="nav_thumb" style="background: transparent url() no-repeat 0 0;"><span class="nav_overlay">&nbsp;</span></span>');}
											});
	
	
	//common.js
	
	$('a[rel*=external]').click( function() {
    window.open(this.href);
    return false;
});
	//common.js End
	
	//ini_sidebar_ui.php
	
/*			
		$("#drag_drop_sidebar").sortable();
		$("#drag_drop_sidebar").disableSelection();*/
		
		
	//ini_sidebar_ui.php End
	
	

				
				
		
		
		 $(".thecarousel").jCarouselLite({
        btnNext: ".next",
        btnPrev: ".prev", 
		visible: 9, 
		circular: true, 
		scroll: 6,
		speed: 600,
		mouseWheel: true
	});
	
	
	$("#nav").mouseover(
						  
						  function () 
						  {
							$("#sub_main_menu").hide();
						  }						  
						  );
	
	$("#nav").mouseout(
						  
						  function () 
						  {
							$("#sub_main_menu").show();
						  }						  
						  );
 
});


			
