 var quantity = $("#0_quantity").val();
   
   $(document).ready(function(){
   
       //alert(quantity);
       $("#1_size").change(function(){
           var opt = this.options[this.selectedIndex].value;
           if (opt == "SW-1004") {
               $("#0_quantity").val(10);
           }
           if (opt == "SW-1005") {
               $("#0_quantity").val(20);
           }
           if (opt == "SW-1006"){
		   	$("#0_quantity").val(30);
		   }
       })
   });
   /*
   function validateQ(selector, item){
       var quantity = $("#0_quantity").val();
       var opt = $("#1_size").val();
	   var design = $("#design").val();
	    var color = $("#color").val();
	   if (opt == "SW-1004"){
	   	var min = 10;
	   }     
	   if(opt == "SW-1005")
	   {
	   	var min = 20;
	   }
	   if(opt == "SW-1006")
	   {
	   	var min = 30;
	   }
       if (quantity < min) {
           $(selector).val(min);
           alert("The minimum order for this item is " + min + " " + item + ". Your quantity has been updated.");
           return false;
       }
	   if (design == 0)
	   {
	   	alert("Please select a Category");
		return false;
	   }
	   if (color == "0")
	   {
	   	alert("Please select a Design");
		return false;
	   }
       else 
           return true;
   }*/
  function validateQuantityCandle() {
  		var design = $("#design").val();
	    var color = $("#color").val();
		 if (design == 0)
	   {
	   	alert("please choose a category");
		return false;
	   }
	   if (color == "0")
	   {
	   	alert("please select a design");
		return false;
	   }
	   
       if ($("#1_size").val() == "SW-1004") return validateQuan('#0_quantity', 10, 'pieces');    
       if ($("#1_size").val() == "SW-1005") return validateQuan('#0_quantity', 20, 'pieces');
	   if ($("#1_size").val() == "SW-1006") return validateQuan('#0_quantity', 30, 'pieces');
	    
	  
    
}