$(document).ready(function(){
	
	$("#PrimaryMenu > ul > li:last-child").addClass("last");
	
	$('.Right').remove();
	$('.SubCategoryListGrid ul li.RowDivider').remove();
	$('.SubCategoryListGrid ul li:last-child').remove();
	
	$('#SideNewProducts .ProductList li:nth-child(3)').hide();
	$('#SideNewProducts .ProductList li:nth-child(4)').hide();
	$('#SideNewProducts .ProductList li:nth-child(5)').hide();
	
	$('#SimilarProductsByCustomerViews .ProductList li:last-child').css({
		'margin-right' : '0',
		'margin-left' : '0'
	});
	
	// $("#ProductReviews > a > img").replaceWith("write a review");
	// $("#ProductReviews > a").addClass("button");
	
	/*
		This is a short and simple script that will create an Active class for your custom pages menu links(if you have to use stuff like Category pages for your main navigation).
		Keep in mind that this will also work for any other list (like custom Side Vendors, Side Categories, or Side Brands) by just changing the ID Selector. **Credit to Krystin Rice
	*/
	var loc_href = window.location.pathname;
		$('#PrimaryMenu a').each(function () {
		if (loc_href == $(this).attr('href')) {
			$(this).parent("li").addClass('ActivePage');
		}
	});
	
	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"));
	textReplacement($("#nl_first_name"));
	textReplacement($("#nl_email"));

});
