/*! ======================================================================== * Bootstrap Toggle: bootstrap2-toggle.js v2.2.0 * http://www.bootstraptoggle.com * ======================================================================== * Copyright 2014 Min Hur, The New York Times Company * Licensed under MIT * ======================================================================== */ +function (a) { "use strict"; function b(b) { return this.each(function () { var d = a(this), e = d.data("bs.toggle"), f = "object" == typeof b && b; e || d.data("bs.toggle", e = new c(this, f)), "string" == typeof b && e[b] && e[b]() }) } var c = function (b, c) { this.$element = a(b), this.options = a.extend({}, this.defaults(), c), this.render() }; c.VERSION = "2.2.0", c.DEFAULTS = {on: "On", off: "Off", onstyle: "success", offstyle: "danger", size: "normal", style: "", width: null, height: null}, c.prototype.defaults = function () { return{on: this.$element.attr("data-on") || c.DEFAULTS.on, off: this.$element.attr("data-off") || c.DEFAULTS.off, onstyle: this.$element.attr("data-onstyle") || c.DEFAULTS.onstyle, offstyle: this.$element.attr("data-offstyle") || c.DEFAULTS.offstyle, size: this.$element.attr("data-size") || c.DEFAULTS.size, style: this.$element.attr("data-style") || c.DEFAULTS.style, width: this.$element.attr("data-width") || c.DEFAULTS.width, height: this.$element.attr("data-height") || c.DEFAULTS.height} }, c.prototype.render = function () { this._onstyle = "btn-" + this.options.onstyle, this._offstyle = "btn-" + this.options.offstyle; var b = "large" === this.options.size ? "btn-large" : "small" === this.options.size ? "btn-small" : "mini" === this.options.size ? "btn-mini" : "", c = a('