$(function(){
	
	// if nothing is highlighted then select first
	if($("#nav > li.hover").length == 0)
	{
		//$("#nav > li").first().addClass('hover');
	}
	
	$("#nav > li").mouseover(function(){
		$("#nav > li").removeClass('hover');
		$(this).addClass('hover');
	});
	$("#nav > li").mouseout(function(){
		$(this).removeClass('hover');
	});
	
	
	$("#searchBox").keypress(function(e){
	    if (e.which == '13') 
	    {
	        e.preventDefault();
	        var q = '';
	        if($("#searchBox").val().length < 1) { return; }

	        q = $("#searchBox").val();

	        if($("#season").is(":checked"))
	        {
	            var url = '/home/search/?q='+q;  
	        }
	        if($("#google").is(":checked"))
	        {
	            var url = 'http://www.google.com/#sclient=psy&hl=en&newwindow=1&fp=b5fc6a07c812d0bf&q='+q;
	        }
	        window.location.href = url;
	    }
	});
	
});

