// jQuery Code
$(document).ready(function(){
	$("#q").focus(function(){
		if ($(this).val() == "enter keyword")
		{
			$(this).val("");
			$(this).css("color","#000000");
		}
	});
	$("#q").blur(function(){
		if ($(this).val() == "")
		{
			$(this).val("enter keyword");
			$(this).css("color","#c4c6c8");
		}
	});
	
	// search button
	$("#search_btn").click(function(){
		if ($("#search_box").val() != "")
		{
			document.search_frm.submit();
		}
	});
	$("#search_btn").mouseover(function() {
		$(this).css("cursor","pointer");
	});
	
	// submit form on keypress
	$("#search_frm").keyup(function(){
		if (event.keyCode == 13) {
        $(this).submit();
    }
	})
	
	// weather go button
	$("#dc_weather_go").click(function(){
		zipcode = document.dc_weather.zipcode.value;
		url = "http://www.weather.com/weather/local/" + zipcode;
		window.open(url);
	});
});
