/* --- Basic css3 selectors using jquery --- */

jQuery(function() { // domready

	jQuery("ul#nav li:first-child").addClass("first");	// first-child
	jQuery("ul#nav li:last-child").addClass("last");		// last-child
	
	// first-letter
  	jQuery("p.intro:eq(0)").each(function() {
    	var text = jQuery(this).html();
    	jQuery(this).html(text.replace(/^([A-Za-z0-9])/g,'<span class="drop">$1</span>'));
  	});
	
	// ie6 hover fix
	if (/MSIE 6.(\d+);/.test(navigator.userAgent)){
				
		jQuery("ul#nav li").mouseenter(function(){
			jQuery(this).addClass("hover");	
		}).mouseleave(function(){
			jQuery(this).removeClass("hover");	
		});
		
	}
	
	// fix z-index for ie6/ie7
	if (/MSIE 6.(\d+);/.test(navigator.userAgent) || /MSIE 7.(\d+);/.test(navigator.userAgent)){
	
		jQuery(function() {
			var zIndexNumber = 9000;
			jQuery('div,ul,li').each(function() {
				jQuery(this).css('zIndex', zIndexNumber);
				zIndexNumber -= 10;
			});
	
		});
	
	}
	
});

/* --- Cufon --- */

Cufon.replace('.cufon');

Cufon.replace('.box h2, #cart caption', {
	fontFamily: 'Gill Sans MT',
	textShadow: '1px 1px #fff'
});

Cufon.replace('#nav li a', {
	fontFamily: 'Futura',
	textShadow: '-1px -1px #86A72C',
	hover: true
});
