
$(document).ready(function() {

	$("#email").focus(function() {
		if( this.value == this.defaultValue ) {
			this.value = "";
		}
	}).blur(function() {
		if( !this.value.length ) {
			this.value = this.defaultValue;
		}
	});

	$('#signup').hover(
		function(){ // Change the input image's source when we "roll on"
			$(this).attr({ src : '/themes/site_themes/gn/images/btn-signup_o.png'});
		},
		function(){ // Change the input image's source back to the default on "roll off"
			$(this).attr({ src : '/themes/site_themes/gn/images/btn-signup.png'});
		}
	);

	$('a[rel="dbPopWin"]').click(
		function()
		{
			return $.dbPopWin( $(this).attr('href'), { dbPopWinWidth: 420, dbPopWinHeight: 180, dbPopWinTarget: 'dbPopWin', dbPopWinScrollbars: 'no', dbPopWinResizable: 'no', dbPopWinMenuBar: 'no', dbPopWinAddressBar: 'no' } );
		}
	);

	$("#twitter_div li a").each(function(){
	  if ($(this).text().length > 32) {
	     //alert("long!");
	    var tmp = $(this).text().split("");
	    //alert("tmp length: " + tmp.length);
	    var newString = "";
	    for (p=0;p < tmp.length;p++) {
	         newString += tmp[p] + "&#8203;";
	    }
	     $(this).html(newString);
	  }
	});

});


