$(document).ready(function(){

	$.localScroll.defaults.axis = 'xy';

	$(".slide").hide();
	$("#crewpan").scrollTo( '2198px', {duration: 400, axis:"x"});

	$.localScroll.hash({		// Scroll initially if there's a hash (#something) in the url
		target: '#page',
		queue:true,
		duration:1500
	});


// Videoplayer

	$(".highlink").click(function(){
		$(".streamlink").removeClass("active");
		$(this).toggleClass("active");

		$(".stream").slideUp(300);
		$(".highlights").delay(400).slideToggle("slow");
		return false;
	});
	$(".streamlink").click(function(){
		$(".highlink").removeClass("active");
		$(this).toggleClass("active");

		$(".highlights").slideUp(300);
		$(".stream").delay(400).slideToggle("slow");
		return false;
	});


// Musik-Playlists

	$("#listen_kreuzberg").click(function(){
		$(this).toggleClass("active");
		$("#kreuzberg").slideToggle("slow");
		return false;
	});
	$("#listen_walkman").click(function(){
		$(this).toggleClass("active");
		$("#walkman").slideToggle("slow");
		return false;
	});
	$("#listen_zuehrlich").click(function(){
		$(this).toggleClass("active");
		$("#zuehrlich").slideToggle("slow");
		return false;
	});
	$("#listen_feuerwerk").click(function(){
		$(this).toggleClass("active");
		$("#feuerwerk").slideToggle("slow");
		return false;
	});


// Panoramabild

	$("#pan_reefer").click(function(){
		$("#crewpan").scrollTo( '2645px', 600);
		$(".itemdesc .biglink").removeClass("active");
		$(this).toggleClass("active");
		$(".memberinfo").slideUp(300);
		$("#reefer_info").delay(400).slideDown(300);
	});
	$("#pan_emc").click(function(){
		$("#crewpan").scrollTo( '1823px', 600);
		$(".itemdesc .biglink").removeClass("active");
		$(this).toggleClass("active");
		$(".memberinfo").slideUp(300);
		$("#emc_info").delay(400).slideDown(300);
	});
	$("#pan_ean").click(function(){
		$("#crewpan").scrollTo( '1236px', 600);
		$(".itemdesc .biglink").removeClass("active");
		$(this).toggleClass("active");
		$(".memberinfo").slideUp(300);
		$("#ean_info").delay(400).slideDown(300);
	});
	$("#pan_dion").click(function(){
		$("#crewpan").scrollTo( '488px', 600);
		$(".itemdesc .biglink").removeClass("active");
		$(this).toggleClass("active");
		$(".memberinfo").slideUp(300);
		$("#dion_info").delay(400).slideDown(300);
	});
	$("#pan_phantom").click(function(){
		$("#crewpan").scrollTo( '189px', 600);
		$(".itemdesc .biglink").removeClass("active");
		$(this).toggleClass("active");
		$(".memberinfo").slideUp(300);
		$("#phantom_info").delay(400).slideDown(300);
	});
         $("#pan_oguze").click(function(){
                 $("#crewpan").scrollTo( '2198px', 600);
                 $(".itemdesc .biglink").removeClass("active");
                 $(this).toggleClass("active");
                 $(".memberinfo").slideUp(300);
                 $("#oguze_info").delay(400).slideDown(300);
         });

	$("#pan_left").mousedown(function(){
		$("#crewpan").scrollTo( "-=150", 300);
		$(".fullpan .memberinfo").slideUp(300);
	});
	$("#pan_right").mousedown(function(){
		$("#crewpan").scrollTo( "+=150", 300);
		$(".memberinfo").slideUp(300);
	});

// Banner

	$(".banner-close").click(function(){
		$("#banner").slideToggle("slow");
		return false;
	});


// Localscroll

	$.localScroll({
		target: '#page', // could be a selector or a jQuery object too.
		queue:true,
		duration:800,
		hash:true,
		onBefore:function( e, anchor, $target ){
			// The 'this' is the settings object, can be modified
		},
		onAfter:function( anchor, settings ){
			// The 'this' contains the scrolled element (#content)
		}
	});


});
