$(document).ready(function(){

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

	$('#cycle').cycle({
		fx: 'fade'
	});
	
	$('#cycle2').cycle({
		timeout: 8000,
		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'));

//	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: 2,
		speed: 800
    });
	
//	$('a.fancybox').fancybox();

	   $(".Content ul.ProductList li:nth-child(4)").addClass("NoBorder");
       $(".Content ul.ProductList li:nth-child(8)").addClass("NoBorder");
       $(".Content ul.ProductList li:nth-child(12)").addClass("NoBorder");
       $(".Content ul.ProductList li:nth-child(16)").addClass("NoBorder");
	   $(".Content ul.ProductList li:nth-child(20)").addClass("NoBorder");
	   $(".Content ul.ProductList li:nth-child(24)").addClass("NoBorder");
	   $(".Content ul.ProductList li:nth-child(28)").addClass("NoBorder");
	   $(".Content ul.ProductList li:nth-child(32)").addClass("NoBorder");
	   $(".Content ul.ProductList li:nth-child(36)").addClass("NoBorder");
	   $(".Content ul.ProductList li:nth-child(40)").addClass("NoBorder");
	   $(".Content ul.ProductList li:nth-child(44)").addClass("NoBorder");
	   $(".Content ul.ProductList li:nth-child(48)").addClass("NoBorder");
	   $(".Content ul.ProductList li:nth-child(52)").addClass("NoBorder");
	   $(".Content ul.ProductList li:nth-child(56)").addClass("NoBorder");
	   $(".Content ul.ProductList li:nth-child(60)").addClass("NoBorder");

// address caps

$('#FormField_4').change(function() {$(this).val(capital($(this).val()));});
$('#FormField_5').change(function() {$(this).val(capital($(this).val()));});
$('#FormField_10').change(function() {$(this).val(capital($(this).val()));});

function capital(a){
var b = "";
b = b + a[0].toUpperCase();
for (var i = 1; i < a.length; i++)
b = b + a[i];
return b;
}

});



