!function(e,t){function i(t,i){this.element=e(t),this.options=e.extend({},a,i),this._defaults=a,this._name=n,this.init()}var n="RadioUI",r=(t.VBArray&&!t.XMLHttpRequest,t.document,["destroy","refresh"]),a={};i.prototype.init=function(){var t=this;t.element.hide(),t.element.attr("autocomplete","off"),t.ui=e("<i />").attr("data-name",t.element.attr("name")||"").attr("data",t.element.attr("data")||"").addClass("radioui").css({"margin-top":t.element.css("margin-top"),"margin-bottom":t.element.css("margin-bottom"),"margin-left":t.element.css("margin-left"),"margin-right":t.element.css("margin-right")}).insertAfter(t.element),t.refresh(),t.element.bind("change",function(){var t=e(this).attr("name"),i=e(this).closest("form"),n=e(this);t&&(n=0===i.length?e(":radio[name='"+t+"']"):i.find(":radio[name='"+t+"']")),n.each(function(){e(this).RadioUI&&e(this).RadioUI("check")&&e(this).RadioUI("refresh")})}),t.element.parent("label").bind("click."+t._name,function(i){return!e(i.target).is(":radio")&&t.ui.triggerHandler("click"),i.stopPropagation(),i.preventDefault(),!1}),t.ui.bind("click."+t._name,function(e){return t.element.is(":disabled")?!1:(t.element.prop("checked",!0),t.element.triggerHandler("change"),e.stopPropagation(),!1)})},i.prototype.refresh=function(){var e="";return this.element.is(":checked")&&(e+="-checked"),this.element.is(":disabled")&&(e+="-disabled"),this.ui.removeClass().addClass("radioui"),e&&this.ui.addClass("radioui"+e),this},e.fn[n]=function(t){var a,s,o,h;if("string"==typeof t){if(a=arguments,s=t,o=function(){for(var e=0;e<r.length;e++)if(r[e]===s)return!0;return!1},Array.prototype.shift.call(a),"check"==s)return!!this.data("plugin_"+n);if(o())return this.each(function(){var t=e(this).data("plugin_"+n);t&&t[s]&&t[s].apply(t,a)});if(h=this.first().data("plugin_"+n),h&&h[s])return h[s].apply(h,a);throw new TypeError(n+' has no method "'+s+'"')}return this.each(function(){var r=e(this).data("plugin_"+n);r||e(this).data("plugin_"+n,new i(this,t))})}}(jQuery,window);