/*
** by Sitsanlis Ilias
*/

var mMin=.2,mMax=2;function updateValue_m1(i,t){m1=Number(cToD(t)),$("#m1Slider").slider({value:t}),restart()}function updateValue_m2(i,t){m2=Number(cToD(t)),$("#m2Slider").slider({value:t}),restart()}function playMovieStartClick(){framePlay=!1,playMovie=!0,animation1.visible=!0,animation2.visible=!0}function playMoviePauseClick(){framePlay=!1,playMovie=!1,animation1.visible=!1,animation2.visible=!1,stage.update()}function stopButtonCkick(){playMovie=!1,dt=dtSlow,restart()}$(function(){$("#stopID").button({text:!1}).click(function(){stopFlag=$(this).is(":checked")}),$.ui.dialog.prototype._focusTabbable=$.noop,$("#force").button({text:!1}).click(function(){})}),$(function(){$("#m1Spinner").spinner({min:mMin,max:mMax,step:.1,numberFormat:"n",spin:function(i,t){updateValue_m1(i,t.value)}}).val(m1),$("#m1Spinner").keyup(function(i){$(this).spinner().val(cToD(this.value)),$(this).val(this.value.replace(/[^0-9.,-]/g,"")),13==i.which&&($.isNumeric(this.value)?$(this).val()>mMax?$(this).val(mMax):$(this).val()<mMin&&$(this).val(mMin):$(this).val(mMin),updateValue_m1(i,this.value))}),$("#m1Spinner").blur(function(i){$.isNumeric(this.value)?$(this).val()>mMax?$(this).val(mMax):$(this).val()<mMin&&$(this).val(mMin):$(this).val(mMin),updateValue_m1(i,this.value)}),$("#m2Spinner").spinner({min:mMin,max:mMax,step:.1,numberFormat:"n",spin:function(i,t){updateValue_m2(i,t.value)}}).val(m2),$("#m2Spinner").keyup(function(i){$(this).spinner().val(cToD(this.value)),$(this).val(this.value.replace(/[^0-9.,-]/g,"")),13==i.which&&($.isNumeric(this.value)?$(this).val()>mMax?$(this).val(mMax):$(this).val()<mMin&&$(this).val(mMin):$(this).val(mMin),updateValue_m2(i,this.value))}),$("#m2Spinner").blur(function(i){$.isNumeric(this.value)?$(this).val()>mMax?$(this).val(mMax):$(this).val()<mMin&&$(this).val(mMin):$(this).val(mMin),updateValue_m2(i,this.value)})}),$(function(){$("#m1Slider").slider({range:"min",min:mMin,max:mMax,step:.1,value:m1,slide:function(i,t){m1=Number(t.value),$("#m1Spinner").spinner().val(t.value),restart()}}),$("#m2Slider").slider({range:"min",min:mMin,max:mMax,step:.1,value:m2,slide:function(i,t){m2=Number(t.value),$("#m2Spinner").spinner().val(t.value),restart()}})}),$(function(){$("#comboBox1").selectmenu({change:function(i){var t=this.value;color1=liquid[t].color,c1=liquid[t].c,name1=liquid[t].name,box1.getChildAt(6).graphics.clear().f(color1).s("#000").ss(1,1,1).p("AJIg/QgDA0ioAmQirAljyAAQjxAAirglQiogmgDg0"),box1.getChildAt(2).graphics.clear().f(color1).s().p("ApHBAQADg0CoglQCrgmDxAAQDyAACqAmQCqAlACA0g"),box1.getChildAt(1).graphics.clear().f(color1).s().p("AmgBcQitgmAAg2QAAg1CtgnQCtgmDzAAQD0AACtAmQCtAngBA1QABA2itAmQitAnj0AAQjzAAitgng"),restart()},width:150,position:{my:"right top",at:"right top",collision:"fit fit"}}),$("#comboBox2").selectmenu({change:function(i){var t=this.value;color2=liquid[t].color,c2=liquid[t].c,name2=liquid[t].name,box2.getChildAt(6).graphics.clear().f(color2).s("#000").ss(1,1,1).p("AJIg/QgDA0ioAmQirAljyAAQjxAAirglQiogmgDg0"),box2.getChildAt(2).graphics.clear().f(color2).s().p("ApHBAQADg0CoglQCrgmDxAAQDyAACqAmQCqAlACA0g"),box2.getChildAt(1).graphics.clear().f(color2).s().p("AmgBcQitgmAAg2QAAg1CtgnQCtgmDzAAQD0AACtAmQCtAngBA1QABA2itAmQitAnj0AAQjzAAitgng"),restart()},width:150,position:{my:"right top",at:"right top",collision:"fit fit"}})}),$(function(){$("input[type='radio']").checkboxradio(),$("input:radio").change(function(){mvalue=$('input:radio[name="radio-1"]:checked').val(),1==mvalue?(lab2.visible=!1,document.getElementById("lab2").style.display="none",lab1.x=150):2==mvalue&&(lab2.visible=!0,document.getElementById("lab2").style.display="inline-table",lab1.x=0),restart()})});