!function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.slider=redux.field_objects.slider||{},a(document).ready(function(){}),redux.field_objects.slider.init=function(b){b||(b=a(document).find(".redux-group-tab:visible").find(".redux-container-slider:visible")),a(b).each(function(){var b=a(this),c=b;if(b.hasClass("redux-field-container")||(c=b.parents(".redux-field-container:first")),!c.is(":hidden")&&c.hasClass("redux-field-init")){c.removeClass("redux-field-init"),b.find("div.redux-slider-container").each(function(){var c,d,e,f,g,h,i=0,j=1,k=2,l=3,m=a(this).data("id"),n=a(this).data("min"),o=a(this).data("max"),p=a(this).data("step"),q=a(this).data("handles"),r=a(this).data("default-one"),s=a(this).data("default-two"),t=a(this).data("resolution"),u=parseInt(a(this).data("display")),v=Boolean(a(this).data("rtl")),w=a(this).data("float-mark");Boolean(a(this).data("forced"));h=v===!0?"rtl":"ltr";var x,y,z=[n,o],A=[r,s],B=[r];u==k?(e=b.find(".redux-slider-input-one-"+m),f=b.find(".redux-slider-input-two-"+m),x=e,y=f):u==l?(e=b.find(".redux-slider-select-one-"+m),f=b.find(".redux-slider-select-two-"+m),redux.field_objects.slider.loadSelect(e,n,o,t,p),2===q&&redux.field_objects.slider.loadSelect(f,n,o,t,p)):u==j?(e=b.find("#redux-slider-label-one-"+m),f=b.find("#redux-slider-label-two-"+m)):u==i&&(e=b.find(".redux-slider-value-one-"+m),f=b.find(".redux-slider-value-two-"+m));var C,D;if(u==j){var E=[e,"html"],F=[f,"html"];C=[E],D=[E,F]}else C=[e],D=[e,f];2===q?(c=A,d=D,g=!0):(c=B,d=C,g="lower");var G=a(this).noUiSlider({range:z,start:c,handles:q,step:p,connect:g,behaviour:"tap-drag",direction:h,serialization:{resolution:t,to:d,mark:w},slide:function(){if(u==j)if(2===q){var c=G.val();b.find("input.redux-slider-value-one-"+m).attr("value",c[0]),b.find("input.redux-slider-value-two-"+m).attr("value",c[1])}else b.find("input.redux-slider-value-one-"+m).attr("value",G.val());u==l&&(2===q?(b.find(".redux-slider-select-one").select2("val",G.val()[0]),b.find(".redux-slider-select-two").select2("val",G.val()[1])):b.find(".redux-slider-select-one").select2("val",G.val())),redux_change(a(this).parents(".redux-field-container:first").find("input"))}});u===k&&(x.keydown(function(a){var b=G.val(),c=parseInt(b[0]);switch(a.which){case 38:G.val([c+1,null]);break;case 40:G.val([c-1,null]);break;case 13:a.preventDefault()}}),2===q&&y.keydown(function(a){var b=G.val(),c=parseInt(b[1]);switch(a.which){case 38:G.val([null,c+1]);break;case 40:G.val([null,c-1]);break;case 13:a.preventDefault()}}))});var d={width:"resolve",triggerChange:!0,allowClear:!0},e=b.find(".select2_params");if(e.size()>0){var f=e.val();f=JSON.parse(f),d=a.extend({},d,f)}b.find("select.redux-slider-select-one, select.redux-slider-select-two").select2(d)}})},redux.field_objects.slider.isFloat=function(a){return+a===a&&!isFinite(a)||Boolean(a%1)},redux.field_objects.slider.decimalCount=function(a){var b=a.toString().split(".");return b[1].length},redux.field_objects.slider.loadSelect=function(b,c,d,e,f){for(var g=c;d>=g;g+=e){var h=g;if(redux.field_objects.slider.isFloat(e)){var i=redux.field_objects.slider.decimalCount(e);h=g.toFixed(i)}a(b).append('")}}}(jQuery);