jQuery(document).ready(function($) {
	
	// iterate through your links and see if they are found in the window.location.pathname string
		var loc_href = window.location.pathname;
			$('#Menu a').each(function () {
				if (loc_href == $(this).attr('href')) {
				$(this).addClass('ActiveCategory');
			}
		});
	// end
	
	// add First class to first list item on menus
		$('#Menu li:first-child, #Footer li:first-child').addClass('First');
	// end
	
	// add Last class to last list item on menus
		$('#Menu li:last-child, #Footer li:last-child').addClass('Last');
	// end
	
	// replace text inside input fields
		function textReplacement(input){
		var originalvalue = input.val();
		input.focus( function(){
			if( $.trim(input.val()) == originalvalue ){ input.val(''); }
		});
		input.blur( function(){
			if( $.trim(input.val()) == '' ){ input.val(originalvalue); }
		});
		}

		textReplacement($('#search_query')); // search
		textReplacement($('#nl_first_name')); // newsletter name
		textReplacement($('#nl_email')); // newsletter email
		textReplacement($('#revtitle')); // review title
		textReplacement($('#revfromname')); // review name
		textReplacement($('#captcha')); // captcha
	// end
	
});

