$(document).ready(function(){
		loader();				   
});
	/* ------------ SLIDESHOW */
	var j = 0;

	function loader(){
		
		var img = new Image();
		$(img).load(function(){
			var el = $("li:eq("+j+")", "#superslideshow");
			$(el).html(this);
			if(j<$("#superslideshow .images li").length){
				j++;
				if(j==$("#superslideshow .images li").length-1){
					slideShow();
				}
				loader();
			}
		}).attr('src',$("#superslideshow li:eq("+j+")").html());
	}
	function slideShow() {
		$('#superslideshow .images li').hide();
		$('#superslideshow li:first').fadeIn("slow");
		interval = setInterval('gallery()',4000);
		$('.home_slide #links a:first').addClass('current');
	}
	var interval;
	function gallery() {
		var current = $('#superslideshow li.show');
		$('#superslideshow li').fadeOut(1000);
		$('#superslideshow li').removeClass('show');
		var next = ((current.next().length) ? ((current.next().hasClass('show'))? $('#superslideshow li:first') :current.next()) : $('#superslideshow li:first'));
		next.fadeIn(1000);
		next.addClass('show');
		var lien = next.find('a').attr('class');

	}

