// JavaScript Document
// kustweerbericht
// homepage
// requires jquery 1.3.2

 						$(document).ready(function(){
														   
								//panels 'west- en oostkust vandaag'
									//verberg container bij startup
									$("#contentoostkust").hide(); 
									$("#kaartoostkust").hide();
									$("#webcam2").hide();
									$("#webcam3").hide();
									$("#vandaagblock .warning").hide();
									
									
									
									
									
									//capture en block klik event
									$("#ts_tabmenu ul li a").click(function(){
										return false; 
										});
								
									//klik westkust
									$("#tales_tabmenu ul li a#westkusttrigger").click(function(e){
										e.preventDefault();													   
										$("#contentoostkust").fadeOut('normal');
										$("#kaartoostkust").fadeOut('normal',showWestkust);
										});
									
									$("#kaart #kaartoostkust img").click(function(e){
										e.preventDefault();													   
										$("#contentoostkust").fadeOut('normal');
										$("#kaartoostkust").fadeOut('normal',showWestkust);
										});
									
									function showWestkust(){
										$("#contentwestkust").fadeIn("normal");		
										$("#kaartwestkust").fadeIn("normal");										
										$("#oostkusttrigger").parent().removeClass("selected");
										$("#westkusttrigger").parent().addClass("selected");
										}
										
										
									//klik oostkust
									$("#tales_tabmenu ul li a#oostkusttrigger").click(function(e){
										e.preventDefault();
										$("#contentwestkust").fadeOut('normal');
										$("#kaartwestkust").fadeOut('normal',showOostkust);
										});
									
									$("#kaart #kaartwestkust img").click(function(e){
										e.preventDefault();										
										$("#contentwestkust").fadeOut('normal');
										$("#kaartwestkust").fadeOut('normal',showOostkust);
										});
									
									function showOostkust(){										
										$("#contentoostkust").fadeIn('normal');
										$("#kaartoostkust").fadeIn("normal");		
										$("#westkusttrigger").parent().removeClass("selected");
										$("#oostkusttrigger").parent().addClass("selected");
										}
								
									
									//webcams
									$("#showCam1").click(function(e){
										e.preventDefault();										
										$("#webcam2").hide();					
										$("#webcam3").hide();					
										$("#webcam1").fadeIn('normal');		
										});
									$("#showCam2").click(function(e){
										e.preventDefault();										
										$("#webcam1").hide();					
										$("#webcam3").hide();					
										$("#webcam2").fadeIn('normal');		
										});
									$("#showCam3").click(function(e){
										e.preventDefault();										
										$("#webcam1").hide();					
										$("#webcam2").hide();					
										$("#webcam3").fadeIn('normal');		
										});
								
								
								
									//legende close button hoveren
									$("#vandaagblock a.closeme").hover(function(){
											$(this).next().fadeIn('fast');	
											});
									
									$("#vandaagblock a.closeme").mouseout(function(){
											$(this).next().fadeOut('normal');
											});
									
									//legendes wegklikken
										$("#legendewestkust a.closeme").click(function(){
											$(this).parent().parent().parent().slideUp('normal');
											//we moeten nog nen cookie zetten ook é...
											});
	
										$("#legendeoostkust a.closeme").click(function(){
											$(this).parent().parent().parent().slideUp('normal');
											//we moeten nog nen cookie zetten ook é...
	
											});
								
								
								});