/*! ============================================================ * bootstrapSwitch v1.5 by Larentis Mattia @SpiritualGuru * http://www.larentis.eu/ * * Enhanced for radiobuttons by Stein, Peter @BdMdesigN * http://www.bdmdesign.org/ * * Project site: * http://www.larentis.eu/switch/ * ============================================================ * Licensed under the Apache License, Version 2.0 * http://www.apache.org/licenses/LICENSE-2.0 * ============================================================ */ !function(a){a.fn.bootstrapSwitch=function(c){var b={init:function(){return this.each(function(){var p=a(this),m,f,l,o,q=p.closest("form"),h="",g=p.attr("class"),i,d,j="ON",e="OFF",n=false;a.each(["switch-mini","switch-small","switch-large"],function(r,s){if(g.indexOf(s)>=0){h=s}});p.addClass("has-switch");if(p.data("on")!==undefined){i="switch-"+p.data("on")}if(p.data("on-label")!==undefined){j=p.data("on-label")}if(p.data("off-label")!==undefined){e=p.data("off-label")}if(p.data("icon")!==undefined){n=p.data("icon")}f=a("").addClass("switch-left").addClass(h).addClass(i).html(j);i="";if(p.data("off")!==undefined){i="switch-"+p.data("off")}l=a("").addClass("switch-right").addClass(h).addClass(i).html(e);o=a("