Shadowbox.loadSkin('classic', base_url + '/media/js/shadowbox/skin');
Shadowbox.loadLanguage('fr', base_url + '/media/js/shadowbox/lang');
Shadowbox.loadPlayer(['html', 'iframe', 'img'], base_url + '/media/js/shadowbox/player');		
window.onload = function(){Shadowbox.init();}; 

$(function(){	

	if(section == 'home'){
		if(window.location.hash == '#news'){
			$(this).scrollTop($('#news').position().top);
		}
	}
	else{
		$('#nav ul').droppy();
	}
	
	$('a#subscribe').click(function(){
		Shadowbox.open({player:'iframe', content:this.href + '?ajax', width:556, height:396});
		return false;
	});

	$('a#about').click(function(){
		Shadowbox.open({player:'iframe', content:this.href + '?ajax', width:600, height:460});
		return false;
	});

	$('a#credits').click(function(){
		Shadowbox.open({player:'iframe', content:this.href + '?ajax', width:320, height:220});
		return false;
	});

	$("a[href*='http://']:not([href*='"+location.hostname+"'])").click( function(){
		window.open(this.href);
		return false;
	});

	$('a[href*=#]').click(function() {
		if(location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname){
			var $target = $(this.hash);
			$target = $target.length && $target	|| $('[name=' + this.hash.slice(1) +']');
			if($target.length){
				var targetOffset = $target.offset().top;
				$('html,body').animate({scrollTop: targetOffset}, 1000);
				return false;
			}
		}
	});

	$("#discography a").hover(
			function() { $(this).next("div").show(); },
			function() { $(this).next("div").hide();}
	);

	if($('#events').length > 0){
		$('#events').s3Slider({ timeOut: 4000 });	
	}
});
