/*	
	Onirica Template
	File: global.js
	Stefano Giliberti - kompulsive@gmail.com clickswitch.net		
*/

$(document).ready(function(){
	/* A little trick that removes the divisor background on the last element of the navigation menu */
	$("#navigation ul li:last-child").css('background','none');	
	
	/* Search label */
	htmlinput = $("#navigation input").val() /* picks the inital value of the input (in the html) */
	$("#navigation input").css('color','#b3b3b3').css('font-style','italic').css('text-align', 'center');
	$("#navigation input").focus(function(){ /* on focus.. */
		curinput = $(this).val() /* picks the -current- value */
		if(curinput == htmlinput){ /* if the current value corrispond to the initial value (htmlinput var) */
			$(this).val(''); /* empty the input */
			$(this).css('color','#666').css('font-style', 'normal').css('text-align', 'left');
		}
	});
	$("#navigation input").blur(function(){ /* on blur */
		curinput = $(this).val();
		if(curinput == ''){ /* if the current value is null .. */
			$(this).css('color','#b3b3b3').css('font-style','italic').css('text-align', 'center');
			$(this).val(htmlinput); /* sets the value with its inital value (htmlinput var) */
		}
	});


});
