
$(document).ready(function() {	

	//Show Banner
	$(".main_image .desc").show(); //Show Banner
	$(".main_image .block").animate({ opacity: 0.85 }, 1 ); //Set Opacity

	//Click and Hover events for thumbnail list
	$(".image_thumb ul li:first").addClass('active'); 
	
	$(".image_thumb ul li").click(function(){ 
	
	
		
		
		$(".imgslider_arrow").addClass("hidden");
		$(this).children(".imgslider_arrow").removeClass("hidden");
	
	
		//Set Variables
		var imgAlt = $(this).find('img').attr("alt"); //Get Alt Tag of Image
		var imgTitle = $(this).find('a').attr("href"); //Get Main Image URL
		var imgDesc = $(this).find('.block').html(); 	//Get HTML of block
		var imgDescHeight = $(".main_image").find('.block').height();	//Calculate height of block	
		
		if ($(this).is(".active")) {  //If it's already active, then...
			return false; // Don't click through
		} else {
			//Animate the Teaser				
	//		$(".main_image .block").animate({ opacity: 0, marginBottom: -imgDescHeight }, 0 , function() { awdf
				
				$(".main_image img").fadeOut(28, function () {
					$(".main_image img").attr({ src: imgTitle , alt: imgAlt}).fadeIn(800);
	//			  });

				
		//		$(".main_image .secundairy_img").attr({ src: imgTitle , alt: imgAlt});
			});
		}
		
		$(".image_thumb ul li").removeClass('active'); //Remove class of 'active' on all lists
		$(this).addClass('active');  //add class of 'active' on this list only
		return false;
		
	}) .hover(function(){
		$(this).addClass('hover');
		}, function() {
		$(this).removeClass('hover');
	});
			
	//Toggle Teaser
	$("a.collapse").click(function(){
		$(".main_image .block").slideToggle();
		$("a.collapse").toggleClass("show");
	});
	
	

	
	setInterval( "autoplay()", 5000 );

	
	
});//Close Function


var counter_autoplay = 2;

	
	function autoplay(){ 
		if($("#main").hasClass("indexslider")) {
//		alert(".li_nr_"+counter_autoplay);
		
			$(".imgslider_arrow").addClass("hidden");
			$(".li_nr_"+counter_autoplay).children(".imgslider_arrow").removeClass("hidden");
		
		
			//Set Variables
			var imgAlt = $(".li_nr_"+counter_autoplay).find('img').attr("alt"); //Get Alt Tag of Image
			var imgTitle = $(".li_nr_"+counter_autoplay).find('a').attr("href"); //Get Main Image URL
			var imgDesc = $(".li_nr_"+counter_autoplay).find('.block').html(); 	//Get HTML of block
			var imgDescHeight = $(".main_image").find('.block').height();	//Calculate height of block	
			
			if ($(".li_nr_"+counter_autoplay).is(".active")) {  //If it's already active, then...
				return false; // Don't click through
			} else {
				//Animate the Teaser			
				
		//		$(".main_image .block").animate({ opacity: 0, marginBottom: -imgDescHeight }, 0 , function() { awdf
					$(".main_image img").fadeOut(28, function () {
						$(".main_image img").attr({ src: imgTitle , alt: imgAlt}).fadeIn(800);
					  });
	
		//		});
			}
			
			$(".image_thumb ul li").removeClass('active'); //Remove class of 'active' on all lists
			$(".li_nr_"+counter_autoplay).addClass('active');  //add class of 'active' on this list only
			
			counter_autoplay++;
			if(counter_autoplay > 4) {
				counter_autoplay = 1;
			}
		}
		return false;
	}
	

	
	
	
	//Slider 2
	
	$(document).ready(function() {	

	//Show Banner
	$(".main_image .desc").show(); //Show Banner
	$(".main_image .block").animate({ opacity: 0.85 }, 1 ); //Set Opacity

	//Click and Hover events for thumbnail list
	$(".image_thumb2 ul li.lileckted").addClass('active'); 
	
	$(".image_thumb2 ul li").click(function(){ 
	
	
		
		
		$(".imgslider_arrow").addClass("hidden");
		$(this).children(".imgslider_arrow").removeClass("hidden");
	
	
		//Set Variables
		var imgAlt = $(this).find('img').attr("alt"); //Get Alt Tag of Image
		
		if($(this).hasClass("li_nr_1049")) {
			var imgTitle = $('.slider_content_blueprint_refs').html(); //Get Main Image URL
		} else {
			var imgTitle = $(this).find('.slider_content_blueprint').html(); //Get Main Image URL
		}
		
		var imgDesc = $(this).find('.block').html(); 	//Get HTML of block
		var imgDescHeight = $(".main_image").find('.block').height();	//Calculate height of block	
		
		if ($(this).is(".active")) {  //If it's already active, then...
			return false; // Don't click through
		} else {
			//Animate the Teaser				
			$(".main_image .block").animate({ opacity: 0, marginBottom: -imgDescHeight }, 0 , function() {
				
				$("#main_image_div").fadeOut(28, function () {
					$("#main_image_div").html(imgTitle).fadeIn(800);
				  });

				
		//		$(".main_image .secundairy_img").attr({ src: imgTitle , alt: imgAlt});
			});
		}
		
		$(".image_thumb2 ul li").removeClass('active'); //Remove class of 'active' on all lists
		$(this).addClass('active');  //add class of 'active' on this list only
		return false;
		
	}) .hover(function(){
		$(this).addClass('hover');
		}, function() {
		$(this).removeClass('hover');
	});
			
	//Toggle Teaser
	$("a.collapse").click(function(){
		$(".main_image .block").slideToggle();
		$("a.collapse").toggleClass("show");
	});
	
	
	
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
	$(".flash_dat_slider_ja").click(function(){ 
	
		var classnaam = "."+$(this).attr("28");
		
		
		
		$(".imgslider_arrow").addClass("hidden");
		$(classnaam).children(".imgslider_arrow").removeClass("hidden");
		
		
		//Set Variables
		var imgAlt = $(classnaam).find('img').attr("alt"); //Get Alt Tag of Image
		
		if($(this).hasClass("flash_dat_slider_refs")) {
			var imgTitle = $('.slider_content_blueprint_refs').html();
		} else {
			var imgTitle = $(classnaam).find('.slider_content_blueprint').html(); //Get Main Image URL
		}
		
		var imgDesc = $(classnaam).find('.block').html(); 	//Get HTML of block
		var imgDescHeight = $(".main_image").find('.block').height();	//Calculate height of block	
		
		if ($(classnaam).is(".active")) {  //If it's already active, then...
			return false; // Don't click through
		} else {
			//Animate the Teaser				
			$(".main_image .block").animate({ opacity: 0, marginBottom: -imgDescHeight }, 0 , function() {
				
				$("#main_image_div").fadeOut(28, function () {
					$("#main_image_div").html(imgTitle).fadeIn(800);
				  });

				
		//		$(".main_image .secundairy_img").attr({ src: imgTitle , alt: imgAlt});
			});
		}
		
		$(".image_thumb2 ul li").removeClass('active'); //Remove class of 'active' on all lists
		$(classnaam).addClass('active');  //add class of 'active' on this list only
		return false;
		
	});
		
		
		
		
		
		
		
		
		

	
//	setInterval( "autoplay28()", 5000 );

	
	
});//Close Function

/*
var counter_autoplay28 = 2;

	
	function autoplay28(){ 
		
//		alert(".li_nr_"+counter_autoplay28);
		
		$(".imgslider_arrow").addClass("hidden");
		$(".li_nr_"+counter_autoplay28).children(".imgslider_arrow").removeClass("hidden");
	
	
		//Set Variables
		var imgAlt = $(".li_nr_"+counter_autoplay28).find('img').attr("alt"); //Get Alt Tag of Image
		var imgTitle = $(".li_nr_"+counter_autoplay28).find('a').attr("href"); //Get Main Image URL
		var imgDesc = $(".li_nr_"+counter_autoplay28).find('.block').html(); 	//Get HTML of block
		var imgDescHeight = $(".main_image").find('.block').height();	//Calculate height of block	
		
		if ($(".li_nr_"+counter_autoplay28).is(".active")) {  //If it's already active, then...
			return false; // Don't click through
		} else {
			//Animate the Teaser				
			$(".main_image .block").animate({ opacity: 0, marginBottom: -imgDescHeight }, 0 , function() {
				$(".main_image img").fadeOut(28, function () {
					$(".main_image img").attr({ src: imgTitle , alt: imgAlt}).fadeIn(800);
				  });

			});
		}
		
		$(".image_thumb2 ul li").removeClass('active'); //Remove class of 'active' on all lists
		$(".li_nr_"+counter_autoplay28).addClass('active');  //add class of 'active' on this list only
		
		counter_autoplay28++;
		if(counter_autoplay28 > 4) {
			counter_autoplay28 = 1;
		}
		return false;
	}
	
	
	
	
	
	*/
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
