$j(document).ready(function () {
	
	$j('.plus-button').click(function() {
		var input = $j(this).parent().children("#input-qty");
		
		if ($j(this).parent().children("#product-max-qty").val() == input.val()) {
			
		} else {
			input.val(parseInt(input.val()) + 1);	
		}
		
		
	});

	$j('.minus-button').click(function(){
		var input = $j(this).parent().children("#input-qty");
		quantity = parseInt(input.val());

		if (quantity > 1 && $j(this).parent().children("#product-min-qty").val() < input.val()) {
			quantity--;
			input.val(quantity);
		}
	});
	
	
	$j(window).bind('hashchange', function(e) {
		
		var hash = location.hash;
		aa = hash.split("/");
		cf.moveTo(aa[1]);
	});
	
});





function productCheckout(productId, sendToCheckout) {
	sendcart('', 'form', sendToCheckout, 'product-checkout-form-' + productId);
}
