function video_initCallback(carousel) {
	$('.video-center li a').bind('click', function() {
		carousel.scroll($.jcarousel.intval($(this).parent().index()+1));
		return false;
	});
}

$(function() {
	// Blink fields
	$('.blink').focus(function() {
		if(this.value == this.title) { this.value = '' }
	}).blur(function() {
		if(this.value == '') { this.value = this.title }
	});
	
	// Nav dropdown
	$('#nav ul li').hover(function() {
		/*
		$(this).find('a:eq(0)').toggleClass('hover');
		$(this).find('.dd:eq(0)').stop(true,true).slideToggle('fast');
		*/
		$(this).find('a:eq(0)').toggleClass('hover');
		$(this).find('.dd:eq(0)').stop(true,true).slideToggle('fast');
	});
	
	// Close featured alert
	$('.close-alert').click(function() {
		$(this).parent().slideUp(function() {
			$(this).remove();
		});
		return false;
	});
	
	// Slider
	if (jQuery().jcarousel) {
		$('.slider-widget').jcarousel({
			visible: 1,
			scroll: 1,
			auto: 5,
			wrap: 'both',
			buttonPrevHTML: null,
			buttonNextHTML: null
		});
	

		$('.col-l .video-widget').jcarousel({
			visible: 1,
			scroll: 1,
			initCallback: video_initCallback,
			buttonPrevHTML: null,
			buttonNextHTML: null
		});
	}

	if($.browser.msie && $.browser.version.substr(0,1) == 6 && jQuery().DD_belatedPNG) {
		DD_belatedPNG.fix('.ico-economic, .ico-education, .ico-lawsuits, .ico-energy, .ico-health, .ico-infrastructure, .ico-taxation, .slider-widget li span, .theme-red #logo a, .ico-twitter, .ico-facebook, .theme-default #logo a');
	}
});
