Cufon.replace('.cufon-avenir', { color : '#FFFFFF', fontFamily : 'avenir' });
Cufon.replace('.markerFelt', { fontFamily : 'markerfelt',  textShadow: '2px 2px 2px #FFF' });
/* FIX Firefox 3.0 ( Win & Mac )
Need to specify size and color for firefox 3.0 bug 
Bug : color and size from CSS not interpreted
Cause : certainly because multiple class attribute
*/
Cufon.replace('.title-1', { fontSize : '15px', color : '#FFFFFF', fontFamily : 'avenir' });
Cufon.replace('.title-2', { fontSize : '20px', color : '#FFFFFF', fontFamily : 'avenir' });
Cufon.replace('.title-3', { fontSize : '18px', color : '#FFFFFF', fontFamily : 'avenir' });
Cufon.replace('.title-4', { fontSize : '13px', color : '#FFFFFF', fontFamily : 'avenir' });
Cufon.replace('#subnav ul li dl dt a', { fontSize : '13px', color : '#FFFFFF', fontFamily : 'avenir' });

$(function(){
	/* Transform email address in mailto */
	$('.email').each(function(){
		var email = ($(this).html().replace(/\[AT\]/gi, "@").replace(/\[DOT\]/gi, "."));
		$(this).html("<a href='mailto:" + email + "'>" + email + "</a>");
	});	
	if(!$.browser.msie || $.browser.version.substr(0,1) > 7) {
		$('form').jqTransform();
        $('form').find('select').closest('dl').addClass('selectRow');
	}
	if (!$.browser.opera) {
		$("input[type=file]").filestyle({
			imageheight : 19,
     		imagewidth : 85,     
			width: 167
		});
	}
	
	$("form").validationEngine({promptPosition: "topLeft"});
	$("input.formDate").mask("99/99/9999");
	$("input.formCode").mask("9999");
	
	
	
	

/* FIX all browser except recents one
Translate CSS selectors and attributes not commonly implemented
*/
	$("#footer-nav dl:last").css({"width": "160px", "padding-right": 0}); /* CSS3 selector pseudo-class :last-of-type */
	$('#contactUs dl').corner(); /* CSS3 attribute border-radius */
	$('#sponsors-box').corner(); /* CSS3 attribute border-radius */
	

	if($.browser.msie && $.browser.version.substr(0,1) < 8) {
		$('.clearIE').html('&nbsp;');
	}
/* FIX Internet Explorer 6 ( Win )
Create an hover effect on a box
Bug : Hover effect doesn't work on something else than anchors
Cause : Function hover not implemented in IE6 
*/
	if($.browser.msie && $.browser.version=="6.0") {
		$('.panel .box2 header').hover(function(){
			$('.bgTop', this).css({ "background-image": "url('../img/ie/bg-box-top-over.gif')"});
			$('.bgBottom', this).css({ "background-image": "url('../img/ie/bg-box-bottom-over.gif')"});
			$('.bgLeft',this).css({ "background-image": "none"});
			$('.bgRight',this).css({ "background-image": "url('../img/ie/bg-box-right-over.gif')"});			
			$('.bgContent',this).css({ "background": "#CD003A url('../img/bg-box-content-over.png') repeat-x left top"});
			$('.corner-topLeft',this).css({ "background-position": "0 -840px"});
			$('.corner-topRight',this).css({ "background-position": "-9px -840px"});
			$('.corner-bottomLeft',this).css({ "background-position": "0 -847px"});
			$('.corner-bottomRight',this).css({ "background-position": "-9px -847px"});
		}, function(){
			$('.bgTop', this).css({ "background-image": "url('../img/ie/bg-box-top.gif')"});
			$('.bgBottom', this).css({ "background-image": "url('../img/ie/bg-box-bottom.gif')"});
			$('.bgLeft',this).css({ "background-image": "none"});
			$('.bgRight',this).css({ "background-image": "url('../img/ie/bg-box-right.gif')"});			
			$('.bgContent',this).css({ "background": "#CD003A url('../img/bg-box-content.png') repeat-x left top"});
			$('.corner-topLeft',this).css({ "background-position": "0 -824px"});
			$('.corner-topRight',this).css({ "background-position": "-9px -824px"});
			$('.corner-bottomLeft',this).css({ "background-position": "0 -831px"});
			$('.corner-bottomRight',this).css({ "background-position": "-9px -831px"});
		});
	}
		
	
});
