/* 
BlueBusiness HTML Template
by Mokush - http://mokush.carbonmade.com/
Version: 1.3 - September 17 09

bluebusiness-v1.0
main javascript functionality - using jQuery
*/

$(function() {	
	if (!($.browser.msie && $.browser.version <= 6)) {
		$("#bluebusiness-banner").hover(moveLights, stopLights); // bind handlers
		$('.more-button').css('opacity', 0.6);
		$('.more-button').hover(highlight, lowlight);
	};
	
	$('ul.latest-projects-items').animatedinnerfade({
		speed: 5000,
		timeout: 5000,
		type: 'random',
		containerheight: '100px',
		containerwidth: '224px',
		animationSpeed: 10000,
		animationtype: 'fade',
		bgFrame: 'none',
		controlBox: 'none',
		displayTitle: 'none'
	});
	
});

/* functions for moving lights */
	
function moveLights() {
	$("#bluebusiness-banner").animate({backgroundPosition: '(0px -900px)'}, 35000, moveLightsTop);
};

function moveLightsTop() {
	$('#bluebusiness-banner').css({backgroundPosition: '0px 245px'});
	moveLights();
};
	
function stopLights() {
	$("#bluebusiness-banner").stop();
};

/* button hightlighting */

function highlight() {
	$(this).css('opacity', 1);
};

function lowlight() {
	$(this).css('opacity', 0.6);
};
