/* Author: 

*/
var images = new Array();
var curimage = 0;

$(document).ready(function(){
	var imgtotal = $('.backimg').data('total');
	var imgnum = Math.floor(Math.random()*imgtotal)+1;
	$('.backimg img').attr('src','./data/Images/backgrounds/'+imgnum+'.jpg');
	$('.slideshow').cycle();
	if($('.bigslideshow').length>0){
		$('.photos img').click(function(){
			log($(this).data('image'));
			$('.bs_container').cycle($(this).data('image'))
			$('.photos').fadeOut('slow', function(){
				$('.bigslideshow').fadeIn('slow');
			})
		});
		$('.bs_controls .close').click(function(){
			$('.bigslideshow').fadeOut('slow', function(){
				$('.photos').fadeIn('slow');
			});			
		});
		$('.bs_container').cycle({ 
			speed:  'fast', 
			timeout: 0, 
			next:   '.bs_controls .next' ,
			prev:   '.bs_controls .prev' ,
			slideResize : 0,
			containerResize:0
		});
	}
});






















