$(function(){
		   
//main nav drop downs
	var Xpos;
	function findX(ID)
	{
		switch(ID)
		{
			case "aboutNav":
				Xpos = "-77px";
				break;
			case "salesNav":
				Xpos = "-338px";
				break;
			case "serviceNav":
				Xpos = "-158px";
				break;
		};
		return Xpos;
	};
	var menuConfig = {    
		sensitivity: 5, // number = sensitivity threshold (must be 1 or higher)    
		interval: 100, // number = milliseconds for onMouseOver polling interval    
		over: function()
		{
			$(this).children('ul').slideDown(260);
			var ID = $(this).children('a:first').attr("id");
			$(this).children('a:first').css('background-position', findX(ID) + ' -34px');
		}, // function = onMouseOver callback (REQUIRED)    
		timeout: 300, // number = milliseconds delay before onMouseOut    
		out: function()
		{
			$(this).children('ul').slideUp(200);
			var ID = $(this).children('a:first').attr("id");
			$(this).children('a:first').css('background-position', findX(ID) + ' 0');
		} // function = onMouseOut callback (REQUIRED)    
	};				
	$('.dropMenu ul').hide();
	$('.dropMenu').hoverIntent(menuConfig);
//

// comment form validator
	jQuery.fn.exists = function(){return jQuery(this).length>0;}
	
	if($("#commentForm").exists())
	{
		$("#commentForm").validate();
	} else if($("#extraForm").exists())
	{
		$("#extraForm").validate();
	}
//

//product ads
	$('#ads').cycle({
		timeout: 0,
		speed: 300,
		startingSlide: 0
	});
	var adConfig = {    
		sensitivity: 10, // number = sensitivity threshold (must be 1 or higher)    
		interval: 100, // number = milliseconds for onMouseOver polling interval    
		over: function()
		{
			var i = $(this).parent().index();
			$('#ads').cycle(i);
			return false;
		}, // function = onMouseOver callback (REQUIRED)    
		timeout: 100, // number = milliseconds delay before onMouseOut    
		out: function()
		{
			var i = $(this).parent().index();
		} // function = onMouseOut callback (REQUIRED)    
	};				
	$('#productArea_top #ads').show()
	$('#productArea_top ul li a').hoverIntent(adConfig);
//

//features
	$('#featureBox').cycle({
		fx: 'scrollLeft',
		speed: 600,
		timeout: 4000,
		next: '#next',
		prev: '#prev',
		pause: 1
	});
//



});