",bwidth:desktopwidth,btncolor1:'cnfrmok btn-grey',container1: ".main-wrapper",btntxt1:'Fix it for me',btntxt2:'I will fix it',action:function () {automaticfix();},action1:function () {$('#assotedtotal').html(totalPrice);}}); } } $('#assotedtotal').html(totalPrice); return false; }}var split_items=numItems-parseInt(editednumItems);var assortnumitems=Number(split_items)*assortminqty+parseInt(editedtotalPrice);if($('#blankchecked').val()==2){ var assortincrument=12;}else{ var assortincrument=12;}var halfofassort=assortincrument/2;var quantity_assort_range = '84' ;if(qtyvalue>=assortnumitems && (editednumItems!=(numItems-1) || numItems==1 || (numItems-1)==1 )) {	if(Number(qtyvalue % assortincrument) >halfofassort){	qtyvalue = Number(qtyvalue) + Number((assortincrument - (qtyvalue % assortincrument)) % assortincrument);	}else {	checkqtyvalue = Number(qtyvalue) - Number((qtyvalue % assortincrument));	if(checkqtyvalue < quantity_assort_range){	qtyvalue = Number(qtyvalue) + Number((assortincrument - (qtyvalue % assortincrument)) % assortincrument);	}else {	qtyvalue = checkqtyvalue;	}	} if(editednumItems>0){ var qnumItems=numItems-editednumItems; qtyvalue=qtyvalue-editedtotalPrice; }else{ var qnumItems=numItems; }	$("#q_slider").slider('value',$('#quantity').val());	$(".ui-slider-handle .tooltip").html($('#quantity').val());	var sameval=((qtyvalue /qnumItems) - ((qtyvalue /qnumItems)% assortincrument));	var list = [];	var balnce=Number((((qtyvalue /qnumItems)% assortincrument)*qnumItems));	balnce=balnce.toFixed(2);	for(var i=0;i0 && balnce>0){	balnce=balnce-assortincrument;	list.push(Number(sameval)+Number(assortincrument));	}else {	list.push(Number(sameval)); }	}var tot=0; var i=0;	$('.colorlargegroup .clsrsml.active').each(function() { if(!$(this).hasClass('edited')){	var theID = $(this).attr("data-id");	$(this).children("input[id='qty" + theID + "']").val(list[i]); $(this).children("input[id='qty" + theID + "']").attr('data-value',list[i]); $('#imgqty'+theID).html(list[i]);	tot+=parseInt($(this).children("input[id='qty" + theID + "']").val()); i++; }	}); $('.colorlargegroup .clsrsml.active').each(function(i) { if($(this).hasClass('edited')){ var theID = $(this).attr("data-id"); tot+=parseInt($(this).children("input[id='qty" + theID + "']").val()); } }); if(window.lastElementClicked=="INPUT" && window.lastElementClickedId=="quantity"){ if(tot!= $('#quantity').val() && tot>0 && event.type=="change"){ $('.newwarning').remove(); $('#quititydet').append('