jQuery(document).ready(function($) {

		$('a[rel="external"]').attr('target','_blank');


		Cufon.replace('h1, h2, .product-collateral h3');

		$('#product-options-wrapper input.qty').val('1');
		$('input#qty').val('1');

		if ($('body').hasClass('category-sodas')) {
			var price = $('.price-box-bundle span.price').text();
			$('p.price-as-configured').html(price);

			$('#product-options-wrapper, input.qty').bind('change keyup focus blur', function() {
					$('div.warning').hide();
					var all_input = $('#product-options-wrapper').find('input:not(#qty).qty');
					var total = 0;
					$.each(all_input, function() {
							var value = parseInt($(this).val());
							total=total+value;
					})
					
					/*

					if (total != 4) {
							$('.add-to-cart button').attr('onclick', '')
									.bind('click', function(event) {
											event.preventDefault();
											$('div.warning').show();
											$('div.warning').html('Only 4 6-packs allowed in a case.  You have selected <b>'+total+'</b>.');
									})
					} else {
							$('.add-to-cart button.button').hide();
							$('fieldset.add-to-cart').append('<button type="button" class="button" onclick="productAddToCartForm.submit()"><span>Add to Cart</span></button>');
					}
					
					*/

			});
		}	

});
