function version_compare(t,i){if(t===i)return 0;for(var a=t.split("."),n=i.split("."),e=Math.min(a.length,n.length),l=0;l<e;l++){if(parseInt(a[l])>parseInt(n[l]))return 1;if(parseInt(a[l])<parseInt(n[l]))return-1}return a.length>n.length?1:a.length<n.length?-1:0}jQuery(function(l){l.fn.on===undefined&&(l.fn.on=function(t,i,a,n){return"function"==typeof i?l(this.context).live(t,i):l(i).live(t,a,n),this}),l(document).on("click",".showerrors",function(){return l(".xdetailed-errors").toggle(),!1}),l(document).on("click",".shownotices",function(){return l(".xdetailed-updated").toggle(),!1}),l("form.widget_wysija").on("focus","input[placeholder]",function(){l(this).val()===l(this).attr("placeholder")&&l(this).val("")}),l("form.widget_wysija").on("blur","input[placeholder]",function(){""===l(this).val()&&l(this).val(l(this).attr("placeholder"))}),l("form.widget_wysija").on("focus","input.defaultlabels",function(){l(this).val()===l(this).attr("title")&&l(this).val("")}),l("form.widget_wysija").on("blur","input.defaultlabels",function(){""===l(this).val()&&l(this).val(l(this).attr("title"))}),l(document).on("submit","form.widget_wysija",function(t){if(t.preventDefault(),wysijaAJAX.noajax!==undefined)return l(this).validationEngine("validate");if(!0===l(this).validationEngine("validate")){var i=l(this).find('input[name="action"]').val(),a=l(this).find('input[name="controller"]').val(),n=l(this).attr("id"),e=l(this).serializeArray();wysijaAJAX.task=i,wysijaAJAX.controller=a,wysijaAJAX.formid=n,l.each(e,function(t,i){wysijaAJAX["data["+t+"][name]"]=i.name,wysijaAJAX["data["+t+"][value]"]=i.value}),l("#msg-"+n).html('<div class="allmsgs"><blink>'+wysijaAJAX.loadingTrans+"</blink></div>"),l("#"+n).fadeOut(),l.ajax({type:"post",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(t){l("#msg-"+n).html('<div class="allmsgs"></div>'),t.result||l("#"+n).fadeIn(),l.each(t.msgs,function(a,t){l("#msg-"+n+" .allmsgs ."+a+" ul").length||l("#msg-"+n+" .allmsgs").append('<div class="'+a+'"><ul></ul></div>'),l.each(t,function(t,i){l("#msg-"+n+" .allmsgs ."+a+" ul").append("<li>"+i+"</li>")})})},error:function(t,i,a){l("#msg-"+n).html('<div class="allmsgs"></div>'),l("#msg-"+n+" .allmsgs").html('<div class="error"><ul><li>Oops! There is a problem with this form:</li><li>textStatus:'+i+"</li><li>errorThrown:"+a+"</li><li>responseText:"+t.responseText+"</li></ul></div>")},dataType:"jsonp"})}return!1}),l(function(){var t="centerRight";wysijaAJAX.is_rtl&&(t="centerLeft"),l("form.widget_wysija").validationEngine("attach",{promptPosition:t,scroll:!1}),l("form.widget_wysija").bind("jqv.form.validating",function(){l(this).find("input[placeholder]").each(function(){l(this).val()===l(this).attr("placeholder")&&l(this).val("")})}),l("form.widget_wysija").find("input[placeholder]").each(function(){""===l(this).val()&&l(this).val(l(this).attr("placeholder"))}),l("form.widget_wysija").bind("jqv.form.validating",function(){l(this).find("input.defaultlabels").each(function(){l(this).val()===l(this).attr("title")&&l(this).val("")})}),l("form.widget_wysija").find("input.defaultlabels").each(function(){""===l(this).val()&&l(this).val(l(this).attr("title"))})})});