		function load_slider()
		{

			$('header_images').setStyles({
					height: '300px',
					opacity: 0
				});
				
			$('overlay_bg').setStyles({
					height: '300px'
				});
			
			
			 $('header_controls_left').morph({
				  'opacity': '1'
				});
				
			$('header_controls_right').morph({
				  'opacity': '1'
				});
				
			$('header_images').morph({
				  'opacity': '1'
				});
				
			$$('#header_images > .slider_image:first-child').morph({
				  'opacity': '1'
				});
					/// end animation in ///	

			var current_project = 1;					
			
			
			$('overlay_bg').addEvent('click', function(){ window.location=($$('#header_images > img:nth-child('+current_project+')').get('link')); });

			$('header_controls_right').addEvent('click', function(){ animate_header('right',0);clearInterval(interval_header); });
			$('header_controls_left').addEvent('click', function(){ animate_header('left',0);clearInterval(interval_header); });
			
			var header_count = $$('#header_images img').length;
			
			var interval_header = setInterval(timerFunction, 8000);
			
			function animate_header(direction,project){
			
				var el = $$('#header_images > .slider_image:nth-child('+current_project+')').getLast();
				


			
			
			el.set('morph', {
				duration: 'short', 
				transition: 'sine:out',
				link: 'cancel',
				onComplete:function(){
					
						el.setStyles({marginLeft:'0px',marginTop:'0px',width:'995px',height:'300'});
						if(direction == 'logo'){current_project = project};
						if(direction == 'left'){current_project--};
						if(direction == 'right'){current_project++};
						if(current_project>header_count){current_project=1};
						if(current_project<1){current_project=header_count};
	
	
						
						$$('#header_images > .slider_image:nth-child('+current_project+')').getLast().setStyles({marginLeft:'117px',marginTop:'33px',width:'760px',height:'229px'});
						$$('#header_images > .slider_image:nth-child('+current_project+')').getLast().set('morph',{transition: 'sine:in'});
						$$('#header_images > .slider_image:nth-child('+current_project+')').getLast().morph({opacity: '1',marginLeft:'0',marginTop:'0',width:'995px',height:'300'});
				}				
				});
				
			
			el.morph({opacity:0,
					marginLeft:'-102px',
					marginTop:'-19px',
					width:'1200px',
					height:'362px'});		

			
	
			
		

			
		

			}
		
			function timerFunction()
			{
				animate_header('right',0);
			}
		
		}
		

		
window.addEvent('load', function() {	 

		
	load_slider();
	   
	   
});
