$(document).ready(function(){
	
	//BLOG FEED FOR HOMEPAGE
	$('#blog-feed-container').rssfeed('http://feeds.feedburner.com/ExactMatchWoodTouchup', {
		limit: 2
	});
	
	//OPEN BLOG LINKS IN SAME WINDOW
	$('.blog-container #PageContent .BlockContent a').removeAttr("target");
	

	//ADD LAST CLASS TO LAST MENU ITEM
	$('#Menu li:last-child').addClass('last');
	
	//TRANSLATED STYLE
	$("#Menu li:nth-child(4)").addClass('narrow');

//	$('#cycle').cycle({
//		fx: 'fade'
//	});

	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'));

	
	
(function($)
{
	$.fn.blink = function(options)
	{
		var defaults = { delay:500 };
		var options = $.extend(defaults, options);
		
		return this.each(function()
		{
			var obj = $(this);
			setInterval(function()
			{
				if($(obj).css("visibility") == "visible")
				{
					$(obj).css('visibility','hidden');
				}
				else
				{
					$(obj).css('visibility','visible');
				}
			}, options.delay);
		});
	}
}(jQuery))	
	
	
//	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();

});
