$(document).ready(function(){

	$("#Menu li:last-child").addClass("last");
	
	
	$("#cycle").cycle({
		fx: "scrollUp"
	});

	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"));
	
	$("#ProductReviews a[onclick*=show_product_review_form]").addClass("button");
	$("#ProductReviews a[onclick*=show_product_review_form] img").replaceWith("Write a Review");	

//	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();


});

$.getJSON("http://rss.madwirewebdesign.com/feed.php?feed=http://itsallcyclelogical.wordpress.com/feed/&desc_char_limit=200&max_posts=1&thumbnail=no&read_more=2&callback=?", function(data) {
	for (i = 0; i < data.length; i++)
	{
	   $(".wordpress-feeder").append(
	   	   "<li><h2><a href='" + data[i].rssItem.link + "'>" + data[i].rssItem.title + "</a></h2><div class='pubdate'>" + data[i].rssItem.pubdate + "</div><div class='description'>" + data[i].rssItem.description + "</div><div class='read-more'><a href='" + data[i].rssItem.link + "'>" + data[i].rssItem.readMore + "</a></div></li>"
	   	   	
	   ); 		
	}		
});
 

