$('#logo, #slides').hide();	

	function spamCheck() 
      {
      	if(document.getElementById('spamcheck-tr')) 
      	{
      		document.getElementById('spamcontrole').value = 'nee';
      		document.getElementById('spamcheck-tr').style.display = 'none';
      	}
      }
	  
	
$(document).ready(function()			{

	// ############
	// ANIMATE SOME STUFF
	// ############

	$('#logo, #slides, .milicycle').hide();		
	$('#logo').delay(1000).fadeIn();
	$('#slides, .milicycle').delay(2000).fadeIn();


	// ############
	// HOME EYE CATCHERS SLIDE
	// ############	
	

		/*$('.home-art-l').cycle({ 
			fx:     'scrollLeft',
			//continuous: true,
			speed: 	 2000,
			timeout: 2000,
			easing: "easeInOutQuint"
		});
		$('.home-art-r').cycle({ 
			fx:     'scrollRight',
			//timeout: 2000,
			//continuous: true,
			speed: 	 2000,
			timeout: 2000,
			easing: "easeInOutQuint"
		});	*/	
		

      $(".bigbtn").hover(function() {
		   $(this).next(".home-art").find('img').stop().animate({ height: "400px", width: "852px", marginTop: "-120px", marginLeft: "-170px", left: "0" });
		   $(this).parent().find(".tagger").stop().animate({ right: "0" });
		   
		   
		}, function() {
		   $(".home-art img").stop().animate({ height: "275px", width: "586px", marginTop: "0px", marginLeft: "0px"});
		   $(this).parent().find(".tagger").stop().animate({ right: "-300px" });		 

		   
		});	
		
		
	// ############
	// MENU IMG CYCLE
	// ############	
	
		//$("#slides").hide();
		//$("#slides").delay(2000, "easeOutBounce").fadeIn();
	
		$('#slides').cycle({ 
			fx:     'uncover',  //uncover
			prev:   '#prev', 
			next:   '#next', 
			timeout: 8000,
			speed: 	 1000,
			pager:  '#nav',
			pagerAnchorBuilder: function(idx, slide) { 
			return '<a href="#"></a>'; 
		}
		});	
      $("#slides").hover(function() {
		   $("#slides").cycle('pause');
		}, function() {
		   $("#slides").cycle('resume');  
		});	
		
	// ############
	// TYPO
	// ############
	
	Cufon.replace('h1, h2, .fakeh2');
	Cufon.replace('#menu li a', {hover: true});
	
	
	// ############
	// LANGUAGE
	// ############
		
	$(".langsel").click(function () {
		$(".langsel-selector").slideToggle();
	});	
	
	
	// ############
	// MENU
	// ############	
	
	$("#menu ul li a.aoverlay02").hover(function() {
		$(".overlay02").stop().toggle()
	} , function() { 
		$(".overlay02").stop().toggle()
	})	
	$("#menu ul li a.aoverlay03").hover(function() {
		$(".overlay03").stop().toggle()
	} , function() { 
		$(".overlay03").stop().toggle()
	})	
	$("#menu ul li a.aoverlay04").hover(function() {
		$(".overlay04").stop().toggle()
	} , function() { 
		$(".overlay04").stop().toggle()
	})		
	$("#menu ul li a.aoverlay05").hover(function() {
		$(".overlay05").stop().toggle()
	} , function() { 
		$(".overlay05").stop().toggle()
	})	
	$("#menu ul li a.aoverlay06").hover(function() {
		$(".overlay06").stop().toggle()
	} , function() { 
		$(".overlay06").stop().toggle()
	})	
	$("#menu ul li a.aoverlay07").hover(function() {
		$(".overlay07").stop().toggle()
	} , function() { 
		$(".overlay07").stop().toggle()
	})	
	$("#menu ul li a.aoverlay08").hover(function() {
		$(".overlay08").stop().toggle()
	} , function() { 
		$(".overlay08").stop().toggle()
	})		

	// ############
	// IMPRESSIONS CYCLE & PANEL
	// ############	
	
	$('.imp').cycle({
		fx:     'fade', //blindX
		speed: '1500',
		timeout: '10000',
		next: '.next-imp',
		prev: '.prev-imp',
		random: 0
	   });
	$(".panel-impressions").hover(function() {
		$(".next-imp, .prev-imp").stop().toggle()
	} , function() { 
		$(".next-imp, .prev-imp").stop().toggle()
	})	

	$("a").hover(function() {
		$(this).find(".zoomer").stop().toggle()
	} , function() { 
		$(this).find(".zoomer").stop().toggle()
	})		

	$("a.photolink, a.videolink").hover(function() {
		$(this).find("img").stop().animate({ opacity: "0.5" });
	} , function() { 
		$(this).find("img").stop().animate({ opacity: "1" });
	})	
	
	// linkable blokjes colorswap
	$(".panel-orange a.total").hover(function() {
		   $(this).parent().css({ backgroundColor: "#ffc540" });
		}, function() {
		   $(this).parent().css({ backgroundColor: "#F7B00D" });
	});	
	$(".panel-white a.total").hover(function() {
		   $(this).parent().css({ backgroundColor: "#c8cb7a" });
		}, function() {
		   $(this).parent().css({ backgroundColor: "#e3e6cc" });
	});
	$(".panel-green2 a.total").hover(function() {
		   $(this).parent().css({ backgroundColor: "#dee18c" });
		}, function() {
		   $(this).parent().css({ backgroundColor: "#c8cb7a" });
	});	
	
	// ############
	// ACTUEEL SIDE PANEL
	// ############		
	
	$('.side-agenda, .side-expo').hide();	
    $('.side-news-btn').click(function(){
        $('.side-agenda, .side-expo').hide(); 
		$('.side-news').show(); 
    });		
    $('.side-agenda-btn').click(function(){
        $('.side-news, .side-expo').hide(); 
		$('.side-agenda').show(); 
    });	
    $('.side-expo-btn').click(function(){
        $('.side-news, .side-agenda').hide(); 
		$('.side-expo').show(); 
    });		
	
	// ############
	// JUST SOME HOVER ACTION
	// ############		
	
	$(".hoverme").hover(function() {
		$(this).stop().css({ opacity: "0.5" });
	} , function() { 
		$(this).stop().css({ opacity: "1" });
	})		
	
	// ############
	// INFO ACCORDION
	// ############
	
	$('#info-accordion .item-content').hide();
    $('#info-accordion .item-head').click(function(){
               $('.item-content').hide();
               $(this).parent().find(".item-content").toggle();
               return false;
    });	
	$('#info-accordion .item-content .close').click(function(){
               $('.item-content').hide();
               //$(this).parent().find(".item-content").toggle();
               //return false;
    });		
	
	$('ul.info-ul li.more').click(function(){
              
              $(this).parent().find("li.hidden").toggle();
              $(this).html('Meer nieuws:'); 
    });	

	$('#info-accordion .item-content-news').show();
	
	// ############
	// NIET WEGGOOIEN
	// ############	

	$('#container #content .banner').hide();
	$('#container #content .banner').delay(2000).slideDown(2000, "easeOutBounce", function() { $('#container #content .banner').css({ borderBottom: "0px" }); } );
	
	
	// ############
	// MILITRACKS / SUBTHEMED SITES
	// ############
	
	$('.milicycle').cycle({
					fx:     'scrollHorz', 
					speed: '1000',
					timeout: '6000',
					next: '.next',
					prev: '.prev',
					random: 0
				   });	
				   
	$('.expocycle').cycle({
					fx:     'fade',
					speed: '1000',
					timeout: 0,
					next: '.exponext',
					prev: '.expoprev',
					random: 0
				   });				   
	$('.expocycle2').cycle({
					fx:     'fade',
					speed: '1000',
					timeout: 0,
					next: '.expo2next',
					prev: '.expo2prev',
					random: 0
				   });	
				   
	$(".hiddenpanel").hide();
	/*$(".openform").click(function () {
		$("#aanmeldform").slideToggle();
	});	*/
	$(".openpanel").click(function () {
		$(this).parent().next(".hiddenpanel").slideToggle();
	});			
				   
	// ############
	// FAN.CYBOX
	// ############	

		
	$("a.photolink").fancybox({
	
				'opacity'		: true,
				'overlayShow'	: false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'none',
				'overlayShow'	: true,
				'overlayColor'  : '#fff',		
				'titlePosition'	: 'inside',
				'centerOnScroll': true,
				'padding'		: 0,
				'titleShow'		: true
				
	});	
	
	
	$("a.videolink").click(function() {
		$.fancybox({
				'padding'		: 0,
				'autoScale'		: false,
				'transitionIn'	: 'none',
				'overlayShow'	: true,
				'overlayColor'  : '#fff',
				'transitionOut'	: 'none',
				'titleShow'		: true,
				'title'			: this.title,
				'titlePosition'	: 'inside',
				'centerOnScroll': true,
				'width'			: 680,
				'height'		: 495,
				'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
				'type'			: 'swf',
				'swf'			: {
				
					'wmode'				: 'transparent',
					'allowfullscreen'	: 'true'
					
				}
			});

		return false;
	});	
	
	$("a.bevrijdingkaart").click(function() {
		$.fancybox({
				'padding'		: 0,
				'autoScale'		: false,
				'transitionIn'	: 'none',
				'overlayShow'	: true,
				'overlayColor'  : '#fff',
				'transitionOut'	: 'none',
				'titleShow'		: false,
				'title'			: this.title,
				'titlePosition'	: 'inside',
				'centerOnScroll': true,
				'width'			: 800,
				'height'		: 740,
				'href'			: 'http://www.libertypark.nl/kaart-bevrijding/index.php?mode=onsite',
				//'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
				'type'			: 'iframe'
				
			});

		return false;
	});		
	
	$("a.edulink").fancybox({
	
				'opacity'		: true,
				'overlayShow'	: false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'none',
				'overlayShow'	: true,
				'overlayColor'  : '#fff',		
				'titlePosition'	: 'inside',
				'autoDimensions': false,
				'width'			: 820,
				'height'		: 620,
				'centerOnScroll': true,
				'padding'		: 0,
				'titleShow'		: true,
				'type'			: 'iframe'
				
	});	


	// ############
	// IE6
	// ############
		
	$(".closeIE6").click(function () {
		$(".ie6_notice").hide();
	});	
	
	spamCheck();
});



