// Fake select
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(4($){$.V.p=4(c){q d=B.W({X:\'Y\',5:\'g\',v:\'Z\',w:\'C\',10:\'11\'},c);$(2).D(4(){q b=$(2).x(),r=2,$i=$(\'<6 l="p"></6>\').12(\'E\',\'7-\'+r.E),$7=$(\'<6 14="0"></6>\'),$8=$(\'<6 l="p-8"></6>\'),$3=F,$g=F,o=d;$(\'*\',r).D(4(){j(2.15.16()==\'G\'){$8.H(\'<I l="7-G">\'+2.17+\'</I>\')}y{q a=$(\'<6 l="7-3">\'+2.m+\'</6>\').J(\'z\',2.z);j(2.g){a.h(o.5);$g=a}$8.H(a)}});$7.m($(\'3:g\',r).m()).K($i).i(\'<6 l="p-18"></6>\');$8.x().K($i);$3=$(\'.7-3\',$i);b.19($i);4 L(){j(!$8.1a(\':1b\')){$g.h(o.5);$8.1c();$(M).1d(\'n\',s);N O}};4 s(){$8.x();$7.t();$3.k(o.5);$(M).1e(\'n\',s)};4 t(){$(2).u().h(o.v)};4 A(){$(2).u().k(o.v)};4 P(e){j(e.f==1f||e.f==1g||e.f==Q||e.f==R){q a=$3.1h($3.S(\'.\'+o.5));$3.T(a).k(o.5);j(e.f==Q||e.f==R){a=(a-1)<0?$3.U()-1:a-1}y{a=(a+1)>=$3.U()?0:a+1}$3.T(a).h(o.5).1i(\'n\')}y j(e.f==13){s()}N e.f==9?1j:O};$7.C(4(){$(2).u().h(o.w)},4(){$(2).u().k(o.w)}).n(L).t(t).A(A).1k(P);$3.n(4(e){b.1l($(2).J(\'z\'));$7.m($(2).m());$g=$(2);$3.S(\'.\'+o.5).k(o.5);$(2).h(o.5)}).1m(4(){$3.k(o.5);$(2).h(o.5)})})}}(B));',62,85,'||this|option|function|selectedClass|span|fake|list|||||||keyCode|selected|addClass|wrap|if|removeClass|class|text|click||fakeSelect|var|_this|closeList|focus|parent|focusClass|hoverClass|hide|else|value|blur|jQuery|hover|each|id|null|optgroup|append|strong|data|appendTo|showList|document|return|false|keyControl|38|37|filter|eq|size|fn|extend|hoverColor|white|focused|clickClass|active|attr||tabindex|tagName|toLowerCase|label|select|after|is|visible|show|bind|unbind|40|39|index|triggerHandler|true|keydown|val|mouseover'.split('|'),0,{}))

/* ------------------------------------------------------------------------
	prettyCheckboxes
	
	Developped By: Stephane Caron (http://www.no-margin-for-errors.com)
	Inspired By: All the non user friendly custom checkboxes solutions ;)
	Version: 1.1
	
	Copyright: Feel free to redistribute the script/modify it, as
			   long as you leave my infos at the top.
------------------------------------------------------------------------- */
	
	jQuery.fn.prettyCheckboxes = function(settings) {
		settings = jQuery.extend({
					checkboxWidth: 20,
					checkboxHeight: 22,
					className : 'prettyCheckbox',
					display: 'list'
				}, settings);

		$(this).each(function(){
			// Find the label
			$label = $('label[for="'+$(this).attr('id')+'"]');

			// Add the checkbox holder to the label
			$label.prepend("<span class='holderWrap'><span class='holder'></span></span>");

			// If the checkbox is checked, display it as checked
			if($(this).is(':checked')) { $label.addClass('checked'); };

			// Assign the class on the label
			$label.addClass(settings.className).addClass($(this).attr('type')).addClass(settings.display);

			// Assign the dimensions to the checkbox display
			$label.find('span.holderWrap').width(settings.checkboxWidth).height(settings.checkboxHeight);
			$label.find('span.holder').width(settings.checkboxWidth);

			// Hide the checkbox
			$(this).addClass('hiddenCheckbox');

			// Associate the click event
			$label.bind('click',function(){
				$('input#' + $(this).attr('for')).triggerHandler('click');
				
				if($('input#' + $(this).attr('for')).is(':checkbox')){
					$(this).toggleClass('checked');
					$('input#' + $(this).attr('for')).checked = true;
					
					$(this).find('span.holder').css('top',0);
				}else{
					$toCheck = $('input#' + $(this).attr('for'));

					// Uncheck all radio
					$('input[name="'+$toCheck.attr('name')+'"]').each(function(){
						$('label[for="' + $(this).attr('id')+'"]').removeClass('checked');	
					});

					$(this).addClass('checked');
					$toCheck.checked = true;
				};
			});
			
			$('input#' + $label.attr('for')).bind('keypress',function(e){
				if(e.keyCode == 32){
					if($.browser.msie){
						$('label[for="'+$(this).attr('id')+'"]').toggleClass("checked");
					}else{
						$(this).trigger('click');
					}
					return false;
				};
			});
		});
	};
	
	checkAllPrettyCheckboxes = function(caller, container){
		if($(caller).is(':checked')){
			// Find the label corresponding to each checkbox and click it
			$(container).find('input[type=checkbox]:not(:checked)').each(function(){
				$('label[for="'+$(this).attr('id')+'"]').trigger('click');
				if($.browser.msie){
					$(this).attr('checked','checked');
				}else{
					$(this).trigger('click');
				};
			});
		}else{
			$(container).find('input[type=checkbox]:checked').each(function(){
				$('label[for="'+$(this).attr('id')+'"]').trigger('click');
				if($.browser.msie){
					$(this).attr('checked','');
				}else{
					$(this).trigger('click');
				};
			});
		};
	};

