/*! Checkboxradio - v0.1.0 - 2015-04-14 * https://github.com/filamentgroup/checkboxradio * Copyright (c) 2015 Filament Group; Licensed MIT */ window.jQuery=window.jQuery||window.shoestring,function(a,b){"use strict";var c={toggle:"checked"},d=function(b){if(!b)throw new Error("Element required to initialize object");this.element=b,this.$element=a(b),this.isRadio=this.$element.is("input[type=radio]"),this.parent=this.$element.parent(),this.radioSiblings=this.parent.closest(".page, body").find("input[name='"+this.element.name+"']")};d.prototype.applyCheckIcons=function(){this.parent.find("input:checked + *, .label-text").append('')},d.prototype.toggleCheck=function(){this.parent[this.element.checked?"addClass":"removeClass"](c.toggle)},d.prototype.change=function(){this.isRadio&&!this.element.checked?(this.element.checked=!0,this.radioSiblings.trigger("change")):this.isRadio||(this.element.checked=!this.element.checked,this.$element.trigger("change"))},b.CheckboxRadio=d}(window.jQuery,this),function(a,b){var c="checkboxradio",d=c+"_init",e="input[type=checkbox], input[type=radio]";b.fn[c]=function(){return this.each(function(b,c){var e=new a(c);e.$element.data(d)||(e.$element.data(d,!0),e.isRadio||e.applyCheckIcons(),e.$element.bind("change init",function(){e.toggleCheck()}),e.parent.bind("click",function(){e.change()}),e.hasPicker&&e.hasPicker()&&e.initPicker(),e.$element.trigger("init"))})},b(document).bind("enhance",function(a){b(e,a.target)[c]()})}(CheckboxRadio,jQuery,this);