Drupal.behaviors.BCWW_weather=function(context){$('#BCWW-weather-form').hide();bind_events(context);$('#change_city_cancel').live('click',function(){$('#BCWW-weather-form').hide();});}
function bind_events(context){$('#change_weather_city',context).bind('click',function(){return false;});$('#edit-BCWW-weather-location',context).bind('click',function(){$(this).val('');return false;});$('#edit-BCWW-weather-change',context).bind('click',function(){var city=$('#edit-BCWW-weather-location').val();city=city.replace(" ","%20");var today=new Date();var expire=new Date();expire.setTime(today.getTime()+3600000*24*30);document.cookie="geolocation="+city+";expires="+expire.toGMTString();$.post('?q=BCWW_weather_change_ajax',{geolocation:city},BCWW_weather_change_ajax_callback);$('#BCWW-weather-form').hide();return false;});$("#change_weather_testing").live('click',function(){$('#BCWW-weather-form').show();return false;});$('#edit-BCWW-weather-show-more',context).bind('click',function(){var city=$('#edit-BCWW-weather-location').val();if(city=="Enter City")
{}
city=city.replace(" ","%20");var today=new Date();var expire=new Date();expire.setTime(today.getTime()+3600000*24*30);document.cookie="geolocation="+city+";expires="+expire.toGMTString();if(city=="Change City")
{alert(city);}
$.post('?q=BCWW_weather_show_more_ajax',{geolocation:city},BCWW_weather_show_more_ajax_callback);return false;});}
var BCWW_weather_change_ajax_callback=function(response){var city=$('#edit-BCWW-weather-location').val();var result=Drupal.parseJson(response);$('#weather-widget-wrapper').html('');$('#weather-widget-wrapper').html(result.html);bind_events('');}
var BCWW_weather_show_more_ajax_callback=function(response){var result=Drupal.parseJson(response);$('#weather-widget-wrapper').html('');$('#weather-widget-wrapper').html(result.html);bind_events('');$('#change_weather_city').hide();$('#edit-BCWW-weather-location-wrapper').show();$('#edit-BCWW-weather-change').show();}
