$(document).ready(function () {	

	/*if ($("#home").length > 0) {
		$('.slideshow').cycle({
			fx: 'fade',
			random: true,
			timeout: 4000,
			after: onAfter,
			before: onBefore
		});
	}
	
	//function onBefore() { $('#output').html("").hide(); } 
	
	function onAfter() {
    $('#output').html("").append('<p>' + $("img", this).attr("alt") + '<br /><span>Click on the image</span></p>').fadeIn(400); 
	}*/
	
	if($("#home").length > 0) {
		
		$('.slideshow').find("a").hide();
		
		var numRand = Math.floor(Math.random()*12+1);
		if (numRand > 9){
			randomNumber = (numRand);
		} else {
			randomNumber = "0" + (numRand);
		}
		
		var currentImg = '#img' + randomNumber;
		
		$(currentImg).fadeIn(1000);
		
		$(currentImg).addClass("current");
		
		var imgDesc = $(currentImg).find("img").attr("alt");
		$('#output').html("").append('<p>' + imgDesc + '<br /><span>Click on the image</span></p>').fadeIn(800);
		
	}
	
	$('.rowItems a img').hide();
	$('.rowItems a img').fadeIn(1300);
	
	if($('.thumbsContainer').length > 0){
	var options = {
		overlayColor: '#ffffff',
		overlayOpacity: '1'
		}; 
	Shadowbox.init(options);
	}
  
	$('.newWindow').click(function(){
		window.open(this.href);
		return false;
	});


	
});





