var test = {};



var slideshow_timeout = 0;
var slideshow_delay = 8000;

var slideshow_start = function() {
	slideshow_timeout = setTimeout(slideshow, slideshow_delay);
};



var slideshow = function() {
	var el = $('.big-slideshow .active').get(0);
	
	$(el).fadeOut(1000, function() {
		var $a = $('.big-slideshow .next');
		var $n = $($a.next());
		
		$('.big-slideshow div').removeClass('active');
		$(el).show();
		
		$a.addClass('active').removeClass('next');

		if($n.length == 0) {
			$('.big-slideshow div').eq(0).addClass('next');
		}
		else {
			$n.addClass('next');	
		}

		slideshow_delay = 8000;
		slideshow_start();
	});
};

$(function() {
	slideshow_start();
});

$(function() {
	$('#lnk-social-facebook, #lnk-social-twitter, #lnk-social-foursquare').hover(function() {
		$('.hover', this).show();
	}, function() {
		$('.hover', this).fadeOut();
	});
});
