text: !function(m){function v(e,t,i){var a=e[0],r=/er/.test(i)?_indeterminate:/bl/.test(i)?H:A,n=i==_update?{checked:a[A],disabled:a[H],indeterminate:"true"==e.attr(_indeterminate)||"false"==e.attr(_determinate)}:a[r];if(/^(ch|di|in)/.test(i)&&!n)k(e,r);else if(/^(un|en|de)/.test(i)&&n)y(e,r);else if(i==_update)for(var o in n)n[o]?k(e,o,!0):y(e,o,!0);else t&&"toggle"!=i||(t||e[_callback]("ifClicked"),n?a[_type]!==x&&y(e,r):k(e,r))}function k(e,t,i){var a=e[0],r=e.parent(),n=t==A,o=t==_indeterminate,s=t==H,d=o?_determinate:n?b:"enabled",c=p(e,d+f(a[_type])),l=p(e,t+f(a[_type]));if(!0!==a[t]){if(!i&&t==A&&a[_type]==x&&a.name){var u=e.closest("form"),_='input[name="'+a.name+'"]';(_=u.length?u.find(_):m(_)).each(function(){this!==a&&m(this).data(C)&&y(m(this),t)})}o?(a[t]=!0,a[A]&&y(e,A,"force")):(i||(a[t]=!0),n&&a[_indeterminate]&&y(e,_indeterminate,!1)),h(e,n,t,i)}a[H]&&p(e,_cursor,!0)&&r.find("."+w).css(_cursor,"default"),r[_add](l||p(e,t)||""),r.attr("role")&&!o&&r.attr("aria-"+(s?H:A),"true"),r[_remove](c||p(e,d)||"")}function y(e,t,i){var a=e[0],r=e.parent(),n=t==A,o=t==_indeterminate,s=t==H,d=o?_determinate:n?b:"enabled",c=p(e,d+f(a[_type])),l=p(e,t+f(a[_type]));!1!==a[t]&&(!o&&i&&"force"!=i||(a[t]=!1),h(e,n,d,i)),!a[H]&&p(e,_cursor,!0)&&r.find("."+w).css(_cursor,"pointer"),r[_remove](l||p(e,t)||""),r.attr("role")&&!o&&r.attr("aria-"+(s?H:A),"false"),r[_add](c||p(e,d)||"")}function g(e,t){e.data(C)&&(e.parent().html(e.attr("style",e.data(C).s||"")),t&&e[_callback](t),e.off(".i").unwrap(),m(_label+'[for="'+e[0].id+'"]').add(e.closest(_label)).off(".i"))}function p(e,t,i){if(e.data(C))return e.data(C).o[t+(i?"":"Class")]}function f(e){return e.charAt(0).toUpperCase()+e.slice(1)}function h(e,t,i,a){a||(t&&e[_callback]("ifToggled"),e[_callback]("ifChanged")[_callback]("if"+f(i)))}var C="iCheck",w=C+"-helper",x="radio",A="checked",b="un"+A,H="disabled";_determinate="determinate",_indeterminate="in"+_determinate,_update="update",_type="type",_click="click",_touch="touchbegin.i touchend.i",_add="addClass",_remove="removeClass",_callback="trigger",_label="label",_cursor="cursor",_mobile=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent),m.fn[C]=function(t,i){var a='input[type="checkbox"], input[type="'+x+'"]',r=m(),e=function(e){e.each(function(){var e=m(this);r=e.is(a)?r.add(e):r.add(e.find(a))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(t))return t=t.toLowerCase(),e(this),r.each(function(){var e=m(this);"destroy"==t?g(e,"ifDestroyed"):v(e,!0,t),m.isFunction(i)&&i()});if("object"!=typeof t&&t)return this;var l=m.extend({checkedClass:A,disabledClass:H,indeterminateClass:_indeterminate,labelHover:!0},t),n=l.handle,u=l.hoverClass||"hover",_=l.focusClass||"focus",p=l.activeClass||"active",f=!!l.labelHover,h=l.labelHoverClass||"hover",b=0|(""+l.increaseArea).replace("%","");return"checkbox"!=n&&n!=x||(a='input[type="'+n+'"]'),b<-50&&(b=-50),e(this),r.each(function(){var a=m(this);g(a);var r=this,e=r.id,t={position:"absolute",top:i=-b+"%",left:i,display:"block",width:t=100+2*b+"%",height:t,margin:0,padding:0,background:"#fff",border:0,opacity:0},i=_mobile?{position:"absolute",visibility:"hidden"}:b?t:{position:"absolute",opacity:0},n="checkbox"==r[_type]?l.checkboxClass||"icheckbox":l.radioClass||"i"+x,o=m(_label+'[for="'+e+'"]').add(a.closest(_label)),s=!!l.aria,d=C+"-"+Math.random().toString(36).substr(2,6),c='<div class="'+n+'" '+(s?'role="'+r[_type]+'" ':"");s&&o.each(function(){c+='aria-labelledby="',this.id?c+=this.id:(this.id=d,c+=d),c+='"'}),c=a.wrap(c+"/>")[_callback]("ifCreated").parent().append(l.insert),t=m('<ins class="'+w+'"/>').css(t).appendTo(c),a.data(C,{o:l,s:a.attr("style")}).css(i),l.inheritClass&&c[_add](r.className||""),l.inheritID&&e&&c.attr("id",C+"-"+e),"static"==c.css("position")&&c.css("position","relative"),v(a,!0,_update),o.length&&o.on(_click+".i mouseover.i mouseout.i "+_touch,function(e){var t=e[_type],i=m(this);if(!r[H]){if(t==_click){if(m(e.target).is("a"))return;v(a,!1,!0)}else f&&(/ut|nd/.test(t)?(c[_remove](u),i[_remove](h)):(c[_add](u),i[_add](h)));if(!_mobile)return!1;e.stopPropagation()}}),a.on(_click+".i focus.i blur.i keyup.i keydown.i keypress.i",function(e){var t=e[_type];return e=e.keyCode,t!=_click&&("keydown"==t&&32==e?(r[_type]==x&&r[A]||(r[A]?y(a,A):k(a,A)),!1):void("keyup"==t&&r[_type]==x?!r[A]&&k(a,A):/us|ur/.test(t)&&c["blur"==t?_remove:_add](_)))}),t.on(_click+" mousedown mouseup mouseover mouseout "+_touch,function(e){var t=e[_type],i=/wn|up/.test(t)?p:u;if(!r[H]){if(t==_click?v(a,!1,!0):(/wn|er|in/.test(t)?c[_add](i):c[_remove](i+" "+p),o.length&&f&&i==u&&o[/ut|nd/.test(t)?_remove:_add](h)),!_mobile)return!1;e.stopPropagation()}})})}}(window.jQuery||window.Zepto);