var timer;

function headerTag(){
	var $active = $('#header-words div.active');
	if ( $active.length == 0 ) $active = $('#header-words div:last');

	if ($active.next().length){
			$next = $active.next()
	} else {
			$next = $('#header-words div:first');
			$next.addClass('active')
	}

	$active.addClass('last-active');

	$next.css({opacity: 0.0})
			.addClass('active')
			.animate({opacity: 1.0}, 1000, function() {																								
					$active.removeClass('active last-active');
			});
}

$(document).ready(function(){

	// ================================================================================================
	// Activate thumbnail viewer if there is one
	jQuery.noConflict();
	$(".shots").yoxview({
			backgroundColor: '#000000',
			playDelay: 5000,
	});

	// ================================================================================================
	$("#div-slider").easySlider({
		continuous: true,
		speed: 			750,
		auto:				true,
		pause:			7500,
		nextText: 	'',
		prevText: 	''
		
	});
	
	// ================================================================================================
	// Header tag lines
	setInterval( "headerTag()", 4000 );
	// ================================================================================================
});

