$(document).ready(function(){ 
	//Sitespecific javascript here
	//Searchbox clear and fill
	function search_input_values()
	{	
		var searchBox = $('#search input');
		$('#search input').focus(function(){
			if (searchBox.val() != "") {
				
				var theValue = searchBox.val();
				searchBox.attr('temp', theValue)
				searchBox.val('');
			};
		
		});
		$('#search input').blur(function(){
			if (searchBox.val() == "") {
				var theValue = searchBox.attr('temp');
				searchBox.val(theValue);
			};
			
		});
	}
	search_input_values();

	
		//Even and odd rows in tables
	/* if Environment is NOT Editor */
		$("table tr").mouseover(function() {
			$(this).addClass("over");}).mouseout(function() {$(this).removeClass("over");
		});
		$("table tr:nth-child(even), table tr td:nth-child(even)").addClass("even");
		$("table tr:nth-child(odd), table tr td:nth-child(odd)").addClass("odd");
		$("table tr:first-child").removeClass('even').addClass("th");
		$('table tr td:first').addClass('first');
		$('table tr td:last').addClass('last');

		/*Loginform*/
		$('input#pwd').focus(function(){
		    $(this).keypress(function(event) {
		    	if (event.keyCode == '13') {
			    	//event.preventDefault();
			    	$('#submit_wrap_p img').click();
			   }

			});
		});



});
