(function() { var __slice = [].slice; (function($, window) { "use strict"; var swoggle; swoggle = (function() { swoggle.prototype.defaults = { state: true, size: null, animate: true, disabled: false, readonly: false, onColor: "green", offColor: null, onText: "", offText: "", labelText: " " }; swoggle.prototype.name = "swoggle"; function swoggle(element, options) { if (options == null) { options = {}; } this.$element = $(element); this.options = $.extend({}, this.defaults, options, { state: this.$element.is(":checked"), size: this.$element.data("size"), animate: this.$element.data("animate"), disabled: this.$element.is(":disabled"), readonly: this.$element.is("[readonly]"), onColor: this.$element.data("on-color"), offColor: this.$element.data("off-color"), onText: this.$element.data("on-text"), offText: this.$element.data("off-text"), labelText: this.$element.data("label-text") }); this.$on = $("", { "class": "" + this.name + "-handle-on " + this.name + "-" + this.options.onColor, html: this.options.onText }); this.$off = $("", { "class": "" + this.name + "-handle-off " + this.name + "-" + this.options.offColor, html: this.options.offText }); this.$label = $("