$(document).ready(function(){

	$("#ProductReviews > a > img").replaceWith("Write a Review");
	$("#ProductReviews > a").addClass("button");

	$("#Menu li:last-child").addClass("last");

	$("#cycle").cycle({
		fx: "fade",
		timeout: 6000
	});
	
	$(".SubCategoryListGrid li:last-child").hide();
	
	$("#SideProductRelated .ProductList li:gt(3)").hide();
	$("#SideProductRelated .ProductList li:first-child").addClass("first");
	$("#SideProductRelated .ProductList li:nth-child(4)").addClass("last");
	$("#SimilarProductsByCustomerViews .ProductList li:nth-child(4)").addClass("last");

	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"));	

//	jCarouselLite example -- you will need to add a <div class="ProductListContainer"> around the <ul>
//	in the HomeFeaturedProducts Panel

//	$("#HomeFeaturedProducts .ProductListContainer").jCarouselLite({
//        btnNext: "#featured-next",
//        btnPrev: "#featured-prev",
//	      visible: 5,
//	 	  scroll: 5,
//		  speed: 800
//   });
	
//	$("a.fancybox").fancybox();
	$('a[rel="gallery"]').fancybox();

});
