function load_animations(){
		var gmaps_active = 'no';
		$('html, body').animate({scrollTop: '0px'},100);
		
		var underlay_active = 'no';
		
		var myLatlng = new google.maps.LatLng(51.905616 , 4.459022);
   		var myOptions = {
   		zoom: 14,
   		center: myLatlng,
   		mapTypeId: google.maps.MapTypeId.ROADMAP,
   		disableDefaultUI: true,
   		scrollwheel: false,
		navigationControl: true,
   		navigationControlOptions: {
        style: google.maps.NavigationControlStyle.ZOOM_PAN,
        position: google.maps.ControlPosition.LEFT},
    	}
    	
    	var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
    	var image = 'load/img/Supersteil_gmaps.png';
 		var myLatLng = new google.maps.LatLng(51.903050, 4.459022);
  		var beachMarker = new google.maps.Marker({position: myLatLng,map: map,icon: image});
		
		google.maps.event.addListener(beachMarker, 'click', function() {map.setCenter(new google.maps.LatLng(51.905616, 4.459022));});
		
		$('#google_maps').click(function(){
		if(gmaps_active == 'no'){
			$('#footer_gmaps').animate({height:'400px'},300,'easeOutQuad');
			$('html, body').animate({scrollTop: '5000px'}, 300,'easeOutQuad');
			$('#close_googlemaps').show();
			if (is_old_browser() == 'false') {$('#close_googlemaps').delay(200).animate({opacity: '0.9'},200,'easeOutQuad');}
			gmaps_active = 'yes';
		}
		else {
			$('#footer_gmaps').animate({height:'0px'},400,'easeInOutCubic');
			if (is_old_browser() == 'false') {$('#close_googlemaps').stop().animate({opacity: '0'},200,'easeOutQuad',function(){$(this).hide();})}
			else{$('#close_googlemaps').hide();}
			gmaps_active = 'no';
		}
		})
		.hover(
		function(){if (is_old_browser() == 'false') {$('#google_maps_over').animate({opacity: '1'},100,'easeOutQuad')}},
		function(){if (is_old_browser() == 'false') {$('#google_maps_over').animate({opacity: '0'},100,'easeOutQuad')}}
		)
		
		$('#close_underlay').hide();
		$('#close_underlay').css({top: '10px'});
		$('#close_googlemaps').hide();


		$('#close_underlay')
		.hover(
		function(){if (is_old_browser() == 'false') {if(underlay_active != 'no'){$(this).stop().animate({opacity:'1'},200,'easeOutQuad')}}},
		function(){if (is_old_browser() == 'false') {if(underlay_active != 'no'){$(this).stop().animate({opacity:'0.9'},200,'easeOutQuad')}}}
		)
		.click(function(){
		underlay_active = 'no';
		$('#underlay').animate({height:'0px'},400,'easeInOutQuart');
		if (is_old_browser() == 'false') {$(this).stop().animate({opacity: '0'},200,'easeOutQuad',function(){$(this).hide();})}
		else{$(this).hide();}
		})
		
		$('#close_googlemaps')
		.hover(
		function(){if (is_old_browser() == 'false') {if(gmaps_active != 'no'){$(this).stop().animate({opacity:'1'},200,'easeOutQuad')}}},
		function(){if (is_old_browser() == 'false') {if(gmaps_active != 'no'){$(this).stop().animate({opacity:'0.9'},200,'easeOutQuad')}}}
		)
		.click(function(){
		gmaps_active = 'no';
		$('#footer_gmaps').animate({height:'0px'},400,'easeInOutCubic');
		if (is_old_browser() == 'false') {$(this).stop().animate({opacity: '0'},200,'easeOutQuad',function(){$(this).hide();})}
		else{$(this).hide();}
		})
		
		/// animation in ///
		var $URL = window.location.href.toLowerCase();
				
		if ($URL.indexOf('/home') != -1){
		if (is_old_browser() == 'false') {
			$('#header').css({opacity:'1'});
			$('#header_images').css({height: '548px', opacity:'0'})
			$('#aside2').css({height:'550px', opacity:'0'});
			$('#overlay_bg').css({height:'550px', opacity:'0'});
			$('#header_controls_projects').css({opacity:'1'});
			
			$('#header_controls_left').animate({opacity:'1'});
			$('#header_controls_right').animate({opacity:'1'});
			
			$('#quote').stop().animate({opacity:'1'},400,'easeOutQuad');
			$('#header_images').stop().animate({opacity:'1'},400,'easeOutQuad');
			$('#header_images > img:first-child').stop().animate({opacity: '1'},400,'easeOutQuad');
			$('#aside2').stop().animate({opacity:'1'},400,'easeOutQuad');
			$('#overlay_bg').stop().animate({opacity:'0.4'},400,'easeOutQuad');
			
			$('#footer').stop().animate({opacity:'0'},400,'easeOutCubic',function(){
			$('#latest_content').delay(2000).animate({opacity:'1'},500,'easeOutCubic');
			$('#middle_content').stop().animate({opacity:'1'},500,'easeOutCubic');
			$('#lower_content').stop().animate({opacity:'1'},500,'easeOutCubic');
			$('#footer').stop().animate({opacity:'1'},500,'easeOutCubic');
			$('#latest_content').stop().animate({opacity:'1'},400,'easeOutCubic');
			get_tweets();
			})
		}
		else{
			$('#header_images').css({height: '548px'})
			$('#aside2').css({height:'550px'});
			$('#overlay_bg').css({height:'550px'});
			$('#header_images img').stop().animate({opacity:'0'},0);
			$('#header_images img:first-child').stop().animate({opacity:'1'},0);
			get_tweets();
		}
		}
		else{
		if (is_old_browser() == 'false') {
			$('#header_images > img:first-child').stop().animate({opacity: '1'},400,'easeInOutCubic');
	
			$('body').stop().delay(2000).animate({backgroundColor: '#fff'},1200,'easeOutCubic');
			$('#overlay_bg').stop().delay(2300).animate({opacity:'0.4'},1000,'easeInOutCubic');
			$('#quote').stop().delay(2300).animate({opacity:'1'},1000,'easeOutQuad');
			$('#footer').animate({opacity:'0'},2300,'easeOutCubic',function(){
			
			$('#header_controls_left').animate({opacity:'1'});
			$('#header_controls_right').animate({opacity:'1'});
			
			$('#header_controls_projects').stop().animate({opacity:'1'},1000,'easeOutQuad');
			$('#header').animate({opacity:'1'},1000,'easeOutCubic');
			$('#latest_content').delay(2000).animate({opacity:'1'},1000,'easeOutCubic');
			$('#middle_content').animate({opacity:'1'},1000,'easeOutCubic');
			$('#lower_content').animate({opacity:'1'},1000,'easeOutCubic');
			$('#footer').animate({opacity:'1'},1000,'easeOutCubic');
			$('#latest_content').stop().animate({opacity:'1'},1000,'easeOutCubic');
			get_tweets();
			})
		}
		else{
			$('#header_images').css({height:'550px'});
			$('#aside2').css({height:'550px'});
			$('#overlay_bg').css({height:'550px'});
			$('#header_images img').stop().animate({opacity:'0'},0);
			$('#header_images img:first-child').stop().animate({opacity:'1'},0);
			get_tweets();
		}

		}	
	
	function get_tweets(){
	
	$("#latest_tweets").load("http://www.supersteil.com/inc/latest_twitter.php",function(){
		$('.twitter_reply').hide();
		$('.twitter_retweet').hide();
		
		Cufon.replace('a.GSB, p.GSB, p.twitter_control', {fontFamily: 'Greyscale_Bold'});
		Cufon.replace('header.GDNS_header, header.GDNS, p.GDNS, p.GDNS_small, p.GDNS_text', {fontFamily: 'GrandDesignNeueSerif'});
		
		if (is_old_browser() == 'false') {
			$('#latest_tweets').stop().animate({opacity:'1'},1300,'easeOutCubic',function(){$('#latest_content').css({opacity: '1'});});
			$('#middle_content').stop().animate({opacity:'1'},1300,'easeOutCubic');
		}
					
		$('.tweet').hover(
     	function(event){
     	$(this).stop().animate({'backgroundColor': '#ebebeb'},400,'easeOutQuad');
     
          	if (is_old_browser() == 'false') {
   			$(this).find('.twitter_reply').css({opacity:'0'});
   			$(this).find('.twitter_retweet').css({opacity:'0'});
     		$(this).find('.twitter_reply').animate({opacity:'1'},300,'easeOutQuad');
     		$(this).find('.twitter_retweet').animate({opacity:'1'},300,'easeOutQuad');
     	}
     	$(this).find('.twitter_reply').show();
		$(this).find('.twitter_retweet').show();
     	},
     	function(event){
     	$(this).stop().animate({'backgroundColor': '#ffffff'}, 400,'easeOutQuad');
     	if (is_old_browser() == 'false') {
     		$('.twitter_reply').stop().animate({opacity:'0',backgroundColor:'#333333'},200,'easeOutQuad');
	     	$('.twitter_retweet').stop().animate({opacity:'0',backgroundColor:'#333333'},200,'easeOutQuad');
     	}
     	else{
	     	$(this).find('.twitter_reply').hide();
			$(this).find('.twitter_retweet').hide();
		}
     	//$(this).find('.twitter_reply').stop().animate({opacity:'0'},300,'easeOutQuad');
     	//$(this).find('.twitter_retweet').stop().animate({opacity:'0'},300,'easeOutQuad');
     	
     	});
     	
     	$('.twitter_reply')
     	.hover(
     	function(){$(this).stop().animate({opacity:'1',backgroundColor:'#00aef0'},100,'easeOutQuad')},
     	function(){$(this).stop().animate({backgroundColor:'#333333'},100,'easeOutQuad')}
     	)
     	.click(function(){window.open('http://twitter.com/home?status=@'+$(this).parent().parent().attr("account")+'%20');})
     	
     	$('.twitter_retweet')
     	.hover(
     	function(){$(this).stop().animate({opacity:'1',backgroundColor:'#00aef0'},100,'easeOutQuad')},
     	function(){$(this).stop().animate({backgroundColor:'#333333'},100,'easeOutQuad')}
     	)
     	.click(function(){window.open('http://twitter.com/home?status='+$(this).parent().parent().attr("tweet")+' (via @'+$(this).parent().parent().attr("account")+')');})
    });
    };
    
		/// end animation in ///		
	
		var current_project = 1;
 		var header_color = $('.header_image').attr('color');
 		     	
     	$('#aside2').css({backgroundColor: header_color});
     	 
     	$('#aside1').hover(
     	function(event){$(this).stop().animate({opacity:'0.6'},200,'easeOutCubic')},
     	function(event){$(this).stop().animate({opacity:'1'},200,'easeOutCubic')}
     	);
     	
     	
     	
     	$('.footer_social_icon')
		.hover(
		function(event){$(this).stop().animate({backgroundColor: '#ffffff'},150,'easeOutQuad')},
		function(event){$(this).stop().animate({backgroundColor: '#f4f5f6'},150,'easeOutQuad')}		
		)
		     	    	
     	$('.news_readmore')
		.hover(
		function(event){$(this).stop().animate({backgroundPosition:"(0px 0px)"}, 350, 'easeOutCubic')},
		function(event){$(this).stop().animate({backgroundPosition:"(-150px 0px)"}, 400, 'easeOutCubic')}	
		);

if((!navigator.userAgent.match(/iPhone/i)) && (!navigator.userAgent.match(/iPad/i))) {
		$('.nav_link')
		.hover(
		function(event){$(this).find('.image_holder').stop().animate({width:'100%'}, 200, 'easeOutCubic')},
		function(event){$(this).find('.image_holder').stop().animate({width:'0px'}, 250,'easeOutCubic')}
		)
}

		$('#btn_all_news')
		.hover(
		function(event){$(this).find('#btn_all_news_holder').stop().animate({width:'100%'}, 200, 'easeOutCubic')},
		function(event){$(this).find('#btn_all_news_holder').stop().animate({width:'0px'}, 250,'easeOutCubic')}
		)
		
		$('.project')
		.hover(
		function(event){
		if($(this).attr('link') != 'yourwork'){
		$(this).find('.mask').stop().animate({top: '-8px', left: '-8px', width: '336px', height: '221'}, 150, 'easeOutQuad');
		$(this).find('#gradient_overlay').css({height:'190px'});
		$(this).find('.button').css({height:'28px'});
		
		if (is_old_browser() == 'false') {
			$(this).find('#gradient_overlay').stop().animate({opacity:'1'}, 100, 'easeOutQuad', function(){
				$(this).parent().find('.button').stop().animate({opacity: '1', top: '88px'},100,'easeOutQuad');
			});
		}
		}},
		function(event){
		$(this).find('.mask').stop().animate({top: '0px', left: '0px', width: '321px', height: '205'}, 200, 'easeOutQuad');
		if (is_old_browser() == 'false') {
			$(this).find('#gradient_overlay').stop().animate({opacity:'0'}, 150, 'easeOutQuad');
			$(this).find('.button').stop().animate({opacity:'0', top:'98'}, 100, 'easeOutQuad');
		}
		else{
		$(this).find('#gradient_overlay').css({height:'0px'});
		$(this).find('.button').css({height:'0px'});
		}
		}
		)
		.click(function(event){
		if($(this).attr('link') == 'yourwork'){alert('Thnx for your interest!')}
		else{window.location=('http://www.supersteil.com/work/'+$(this).attr('link'));}
		})
		
		$('.logo_project')
		.hover(
		function(event){
		if (is_old_browser() == 'false') {$(this).stop().animate({opacity: '1'},200,'easeOutCubic')}
		},
		function(event){
		if (!$.browser.msie && current_project != ($(this).index()+1)){$(this).stop().animate({opacity: '0.5'},200,'easeOutCubic')}
		})
		.click(function(event){if ($(this).index()+1 != current_project){animate_header('logo',$(this).index()+1);clearInterval(interval_header);}});
		
		$('#overlay_bg').click(function(event){
		window.location=('http://www.supersteil.com/'+$('#header_images > img:nth-child('+current_project+')').attr('link'));
		})
		.hover(
		function(event){
		$('#header_controls_left').show();
		$('#header_controls_right').show();
		if (is_old_browser() == 'false') {
			$('#header_controls_left').stop().animate({left:'0px'},200,'easeOutQuad');
			$('#header_controls_right').stop().animate({right:'0px'},200,'easeOutQuad');
		}},
		function(event){
		$('#header_controls_left').hide();
		$('#header_controls_right').hide();
		if (is_old_browser() == 'false') {
			$('#header_controls_left').stop().animate({left:'10px'},300,'easeOutQuad');
			$('#header_controls_right').stop().animate({right:'10px'},300,'easeOutQuad');
		}})
		
		$('#header_controls_right')
		.hover(
		function(event){
			$(this).show();
			$('#header_controls_left').show();
			$(this).stop().animate({backgroundPosition: '15px 245px'},100,'easeOutQuad')
		},
		function(event){
			$(this).hide();
			$(this).stop().animate({backgroundPosition: '10px 245px'},100,'easeOutQuad')
		})
		.click(function(event){animate_header('right',0);clearInterval(interval_header);})
		
		$('#header_controls_left')
		.hover(
		function(event){
			$(this).show();
			$('#header_controls_right').show();
			$(this).stop().animate({backgroundPosition: '25px 245px'},100,'easeOutQuad')
		},
		function(event){
		$(this).hide();
		$(this).stop().animate({backgroundPosition: '30px 245px'},100,'easeOutQuad')
		})
		.click(function(event){animate_header('left',0);clearInterval(interval_header);})
		
		document.onkeyup = handleArrowKeys;
		
		function handleArrowKeys(evt) {
		if (evt.keyCode == 37){animate_header('left',0);clearInterval(interval_header);}
		if (evt.keyCode == 39){animate_header('right',0);clearInterval(interval_header);}
		}
		
		
		function animate_header(direction,project){
		if (is_old_browser() == 'false') {
		$('#header_images > img:nth-child('+current_project+')').stop().animate({opacity:'0'},400,'easeInQuad', function(){
		
		$('#header_controls_projects > img:nth-child('+current_project+')').stop().animate({opacity: '0.5'},200,'easeOutCubic')

		if(direction == 'logo'){current_project = project};
		if(direction == 'left'){current_project--};
		if(direction == 'right'){current_project++};
		if(current_project>5){current_project=1};
		if(current_project<1){current_project=5};
		
		$('#header_controls_projects > img:nth-child('+current_project+')').stop().animate({opacity: '1'},200,'easeOutCubic');
		var new_color = $('#header_images > img:nth-child('+current_project+')').attr('color');
		$('#aside2').animate({backgroundColor: new_color},200,'easeOutCubic');
		$('#header_images > img:nth-child('+current_project+')').stop().delay(200).animate({opacity: '1'},400,'easeOutCubic');
		});
		}
		else{
		$('#header_images > img:nth-child('+current_project+')').stop().animate({opacity:'0'},150,'easeInQuad', function(){

		if(direction == 'logo'){current_project = project};
		if(direction == 'left'){current_project--};
		if(direction == 'right'){current_project++};
		if(current_project>5){current_project=1};
		if(current_project<1){current_project=5};
		
		var new_color = $('#header_images > img:nth-child('+current_project+')').attr('color')
		$('#aside2').animate({backgroundColor: new_color},80,'easeOutQuart');
		$('#header_images > img:nth-child('+current_project+')').stop().animate({opacity: '1'},150,'easeInQuad');
		});
		}
		}
				
		$('.input_text').val("Enter your email address");
		
		$('.input_text')
		.focusin(function(){
		if ($(this).val() == "You're on our mailing list" || $(this).val() == "Enter your email address"){$(this).val('')}
		email_validation($(this).val(),$(this).parent());
		$(this).parent().parent().animate({borderBottomColor:'#999999',borderTopColor:'#999999',borderRightColor:'#999999',borderLeftColor:'#999999'},300,'easeOutQuad');
		$(this).css({color:'#666666'})
		})
		.focusout(function(){$(this).parent().parent()
		.animate({borderBottomColor:'#f4f5f7',borderTopColor:'#f4f5f7',borderRightColor:'#f4f5f7',borderLeftColor:'#f4f5f7'},300,'easeOutQuad');
		if($(this).val().length < 1){$(this).parent().find('.input_submit').attr({src: 'css/img/form_arrow.png'}); $(this).val('Enter your email address');$(this).css({color:'#acacac'})}
		})
		.keyup(function(){email_validation($(this).val(),$(this).parent());})
		
		
		$('.email_form')
		.submit(function(){
		var temp_email = $(this).find('.email_f > .input_text').val();
		if(temp_email.indexOf('@')!=-1 && temp_email.indexOf('.')!=-1 && temp_email.length>6&&(temp_email.length)-(temp_email.lastIndexOf('.'))>2){
		$.post("http://www.supersteil.com/inc/newsletter/add_newsletter.php",{username: temp_email })
		$(this).find('.email_f > .input_submit').attr({src: 'css/img/form_final_send.png'});
		$(this).find('.email_f > .input_text').animate({opacity:'0'},200,'easeOutQuad', function(){
			$(this).val("You're on our mailing list");
			$(this).animate({opacity:'1'},200,'easeOutQuad');	
			
		});return false;
		}
		else if($(this).find('.email_f > .input_submit').attr('src') == 'css/img/form_inactive.png'){
		$(this).stop().animate({borderBottomColor:'#dd0d0d',borderTopColor:'#dd0d0d',borderRightColor:'#dd0d0d',borderLeftColor:'#dd0d0d'},300,'easeOutQuad');
		return false;
		}
		else if($(this).find('.email_f > .input_submit').attr('src') == 'css/img/form_final_send.png'){
		$(this).find('.email_f > .input_text').animate({opacity:'0'},200,'easeOutQuad', function(){
			$(this).val('');
			$(this).animate({opacity:'1'},200,'easeOutQuad');		
		});
		$(this).find('.email_f > .input_submit').attr({src: 'css/img/form_arrow.png'});return false
		}
		else if($(this).find('.email_f > .input_submit').attr('src') == 'css/img/form_send.png'){
		$.post("http://www.supersteil.com/inc/newsletter/add_newsletter.php",{username: temp_email })
		$(this).find('.email_f > .input_submit').attr({src: 'css/img/form_final_send.png'});
		$(this).find('.email_f > .input_text').animate({opacity:'0'},200,'easeOutQuad', function(){
			$(this).val("You're on our mailing list");
			$(this).animate({opacity:'1'},200,'easeOutQuad');	
			
		});	return false;
		}
		else{return false}
		})
		
		
		$('.input_submit')
		.focusin(function(){email_validation($(this).parent().find('.input_text').val(),$(this).parent());})
		.focusout(function(){if($(this).parent().find('.input_text').val().length < 1){$(this).attr({src: 'css/img/form_arrow.png'});}})
		
		function email_validation(email,object){
		if(email.indexOf('@')!=-1 && email.indexOf('.')!=-1 && email.length>6&&(email.length)-(email.lastIndexOf('.'))>2){
		if(object.find('.input_submit').attr('src') != 'css/img/form_final_send.png'){
			object.find('.input_submit').attr({src: 'css/img/form_send.png'});
			object.parent().stop().animate({borderBottomColor:'#999999',borderTopColor:'#999999',borderRightColor:'#999999',borderLeftColor:'#999999'},300,'easeOutQuad');
		}}
		else{object.find('.input_submit').attr({src: 'css/img/form_inactive.png'});}
		}
		
		$('#go_search').click(function(){
		if (is_old_browser() == 'false') {$(this).stop().animate({opacity: '0.6'},200,'easeOutQuad')}
		if(underlay_active == 'no'){
		$('#underlay').animate({height:'80px'},400,'easeInOutQuart');
		underlay_active = 'search';
		$('#close_underlay').show();
		if (is_old_browser() == 'false') {$('#close_underlay').delay(200).animate({opacity: '0.9'},200,'easeOutQuad')}
		}
		else{
		$('#underlay').animate({height:'0px'},400,'easeInOutQuart');
		underlay_active = 'no';
		if (is_old_browser() == 'false') {$('#close_underlay').stop().animate({opacity: '0'},200,'easeOutQuad',function(){$('#close_underlay').hide();})}
		else{$('#close_underlay').hide();}
		}
		})
		.hover(
		function(){if (is_old_browser() == 'false') {$(this).stop().animate({opacity: '1'},200,'easeOutQuad')}},
		function(){if (is_old_browser() == 'false') {$(this).stop().animate({opacity: '0.6'},200,'easeOutQuad')}}
		)
		
		$('#go_login').click(function(){
		if (is_old_browser() == 'false') {$(this).stop().animate({opacity: '0.6'},200,'easeOutQuad')}
		window.open('https://supersteil.basecamphq.com/login');
		})
		.hover(
		function(){if (is_old_browser() == 'false') {$(this).stop().animate({opacity: '1'},200,'easeOutQuad')}},
		function(){if (is_old_browser() == 'false') {$(this).stop().animate({opacity: '0.6'},200,'easeOutQuad')}}
		)

		
		$('#search_form').find('.underlay_f').submit(function(){
		
	
		if ($(this).find('.search_text').val() != '' && $(this).find('.search_text').val() != 'Type your search here' && $(this).find('.search_text').val().length > 1){
		$('#search_results').load('http://www.supersteil.com/inc/search.php', {$words : $(this).find('.search_text').val()}, function(){
			
			Cufon.replace('header.GDNS_header, header.GDNS, p.GDNS, p.GDNS_small, p.GDNS_text', {fontFamily: 'GrandDesignNeueSerif'});
			var $height1 = $('#results_news').height();
			var $height2 = $('#results_work').height();
			var $final_height = '';
			
			if ($height1 > $height2){$('#underlay').animate({height:$height1+200},400,'easeInOutQuart');}
			else{$('#underlay').animate({height:$height2+200},600,'easeInOutQuart');}
			
			$('#search_results section section')
			.hover(
			function(){
			$(this).find('.name').css({color: '#00aef0'});
			Cufon.replace('header.GDNS_header, header.GDNS, p.GDNS, p.GDNS_small, p.GDNS_text', {fontFamily: 'GrandDesignNeueSerif'});
			},
			function(){
			$(this).find('.name').css({color: '#ffffff'});
			Cufon.replace('header.GDNS_header, header.GDNS, p.GDNS, p.GDNS_small, p.GDNS_text', {fontFamily: 'GrandDesignNeueSerif'});
			})
			
			$('#search_results section section').click(function(){
				open_url($(this).attr('link'));
			});
			
			function open_url($LINK){
				underlay_active = 'no';
				$('#underlay').animate({height:'0px'},400,'easeInOutQuart');
				$('#close_underlay').delay(200).animate({opacity: '0'},200,'easeOutQuad',function(){
					$('#close_underlay').hide();
					window.open($LINK,'_self');
				})
			}
			
		})
		}
		
		return false;
		});
		
		
		var interval_header = setInterval(timerFunction, 6000);
		
		function timerFunction(){
		animate_header('right',0);
		}
		
		
		$('#btn_supersteil_team')
		.click(function(){$(this).find('figure').animate({left: '345px', opacity:'0'},200,'easeOutQuad',function(){
		window.open('about/team.php','_self');
		});})
		.hover(
		function(){$(this).find('figure').animate({left: '360px', opacity:'1'},150,'easeOutQuad');},
		function(){$(this).find('figure').animate({left: '345px', opacity:'0'},200,'easeOutQuad');}
		)
	
		/* footer send email */
		$('#footer_send_email')
		.click(
		function(){
		$('#form_send_email > input:nth-child(1)').val('Your name*');
		$('#form_send_email > input:nth-child(2)').val('Your email*');
		$('#form_send_email > input:nth-child(3)').val('Friends name*');
		$('#form_send_email > input:nth-child(4)').val('Friends email*');
		$('#send_email_submit').css({cursor:'pointer'});
		$('#form_send_email > input:nth-child(1)').animate({borderBottomColor:'#cccccc',borderTopColor:'#cccccc',borderRightColor:'#cccccc',borderLeftColor:'#cccccc'},300,'easeOutQuad');
		$('#form_send_email > input:nth-child(2)').animate({borderBottomColor:'#cccccc',borderTopColor:'#cccccc',borderRightColor:'#cccccc',borderLeftColor:'#cccccc'},300,'easeOutQuad');

		if (is_old_browser() == 'false') {
			$('#email_overlay_bg').css({opacity: '0'});
			$('#email_overlay_bg').animate({opacity: '1'},300,'easeOutQuad');
			$('#email_overlay_holder').css({opacity:'0'});
			$('#email_overlay_holder').delay(200).animate({opacity: '1', top: '35%'},250,'easeOutQuad');
		}
		
		else {$('#email_overlay_holder').css({top:'33%'});}
		
		$('#email_overlay_bg').css({width: '100%'});
		
		
		
		$('#form_send_email > input:nth-child(3)').hide();
		$('#form_send_email > input:nth-child(4)').hide();
		$('#form_send_email > textarea').show();
		$('#form_send_email').css({height:'161px'});
		})
		
		$('#form_send_email > textarea')
		.click(function(){
		if ($(this).html() == 'Enter your message'){$(this).html('')}
		$(this).css({color:'#666666'})
		$('#form_send_email > textarea').animate({borderBottomColor:'#666666',borderTopColor:'#666666',borderRightColor:'#666666',borderLeftColor:'#666666'},300,'easeOutQuad');
		$('#form_send_email > input:nth-child(1)').animate({borderBottomColor:'#cccccc',borderTopColor:'#cccccc',borderRightColor:'#cccccc',borderLeftColor:'#cccccc'},300,'easeOutQuad');
		$('#form_send_email > input:nth-child(2)').animate({borderBottomColor:'#cccccc',borderTopColor:'#cccccc',borderRightColor:'#cccccc',borderLeftColor:'#cccccc'},300,'easeOutQuad');
		})
		.focusin(function(){$(this).css({color:'#666666'})})
		
		$('#email_overlay_holder > .send_email_close')
		.hover(
		function(){$(this).animate({opacity:'1'},200,'easeOutQuad')},
		function(){$(this).animate({opacity:'0.8'},200,'easeOutQuad')}
		)
		.click(function(){
		if ($.browser.msie) {$('#email_overlay_bg').css({width: '0px'})}
		else{$('#email_overlay_holder').stop().animate({opacity: '0', top: '33%'},200,'easeOutQuad');}
		
		$('#email_overlay_spot').delay(150).animate({opacity: '0'},200,'easeOutCubic',function(){
		$('#email_overlay_bg').css({width: '0px'});});
		if (is_old_browser() == 'false') {$('#email_overlay_bg').animate({opacity: '0'},300,'easeOutQuad');}
		})
		
		$('#form_send_email > input:nth-child(1)').val('Your name*');
		$('#form_send_email > input:nth-child(2)').val('Your email*');
		$('#form_send_email > input:nth-child(3)').val('Friends name*');
		$('#form_send_email > input:nth-child(4)').val('Friends email*');
		
			
		$('#form_send_email > input')
		.focusin(function(){
		$(this).val('');
		$(this).animate({borderBottomColor:'#666666',borderTopColor:'#666666',borderRightColor:'#666666',borderLeftColor:'#666666'},300,'easeOutQuad');
		$(this).css({color:'#666666'})
		$('#form_send_email > textarea').animate({borderBottomColor:'#cccccc',borderTopColor:'#cccccc',borderRightColor:'#cccccc',borderLeftColor:'#cccccc'},300,'easeOutQuad');
		})
		
		$('#form_send_email > input:nth-child(1)')
		.focusout(function(){
		
		$(this).animate({borderBottomColor:'#cccccc',borderTopColor:'#cccccc',borderRightColor:'#cccccc',borderLeftColor:'#cccccc'},300,'easeOutQuad');
		if($(this).val() == ''){$(this).val('Your name*');$(this).css({color:'#999999'});}
		})
		
		$('#form_send_email > input:nth-child(2)')
		.focusout(function(){
		$(this).animate({borderBottomColor:'#cccccc',borderTopColor:'#cccccc',borderRightColor:'#cccccc',borderLeftColor:'#cccccc'},300,'easeOutQuad');
		if($(this).val() == ''){$(this).val('Your email*');$(this).css({color:'#999999'});}
		})
		
		$('#form_send_email > input:nth-child(3)')
		.focusout(function(){
		$(this).animate({borderBottomColor:'#cccccc',borderTopColor:'#cccccc',borderRightColor:'#cccccc',borderLeftColor:'#cccccc'},300,'easeOutQuad');
		if($(this).val() == ''){$(this).val('Friends name*');$(this).css({color:'#999999'});}
		})
		
		$('#form_send_email > input:nth-child(4)')
		.focusout(function(){
		$(this).animate({borderBottomColor:'#cccccc',borderTopColor:'#cccccc',borderRightColor:'#cccccc',borderLeftColor:'#cccccc'},300,'easeOutQuad');
		if($(this).val() == ''){$(this).val('Friends email*');$(this).css({color:'#999999'});}
		})
				
		$('#send_email_submit')
		.hover(
		function(){$(this).find('figure').stop().animate({width: '100%'},200,'easeOutCubic');},
		function(){$(this).find('figure').stop().animate({width: '0px'},200,'easeOutCubic');}
		)
		.click(function(){
		share_email_validation('');
		})
		
		
		/* Buttons linkage*/
		$('#menu_work').click(function(){URL_animation("/work");})
		$('#menu_news').click(function(){URL_animation("/news");})
		$('#menu_about').click(function(){URL_animation("/about");})
		$('#menu_career').click(function(){URL_animation("/career");})
		$('#menu_contact').click(function(){URL_animation("/contact");})
		$('#quote').click(function(){URL_animation("/about");})
			
		if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPad/i))) {
			$('body').find('*').hover(
			function(){$(this).click();}
			);
		}
		
}

function clear_me(){
	if ($('#form_send_email > textarea').html() == 'Enter your message'){$('#form_send_email > textarea').html('')}
	$('#form_send_email > textarea').animate({borderBottomColor:'#666666',borderTopColor:'#666666',borderRightColor:'#666666',borderLeftColor:'#666666'},300,'easeOutQuad');
}

function URL_animation($URL){
if (is_old_browser() == 'false'){

	$('#header').stop().animate({opacity:'0'},400,'easeOutCubic');
	$('#quote').stop().animate({opacity:'0'},400,'easeOutQuad');
	$('#latest_tweets').stop().animate({opacity:'0'},400,'easeOutCubic');
	$('#latest_content').stop().animate({opacity:'0'},400,'easeOutCubic');
	$('#middle_content').stop().animate({opacity:'0'},400,'easeOutCubic');
	$('#lower_content').stop().animate({opacity:'0'},400,'easeOutCubic');
	$('#footer').stop().animate({opacity:'0'},400,'easeOutCubic');
		
	if ($.browser.msie && parseInt($.browser.version) >=9){
		$('#header_images').stop().animate({opacity:'0'},400,'easeOutCubic');
		$('#overlay').stop().animate({opacity:'0'},400,'easeOutCubic');
		$('#header_controls_projects').stop().animate({opacity:'0'},400,'easeOutCubic');
		$('#aside2').stop().animate({opacity:'0'},400,'easeOutCubic',function(){
			window.open('http://www.supersteil.com'+$URL,'_self');
		});
	}else{
		$('#aside2').delay(300).animate({opacity:'0'},400,'easeOutCubic',function(){
			window.open('http://www.supersteil.com'+$URL,'_self');
		});
	}
}
else{
	window.open('http://www.supersteil.com'+$URL,'_self');
}	
}

function is_old_browser(){
	var _browser = 'false';
	if ($.browser.msie && parseInt($.browser.version) <9){_browser = 'true';}
	return _browser;
}
