/**
 * JS functions
 */
$(document).ready(function(){	
	
	$(".lightbox").lightBox();
	
	$("img").each(function () {
		if ($(this).attr('nxsImgOut') != "" && $(this).attr('nxsImgOver' != ""))
		{
			if ($(this).attr('src' ) != $(this).attr('nxsImgOver'))
			$(this).hover(
				function () { $(this).attr('src', $(this).attr('nxsImgOver')) },
				function () { $(this).attr('src', $(this).attr('nxsImgOut')) }
			);
		}
	});
	
	
	var $sSpeed = $('#keyvisuals').attr('time_to_change');
	var $sTimeout = $('#keyvisuals').attr('time_change2change');
	
	$sSpeed = parseInt($sSpeed);
	$sTimeout = parseInt($sTimeout);
	
	$('#keyvisuals').innerfade({ 			
		speed: $sSpeed, 
		timeout: $sTimeout, 
		type: 'sequence', 
		containerheight: '174px' 
	});

	
	$("a").each(function (){
		$(this).blur();
	});
	
});

