$(document).ready(function(){
									
	// Removes SEO text in navItems
	$(".clearText").html("");
	$(".clearText").removeClass("clearText");
	
	// Clears input fields on Focus
	$(".clearField").bind("blur", function() {
		if ($(this).val()=="") {
			$(this).val($(this).attr("title"));
		};
	});
	$(".clearField").bind("focus", function() {
		if ($(this).val()==$(this).attr("title")) {
			$(this).val("");
		};
	});
	
});

$(document).ready(function(){
	
	NewsTickerInitialise($('#newsBannerContainer'));
	
});

var NewsTickerInterval;

function NewsTickerInitialise(thisContainer) {
	thisContainer.find('li')
		.css({
			'position':'absolute',
			'z-index':'1',
			'top':'25px',
			'background-color':'#111',
			'opacity':'0'
		})
		.hover(function(){
			clearTimeout(NewsTickerInterval);
		},function(){
			NewsTickerInterval = setTimeout("NewsTickerAuto()",3000);
	});
		
	thisContainer.find('li:first')
		.addClass('active')
		.addClass('first')
		.css({
			'z-index':'2',
			'top':'0',
			'opacity':'1'
		});
	thisContainer.find('li:last').addClass('last');
	
		
	
	NewsTickerAuto();
}

function NewsTickerNext(thisContainer) {
	if (thisContainer.find('li:animated').length == 0) {
		var currItem = thisContainer.find('li.active');
		var nextItem; 
		if ( currItem.hasClass('last') ) {
			nextItem = thisContainer.find('li.first');
		} else {
			nextItem = currItem.next();
		}
		
		currItem.animate({
			'top':'-25px',
			'opacity':'0'
			},500,function(){
				currItem.removeClass('active');
		});
		nextItem.css({
			'top':'25px',
			'opacity':'0'
		}).animate({
			'top':'0px',
			'opacity':'1'
			},500,function(){
				nextItem.addClass('active');
		});
		
		NewsTickerInterval = setTimeout("NewsTickerAuto()",3000);
	}
}

function NewsTickerPrev() {
}

function NewsTickerAuto() {
	NewsTickerNext($('#newsBannerContainer'));
}


/******************  */
$(document).ready(function(){
	
	var bodyHeight = $('body').height();
	$('.visitorchoice').css({
		'height':bodyHeight+'px',
		'opacity':'0.8'
	});
	
	$('.visitorchoice a.choicelink').click(function(){ 
		$('.visitorchoice').animate({
				'opacity':'0'
			},200,function(){
				this.css({'display':'none'})
		})
	});
	
});


