/**
 * ezMark (Minified) - A Simple Checkbox and Radio button Styling plugin. This plugin allows you to use a custom Image for 
 * Checkbox or Radio button. Its very simple, small and easy to use.
 * 
 * Copyright (c) Abdullah Rubiyath <http://www.itsalif.info/>.
 * Released under MIT License
 * 
 * @author Abdullah Rubiyath
 * @version 1.0
 * @date June 27, 2010
 */
(function(jQuery){jQuery.fn.ezMark=function(options){options=options||{};var defaultOpt={checkboxCls:options.checkboxCls||'ez-checkbox',radioCls:options.radioCls||'ez-radio',checkedCls:options.checkedCls||'ez-checked',selectedCls:options.selectedCls||'ez-selected',hideCls:'ez-hide'};return this.each(function(){var jQuerythis=jQuery(this);var wrapTag=jQuerythis.attr('type')=='checkbox'?'<div class="'+defaultOpt.checkboxCls+'">':'<div class="'+defaultOpt.radioCls+'">';if(jQuerythis.attr('type')=='checkbox'){jQuerythis.addClass(defaultOpt.hideCls).wrap(wrapTag).change(function(){if(jQuery(this).is(':checked')){jQuery(this).parent().addClass(defaultOpt.checkedCls);}
else{jQuery(this).parent().removeClass(defaultOpt.checkedCls);}});if(jQuerythis.is(':checked')){jQuerythis.parent().addClass(defaultOpt.checkedCls);}}
else if(jQuerythis.attr('type')=='radio'){jQuerythis.addClass(defaultOpt.hideCls).wrap(wrapTag).change(function(){jQuery('input[name="'+jQuery(this).attr('name')+'"]').each(function(){if(jQuery(this).is(':checked')){jQuery(this).parent().addClass(defaultOpt.selectedCls);}else{jQuery(this).parent().removeClass(defaultOpt.selectedCls);}});});if(jQuerythis.is(':checked')){jQuerythis.parent().addClass(defaultOpt.selectedCls);}}});}})(jQuery);
