$(document).ready(function(){	
	$("#slider").easySlider({
		prevText: '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
		nextText: '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
		//auto: true, 
		//continuous: true
	});
	
	$("#featuredslider").featuredeasySlider({
		prevText: '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
		nextText: '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
		//auto: true, 
		//continuous: true
	});
	
	
	//=================================================================================//
	//When page loads...
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content
	
	

	//On Click Event
	$("ul.tabs li").click(function() {

		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active ID content
		return false;
	});

	//=================================================================================//
});

function showCat(id)
{
	//$('script').reload();	
	
	$('.floatdiv').hide();
	//get the position of the placeholder element  
	var pos = $("#"+id).offset();  //alert(pos); 
	var eWidth = $("#"+id).outerWidth();	
	var mWidth = $("#floatdiv"+id).outerWidth(); 
	var left = (pos.left + eWidth - mWidth) + "px";
	var top = pos.top  - 70 + "px";
	//show the menu directly over the placeholder  
	$("#floatdiv"+id).css( { 
			position: 'absolute',
			zIndex: 5000,
			left: 0, 
			top: top
	} );

	$('#floatdiv'+id).show();
	
}
