jQuery(document).ready(function($) {
	$('#slideshow').cycle({timeout:6000});
	
/*	$("#rss").PaRSS(
		"feed url",	// rss feed url (required)
		2,		// number of items (optional)
		"M jS g:i a",	// date format (optional)
		"image"         // display format (optional)
	);*/
    
	$('#HomeFeaturedSlider').bxSlider({
		displaySlideQty: 3,
		moveSlideQty: 3             
    });
	
	// Remove move the cart items indicator when there's nothing in it
	/*if ($("li.CartLinkItems").text() == '') {
	  $("li.CartLinkItems").remove();
	}*/
	
	$(".CartContents .SubTotal td:not(.tdOdd, .tdEven)").each(function() {
	  if ($(this).hasClass("Odd")) {
	    $(this).addClass("tdOdd");
	  }
	  else if ($(this).hasClass("Even")) {
	    $(this).addClass("tdEven");
	  }
	});
	
	var searchText = 'search the site...';
	if (!$("#search_query").attr("value")) {
	  $("#search_query").attr("value", searchText);
	}
	$("#search_query").click(function() {
	  
	  if ($("#search_query").attr("value") == searchText) {
        $("#search_query").attr("value", "");
      }	  
	  
	});
	
	// Add active page class to all links that reference the current page
	$("li a[href='"+window.location.pathname+"']").parents("li").addClass("ActivePage");
	$("li a[href='"+window.location+"']").parents("li").addClass("ActivePage");
	
	if ($(".heading-top-banner").length > 0 && !$(".heading-top-banner").html()) {
	  $(".heading-top-banner").remove();
	}
		
/*	$('#HomeNewSlider').bxSlider({
		displaySlideQty: 4,
		moveSlideQty: 4             
        });*/
	
	// General form cleanup
	$('.ContactButton').addClass('button');
	
	// Add CurvyBox to Create Account //
	$('.createaccount .Textbox, .createaccount select, .createaccount .JSHidden, #EditAccountForm .Textbox, #ShippingAddressForm .Textbox, #ShippingAddressForm select').addClass('CurvyBox');
	
	// Checkout Overhaul //
	$('.checkout #CreateAccountButton, .checkout #LoginButton, .checkout .billingButton').addClass('button');	
});
