//Resizelogo
function LogoExpand() {
   $('#logo').css('width','752px');
}
function LogoContract() {
   $('#logo').css('width','180px');
}

//Artiesten zoek filter
function artiest_onClick(tempurl) {
   podium = document.selectie.podium.value;
   dag = document.selectie.dag.value;

   templink =  tempurl+"/Artiesten/";

   if (podium != ''){
      templink = templink + podium + "/";
   }
   if (dag != ''){
      templink = templink + dag + "/";
   }

   document.selectie.action = templink;
   document.selectie.submit();  
}

//Verkoopadres zoek filter
function verkoopadres_onClick(tempurl) {
   plaats = document.selectie.plaats.value;
   templink =  tempurl+"/Tickets/Verkoopadressen/";

   if (plaats != ''){
      templink = templink + plaats + "/";
   }

   document.selectie.action = templink;
   document.selectie.submit();  
}


/* Predefined variables */
$(document).ready(function() {	
	
	$('#headliner').jCarouselLite({
	  auto: 5000,
	  speed: 750,
	  visible: 1
	 });
	
	if ($.flash.available){
		// Hide html contents
		$('.smallcol h1').children().css({'background':'none'});
		$('#logo').children().css({'display':'none'});
		// Activate plugins
			$('#logo').flash({
				swf: '/flash/Trigger.swf',
				width: 752,
				height: 222,
    wmode : "transparent"
			});

		$('#flashDatum').children().css({'display':'none'});
		// Activate plugins
			$('#flashDatum').flash({
				swf: '/flash/Datum.swf',
				width: 180,
				height: 212
			});

		$('#anim').children().css({'display':'none'});
		// Activate plugins
			$('#anim').flash({
				swf: '/flash/Spreuken.swf',
				width: 180,
				height: 195
			});

	}
	
 screenshotPreview();

	$('.gallery').addClass('gallery_demo'); // adds new class name to maintain degradability
		
		$('ul.gallery').galleria({
			history   : false, // activates the history object for bookmarking, back-button etc.
			clickNext : false, // helper for making the image clickable
			insert    : '.galleria_container', // the containing selector for our main image
			onImage   : function(image,caption,thumb) { // let's add some image effects for demonstration purposes
				
				// fade in the image & caption
				image.css('display','none').fadeIn(1000);
				caption.css('display','none').fadeIn(1000);
				
				// fetch the thumbnail container
				var _li = thumb.parents('li');
				
				// fade out inactive thumbnail
				_li.siblings().children('img.selected').fadeTo(500,0.3);
				
				// fade in active thumbnail
				thumb.fadeTo('fast',1).addClass('selected');
				
				// add a title for the clickable image
				//image.attr('title','Next image >>');
			},
			onThumb : function(thumb) { // thumbnail effects goes here
				
				// fetch the thumbnail container
				var _li = thumb.parents('li');
				
				// if thumbnail is active, fade all the way.
				var _fadeTo = _li.is('.active') ? '1' : '0.3';
				
				// fade in the thumbnail when finnished loading
				thumb.css({display:'none',opacity:_fadeTo}).fadeIn(1500);
				
				// hover effects
				thumb.hover(
					function() { thumb.fadeTo('fast',1); },
					function() { _li.not('.active').children('img').fadeTo('fast',0.3); } // don't fade out if the parent is active
				)
			}
		});

});




//acts rollover
$(function(){
	$('#actsoverzicht li')
		.css( {backgroundPosition: "-561px 0"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(0px 0)"}, {duration:500})
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(-561px 0)"}, {duration:200, complete:function(){
				$(this).css({backgroundPosition: "-561px 0"})
			}})
		})
});

//verkoopadressen rollover
$(function(){
	$('#verkoopadressen li')
		.css( {backgroundPosition: "-561px 0"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(0px 0)"}, {duration:500})
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(-561px 0)"}, {duration:200, complete:function(){
				$(this).css({backgroundPosition: "-561px 0"})
			}})
		})
});

//verkoopadressen rollover
$(function(){
	$('#nieuwsoverzicht li')
		.css( {backgroundPosition: "-561px 0"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(0px 0)"}, {duration:500})
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(-561px 0)"}, {duration:200, complete:function(){
				$(this).css({backgroundPosition: "-561px 0"})
			}})
		})
});