$(document).ready(function() {

	$("#myalerts").click(function() {
		var $$dialog = $('<div></div>').load('/myalerts/').dialog({
						autoOpen: false,
						modal: true,
						height: 390,
						title: 'My Alerts'
					});
		$$dialog.dialog('open');
		return false;
		});
		
	$("#login").click(function() {
		var $$dialog = $('<div></div>').load('/login/').dialog({
						autoOpen: false,
						modal: true,
						height: 145,
						title: 'Log in'
					});
		$$dialog.dialog('open');
		return false;
	});
	
	$('.zipcode').each(function(){
			var default_value = this.value;
			$(this).focus(function(){
				if (this.value == default_value) {
					this.value = '';
				}
			});
			$(this).blur(function(){
				if (this.value == '') {
					this.value = default_value;
				}
			});
		});
		
	/*
  window.fbAsyncInit = function() {
    FB.init({appId: '234428283243066', status: true, cookie: true,
             xfbml: true});
  };
  (function() {
    var e = document.createElement('script'); e.async = true;
    e.src = document.location.protocol +
      '//connect.facebook.net/en_US/all.js';
    document.getElementById('fb-root').appendChild(e);
  }());
  */
});
