text: (function($){$.fn.slideLock=function(options){var defaults={labelText:"Slide to Unlock:",noteText:"Proves you're human",lockText:"Locked",unlockText:"Unlocked",inputID:"sliderInput",onCSS:"#333",offCSS:"#aaa",inputValue:1,submitID:"#submit",tabIndex:0,ariavaluemin:0,ariavaluemax:1,ariavaluenow:0,ariaLocked:'Form is locked',ariaUnlocked:'Form is unlocked',debug:true};var opts=$.extend(defaults,options);function insertLocker(){var uiHTML='<p class="slider"><label for="slider" id="sliderLabel">'+opts.labelText+'<br/><span class="quiet">'+opts.noteText+'</span></label>';uiHTML+='<div id="slider" title="Slide to unlock this form" tabindex="'+opts.tabIndex+'"></div></p>';uiHTML+='<p class="quiet"><span id="locked">'+opts.lockText+'</span><img src="'+opts.iconURL+'" alt="Slide to the right" class="ui-icon ui-icon-arrowthick-2-e-w" /><span id="unlocked">'+opts.unlockText+'</span></p>';uiHTML+='<input type="hidden" name="'+opts.inputID+'" value="" id="'+opts.inputID+'" />';return uiHTML}return this.each(function(){var obj=$(this);var submitButton=$(opts.submitID);submitButton.before(insertLocker());$(submitButton).css('margin-top','15px').attr('disabled','disabled');$("#slider",obj).slider({animate:true,value:0,min:0,max:opts.inputValue,step:opts.inputValue,stop:function(event,ui){$("#"+opts.inputID,obj).val(ui.value);var salt='';$.post('include/check_salt.php',{inputvalue:$("#"+opts.inputID,obj).val()},function(data){salt=data;if(opts.debug)console.log(salt);if(salt==="true"){$(".ui-slider-handle").attr({'aria-valuenow':ui.value,'aria-valuetext':opts.ariaUnlocked});$("#locked",obj).css({'color':opts.offCSS,'font-weight':'normal'});$("#unlocked",obj).css({'color':opts.onCSS,'font-weight':'bold'});$(submitButton).attr('disabled','')}else{$(".ui-slider-handle").attr({'aria-valuenow':ui.value,'aria-valuetext':opts.ariaLocked});$("#locked",obj).css({'color':opts.onCSS,'font-weight':'bold'});$("#unlocked",obj).css({'color':opts.offCSS,'font-weight':'normal'});$(submitButton).attr('disabled','disabled')}})}});$(".ui-slider").attr({'role':'slider','aria-labeledby':'sliderLabel'});$(".ui-slider-handle").attr({'role':'button','aria-valuemin':opts.ariavaluemin,'aria-valuemax':opts.inputValue,'aria-valuenow':opts.ariavaluenow,'aria-valuetext':opts.ariaLocked});$("input:submit, input:reset").click(function(){$("#slider").slider("option","value",0)})})}})(jQuery);