(function(a){a.switcher=function(c){var b=a("input[type=checkbox],input[type=radio]");if(c!==undefined&&c.length){b=b.filter(c)}b.each(function(){var e=a(this).hide(),d=a(document.createElement("div")).addClass("ui-switcher").attr("aria-checked",e.is(":checked"));if("radio"===e.attr("type")){d.attr("data-name",e.attr("name"))}toggleSwitch=function(f){if(f.target.type===undefined){e.trigger(f.type)}d.attr("aria-checked",e.is(":checked"));if("radio"===e.attr("type")){a(".ui-switcher[data-name="+e.attr("name")+"]").not(d.get(0)).attr("aria-checked",false)}};d.on("click",toggleSwitch);e.on("click",toggleSwitch);d.insertBefore(e)})}})(jQuery);