jQuery(function($) {
	
	if ( $.browser.msie && $.browser.version.substr(0,1) == 6 ) {
		DD_belatedPNG.fix('#footer .social a img');
		}
	if ( $.browser.msie && $.browser.version.substr(0,1) == 6 ) {
		DD_belatedPNG.fix('.today-special-box h3');
	}
	if ( $.browser.msie && $.browser.version.substr(0,1) == 6 ) {
		DD_belatedPNG.fix('.feature-box a.get');
	}
	
	$('#page ul.menu > li').each(function() {
		if ($(this).find('ul').length) {
			$(this).find('ul').wrap('<div class="sub hidden"><div class="mid"></div></div>');
			$(this).find('.mid').append('<div class="cl">&nbsp;</div>');
			$(this).find('.sub').prepend('<div class="top">&nbsp;</div>').append('<div class="btm">&nbsp;</div>');
		}
	});
	
	$('#page ul.menu > li').hover(
		function(){ 
			$(this).find('.sub').show(); 
			$(this).find('a:eq(0)').addClass('hover');
		}, function(){ 
			$(this).find('.sub').hide(); 
			$(this).find('a:eq(0)').removeClass('hover'); 
		}
	);
	
	var slider_timeout = 8000;
	var slider_speed = 500;
	
	function change_slide() {
		var cont = $('#featured-slider');
		var total = cont.find('.featured-item').length;
		if (total < 2) {
			return false;
		}
		var current = cont.find('.featured-item').index($('.featured-item:visible'));
		if (current < total - 1) {
			current++;
		} else {
			current = 0;
		}
		$('.featured-item:visible').fadeOut(slider_speed);
		$('.featured-item:eq(' + current + ')').fadeIn(slider_speed);
		timeout = setTimeout(change_slide, slider_timeout);
	}
	
	var timeout = setTimeout(change_slide, slider_timeout);	
	
});

Cufon.replace('#footer .social span', {fontFamily:'Hand'});
