var Intro = (function(){
	var instance = function(){
		var constructor = function(){
			$('MainContainer').style.filter= 'alpha(opacity=0)';
			$('MainContainer').style.MozOpacity = '0.0';

			paint();
			
		};

		var BeginIntroB = function (){
			var img1 = document.createElement('img');
			
			img1.className = 'ImageIntro';
			img1.src = '/gallery/images/mn/IMGP3454.jpg';
			
			img1.width = (img1.width*1.2);
			img1.height = (img1.height*1.2);
			
			var img2 = document.createElement('img');
			img2.className = 'ImageIntro';
			img2.src = '/gallery/images/mn/_IGP3602.jpg';

			var img3 = document.createElement('img');
			img3.className = 'ImageIntro';
			img3.src = '/gallery/images/mn/_IGP4019.jpg';
			img3.width = (img3.width*1.1);
			img3.height = (img3.height*1.1);


			var img4 = document.createElement('img');
			img4.className = 'ImageIntro';
			img4.src = '/gallery/images/mn/_IGP4490.jpg';

			var img5 = document.createElement('img');
			img5.className = 'ImageIntro';
			img5.src = '/gallery/images/mn/_IGP4669.jpg';

			var img6 = document.createElement('img');
			img6.className = 'ImageIntro';
			img6.src = '/gallery/images/mn/_IGP2637.jpg';

			var img7 = document.createElement('img');
			img7.className = 'ImageIntro';
			img7.src = '/gallery/images/mn/_IGP4120.jpg';

			var img8 = document.createElement('img');
			img8.className = 'ImageIntro';
			img8.src = '/gallery/images/mn/_IGP8640.jpg';

			var img9 = document.createElement('img');
			img9.className = 'ImageIntro';
			img9.src = '/gallery/images/mn/_MAV1249-Edit.jpg';

			for (i = 1 ; i < 10 ; i++){
				eval("img" + i + ".style.filter= 'alpha(opacity=0)'");
				eval("img" + i + ".style.MozOpacity = '0.0'");
				eval("$('Intro').appendChild(img" + i + ")");
			}
			//$('Intro').appendChild(img1);
			//new Effect.Opacity(img1, { from: 0.0, to: 1.0, duration: 1.5 });


			$(img1).fade({ duration: 0.8, from: 0, to: 1, afterFinish:function () {
			$(img4).fade({ duration: 0.8, from: 0, to: 1, afterFinish:function () {
			$(img6).fade({ duration: 0.8, from: 0, to: 1, afterFinish:function () {
			$(img2).fade({ duration: 0.8, from: 0, to: 1, afterFinish:function () {
			$(img5).fade({ duration: 0.8, from: 0, to: 1, afterFinish:function () {
			$(img7).fade({ duration: 0.8, from: 0, to: 1, afterFinish:function () {
			$(img3).fade({ duration: 0.8, from: 0, to: 1, afterFinish:function () {
			$(img8).fade({ duration: 0.8, from: 0, to: 1, afterFinish:function () {
			$(img9).fade({ duration: 0.8, from: 0, to: 1, afterFinish:function () {
			$('MainContainer').style.display = 'block';

			$('Intro').fade({duration: 2.2, from: 1, to: 0, 
				afterFinish:function () {
//						$('MainContainer').style.filter= 'alpha(opacity=0)';
//						$('MainContainer').style.MozOpacity = '0.0';
						$('MainContainer').style.display = 'block';

							//$('MainContainer').fade({ duration: 4.0, from: 0, to: 1, afterFinish:function () {
							//$('MainContainer').style.filter= 'alpha(opacity=100)';
							//$('MainContainer').style.MozOpacity = '1.0';																		   
						//}});
						
						
						$('Intro').style.display = 'none';
				}
				});
					//{duration:1.1},
					
			}});		
			}});		
			}});		
			}});		
			}});		
			}});		
			}});		
			}});
			}});
			
		/*	$(img2).fade({ duration: 3.0, from: 0, to: 1 });
			$(img3).fade({ duration: 3.0, from: 0, to: 1 });
			$(img4).fade({ duration: 3.0, from: 0, to: 1 });
			$(img5).fade({ duration: 3.0, from: 0, to: 1 });
			$(img6).fade({ duration: 3.0, from: 0, to: 1 });
			$(img7).fade({ duration: 3.0, from: 0, to: 1 });
			$(img8).fade({ duration: 3.0, from: 0, to: 1 });
			$(img9).fade({ duration: 3.0, from: 0, to: 1 });
*/

		};
		var BeginIntro = function (){
			//$('DivImg1').style.backgroundImage= 'url(/gallery/images/gr/_IGP3602.jpg)';
			//$('DivImg1').morph('background-position: -100px',  {duration:3.1});			
			//$('DivImg2').style.backgroundImage= 'url(/gallery/images/gr/_IGP4490.jpg)';
			//$('DivImg2').morph('background-position: 100px',  {duration:3.1});			

			};
		var BeginIntroC = function (){
			var img1 = document.createElement('img');
			img1.className = 'ImageIntro';
			img1.id = 'img1';
			img1.style.width = '0px';
			img1.style.height = '0px';
			img1.src = '/gallery/images/gr/IMGP3454.jpg';
			$('Intro').appendChild(img1)
			$('img1').morph('width:600px; height : 400px;',  {duration:0.5}); 
			new Effect.Move($('img1'), { x: 500, y: 200, mode: 'relative', duration:0.5, afterFinish:function () {
				new Effect.Move($('img1'), { x: -150, y: -200, mode: 'relative', duration:0.5 });
			}});
	
		};
	
		var paint = function(){
			BeginIntroC();
			//$('MainContainer').style.display = 'block';
		};

	constructor();
	};
	return instance;
})();


