$(document).ready(function(){
		$(".lightbox").fancybox({
				'titlePosition': 'inside',
				'showNavArrows': true
		});
});

var imageRotation = new Array();

imageRotation[0] = "billing_system_rotate.png";
imageRotation[1] = "bmu_maxx_rotate.png";
imageRotation[2] = "network_rotate.png";

function rotateFrontPageImages(counter) {
	var max = imageRotation.length;
	$("#imageWrapper").fadeOut('slow', function(){
			$("#imageRotate").attr("src","assets/images/" + imageRotation[counter] + "");
			if (counter == 0) {
				$("#imageLink").attr("href","overview.php");
			}
			else {
				$("#imageLink").attr("href","network.php");
			}
			$("#imageWrapper").fadeIn(function(){
				counter++;
				if (counter == max) {
					counter = 0;
				}
				setTimeout('rotateFrontPageImages(' + counter + ')',5000);
			});
	});
}

var image;

$(document).ready(function(){
		$(".navHover").mouseover(function(){
			var image = $(this).attr("src");
			imageSplit = image.split("/");
			var image = imageSplit[2];
			image = image.replace(/.png/i, "");
			$(this).attr("src","assets/images/" + image + "_hover.png");
		}).mouseout(function(){
			var image = $(this).attr("src");
			imageSplit = image.split("/");
			var image = imageSplit[2];
			image = image.replace(/_hover.png/i, "");
			$(this).attr("src","assets/images/" + image + ".png");
		});
});

