$(document).ready(function(){
	$(".featured_div").mouseover(function(){
		$(this).css("background-image","url()");
	});
	$(".featured_div").mouseout(function(){
		$(this).css("background-image","url(images/featured_news_bg.jpg)");
	});
	
	$(".news_weather").mouseover(function(){
		$("#news_weather_sub").stop(true,true).animate({"height":"toggle"});
	});
	$(".news_weather").mouseout(function(){
		alert($(event.target));
		$("#news_weather_sub").stop(true,true).animate({"height":"toggle"});
	
	});
	
	$("#on_air_button").mouseover(function(){
		$("#on_air").stop(true,true).animate({"height":"toggle"});
	});
	$("#on_air_button").mouseout(function(){
		$("#on_air").stop(true,true).animate({"height":"toggle"});
	});
});

function google_search(){
	if($("#search").val() == ''){
		alert("Please enter a search term.");
		return false;	
	}
	$search_type = '';
	$search = '';
}

function search_zip_codes(){
	var search_zip = $("#search_zip").val();
	if(search_zip == ''){
		alert("Please enter your zip code to use this feature.");
		return false;
	}
	if(search_zip.length != 5){
		alert("Your zip code must only contain five characters.");
		return false;
	}
	if(isNaN(search_zip)){
		alert("Please enter a valid five digit zip code.");
		return false;	
	}
window.location="search_zip.php?zip="+search_zip;
}

function change_order(){
	city = $("#event_city").val();
	
	if(city != 'all'){
		location="calendar.php?city="+city+"";
	}else{
		location="calendar.php";
	}
}
