$(document).ready(function() {
	$('a.as_status-close').click(function(){
		$(this).parents('#statusMessage').hide(400);
		return false;
	});
//_________ /status message _________\\
	$('#main_nav > li').hoverIntent(config);
	//$('#main_nav > li.spacer:last').hide();
//_________ /sub nav _________\\
	// $('#main_nav a.secondary').each(function(){
	// 	 var liChar = $(this).text().length;
	// 	 var liWidth = liChar*15;
	// 	 var currentWidest = 0;
	// 	 //$(this).children().each(function(i){
	// 		 if (liWidth > currentWidest) { currentWidest = liWidth; }
	// 		console.log(currentWidest);
	// 	 //});
	// 	 $(this).parents('ul.sub-nav').css('width', currentWidest + 'px');
	// });
//_________ /end sub nav width _________\\
	$('#features').cycle({ 
	    fx:    'scrollLeft', 
	    timeout: 8000,
	    speed: 2000,
		slideExpr: '.feature',
		pause: true
	});
//_________ /features slider _________\\
});
var config = {
	sensitivity: 1, // number = sensitivity threshold (must be 1 or higher)
	interval: 50, // number = milliseconds for onMouseOver polling interval
	over: hoverOn, // function = onMouseOver callback (REQUIRED)
	timeout: 300, // number = milliseconds delay before onMouseOut
	out: hoverOff // function = onMouseOut callback (REQUIRED)
};
function hoverOn(){
	$(this).find('ul.sub-nav').slideDown(200);
}
function hoverOff(){
	$(this).find('ul.sub-nav').slideUp(100);
}
//_________ end main nav hover _________\\
