function refreshCart()
{
	// Refresh the Cart div data
	$.ajax({
	 // url: "/~chris/dadshop/trunk/dadshop.com.au/cart/load", //Local
	  url: "/cart/load", // Server
	  context: document.body,
	  success: function(data){
			$(window).scrollTop(0);
	  	$('#cart-info').html(data);
			/*$('#shopping-cart').fadeIn(250, function() {
				$(this).delay(3000, function() {
					$(this).fadeOut(3000);
				});
			});*/
			$('#shopping-cart').fadeIn(250).delay(2000).fadeOut(3000);
	  }
	});
	//return false;
}

jQuery(document).ready(function() {
	// Ajax caching bug IE
	$.ajaxSetup({
			cache: false
	});
	
	
	$('#newsletter-signup-button').click(function() {
		$('#newsletter-signup-form').submit();
		return false;
	});
	$('input[title]').inputHints();
	
	// Add to cart buttons on product grid
	$('.addToCart').click(function(){
		$.ajax({
		  url: $(this).attr('href'),
		  context: document.body,
		  success: function(){
		    refreshCart();
		  }
		});
		return false;
	});
	
	// Reset style 
	$('#cart-info').hover(function() {
		//$('#shopping-cart').stop(true).css('display', 'block !important');
		$('#shopping-cart').stop(true, true).show();
	},function(){
		//$('#shopping-cart').stop(true).css('display', 'none !important');
		$('#shopping-cart').stop(true, true).hide();
	});
	
});

