(function(a){a(function(){a("#edit-sls-ldbar").change(function(){var c=a("input:radio:checked",a(this)).val();switch(c){case"bar":a(".form-item-sls-pie-position").hide();a(".form-item-sls-bar-position").show();a(".form-item-sls-bar-direction").show();break;case"none":a(".form-item-sls-pie-position").hide();a(".form-item-sls-bar-position").hide();a(".form-item-sls-bar-direction").hide();break}}).trigger("change");a("#edit-sls-full-width").change(function(){if(a(this).is(":checked")){a(".form-item-sls-width label").text("Effect zone width");a(".form-item-sls-create-bg-imgstyle").hide()}else{a(".form-item-sls-width label").text("Width");a(".form-item-sls-create-bg-imgstyle").show()}}).trigger("change");a("#md-slider-configure-form").submit(function(){if(a("#edit-sls-full-width").is(":checked")){a("#edit-sls-create-bg-imgstyle").attr("checked",false)}});a("#edit-show-bullet").change(function(){if(a(this).is(":checked")){a(".form-item-bullet-position").show()}else{a(".form-item-bullet-position").hide()}a("#edit-show-thumbnail").trigger("change")}).trigger("change");a("#edit-show-thumbnail").change(function(){if(a(this).is(":checked")){if(a("#edit-show-bullet").is(":checked")){a(".form-item-thumbnail-position").hide()}else{a(".form-item-thumbnail-position").show()}a(".form-item-sls-thumb-width").show();a(".form-item-sls-thumb-height").show()}else{if(a("#edit-show-bullet").is(":checked")){a(".form-item-thumbnail-position").hide()}else{a(".form-item-thumbnail-position").show()}a(".form-item-thumbnail-position").hide();a(".form-item-sls-thumb-width").hide();a(".form-item-sls-thumb-height").hide()}}).trigger("change");b("#edit-thumbnail-position","tp",4);b("#edit-border-style","bs",10);b("#edit-dropshadow-style","ds",6);function b(c,e,g){var h='<div class="'+e+'wrap clearfix">';var f=0;for($i=0;$i<=g;$i++){f=a(c+" option:eq("+$i+")").val();if(f){h+='<div id="'+e+f+'" class="slitem"></div>'}}h+="</div>";a(c).parent().append(h);var d=a(c+" option[selected]").val();a("#"+e+d).addClass("selected");a("."+e+"wrap .slitem").each(function(){a(this).click(function(){a("."+e+"wrap .selected").removeClass("selected");a(this).addClass("selected");a(c+" option[selected]").removeAttr("selected");tmpindex=a(this).attr("id").replace(e,"");a(c+" option[value="+tmpindex+"]").attr("selected","selected")})});a(c).hide()}})})(jQuery);