jQuery(document).ready(	function(){
		$("#proiector").css({display: "block"});
		$("#logos").css({display: "block"});
		$("#logoa").fadeIn(500).css({display: "block"}).fadeOut(400).fadeIn(300).css({display: "block"}).fadeOut(200).fadeIn(100).css({display: "block"}).fadeOut(100).fadeIn(100).css({display: "block"}).fadeOut(100).fadeIn(100).css({display: "block"}).fadeOut(100).fadeIn(100).css({display: "block"});
		$("#player").html("<object width='1' height='1' data='http://zoomevents.ro/player.swf' type='application/x-shockwave-flash'><param value='http://zoomevents.ro/player.swf' name='movie'><param value='mp3=http://zoomevents.ro/3.mp3&amp;showslider=0&amp;autoplay=1&amp;width=1' name='FlashVars'></object>");
		setTimeout(function(){ 
				$("body").css({background: "#000000 url(images/bg.jpg) center top no-repeat"});	
				$("#lumina").css({display: "block"});
			}, 2700);
			setTimeout(function(){ 
				$("#tvcont").fadeIn(700).css({display: "block"});
				$("#menu").fadeIn(500).css({display: "block"});
				$("#tvefect").fadeIn(650).css({display: "block"});
				$("#tv").fadeIn(600).css({display: "block"});
				$("#bgbottom").fadeIn(800).css({display: "block"});
							
			}, 3300);
			setTimeout(function(){ 
				$("#scaun").fadeIn(800).css({display: "block"});
				$("#camera").fadeIn(800).css({display: "block"});
			}, 4000);
			setTimeout(function(){ 
				$("#intro").html("<embed type='application/x-shockwave-flash' id='single2' name='single2' src='playervideo.swf' width='445' height='340' bgcolor='#000000' allowscriptaccess='always' allowfullscreen='false' wmode='transparent' style='z-index:0;' flashvars='file=intro.flv&autostart=true&controlbar=none&stretching=fill&volume=80&icons=false'/>");}, 5000);
			setTimeout(function(){ 
				$("#intro").empty();
				$("#intro").html("<img src='intro.png' style='margin-top:60px;margin-left:4px;'/>");
			}, 12000);	
				$("#boxprivate").empty().css({display: "none"});
			if($(window).height() >= 770){
				$("#top").css({height: ""+$(window).height()-609+"px"});
				
			} else {
			}
			
			$("body").hover(function () {
				if($(window).height() >= 770){
				$("#top").css({height: ""+$(window).height()-609+"px"});
		
			} else {
				
			}
			});
			$("#despre").click(function () { 
				$("#boxdespre").fadeIn(1000);  
				$("#boxprivate").empty().css({display: "none"});
				$("#boxcorporate").empty().css({display: "none"});
				$("#boxcontact").css({display: "none"});
				$("#onhover").css({display: "none"})
				$("#intro").css({display: "none"})
				   return false;
    		});
    		$("#contact").click(function () { 
				$("#boxcontact").fadeIn(1000);
				$("#boxprivate").empty().css({display: "none"});
				$("#boxcorporate").empty().css({display: "none"});
				$("#boxdespre").css({display: "none"});
				$("#onhover").css({display: "none"})
				$("#intro").css({display: "none"})
				   return false;
    		});
    		$("#corporate").click(function () { 
				$("#boxcontact").css({display: "none"});
				$("#boxprivate").empty().css({display: "none"});
				$("#boxdespre").css({display: "none"});
				$("#boxcorporate").css({display: "block"}).fadeIn(1000);
				$(".changevideo").attr("id", "videocorporate");
				$("#onhover").css({display: "block"})
				$("#intro").css({display: "none"})
				$.ajax({
					type: "POST",
					url: "http://zoomevents.ro/server.php",
					data: "action=firstcorporate",
					dataType: "html",
					cache: true,
				   success: function(med){
				   	$("#boxcorporate").html(med).fadeIn(1000);
   				}
   				});
   				setTimeout(function(){ 
					$("#onfilm").fadeIn(1000);
					$(".changevideo").fadeIn(1000);
				}, 10000);
   				setTimeout(function(){ 
					$("#onfilm").fadeOut(1000);
					$(".changevideo").fadeOut(1000);
				}, 15000);
				   return false;
    		});
    		$("#private").click(function () { 
				$("#boxcontact").css({display: "none"});
				$("#boxcorporate").empty().css({display: "none"});
				$("#boxdespre").css({display: "none"});
				$("#intro").css({display: "none"})
				$(".changevideo").attr("id", "videoprivate");
				$("#onhover").css({display: "block"});
				$("#boxprivate").css({display: "block"}).fadeIn(1000);
				$.ajax({
					type: "POST",
					url: "http://zoomevents.ro/server.php",
					data: "action=firstprivate",
					dataType: "html",
					cache: true,
				   success: function(medp){
				   	$("#boxprivate").html(medp).fadeIn(1000);
   				}
   				});
   				setTimeout(function(){ 
					$("#onfilm").fadeIn(1000);
					$(".changevideo").fadeIn(1000);
				}, 10000);
   				setTimeout(function(){ 
					$("#onfilm").fadeOut(1000);
					$(".changevideo").fadeOut(1000);
				}, 15000);			
				   return false;
    		});
    		
    		$("#onhover").mouseenter(function(){
      			$("#onfilm").fadeIn();
    		 	$(".changevideo").css({display: "block"});
    		}).mouseleave(function(){
      			$("#onfilm").fadeOut();
				$(".changevideo").css({display: "none"});
    		});
			$("#onfilm").mouseenter(function(){
      			$("#onfilm").css({display: "block"});
    		 	$(".changevideo").css({display: "block"});
    		}).mouseleave(function(){
      			$("#onfilm").css({display: "none"});
				$(".changevideo").css({display: "none"});
    		});
    		$("#next").mouseenter(function(){
      			$("#onfilm").css({display: "block"});
    		 	$(".changevideo").css({display: "block"});
    		}).mouseleave(function(){
      			$("#onfilm").css({display: "none"});
				$(".changevideo").css({display: "none"});
    		});
    		$("#prev").mouseenter(function(){
      			$("#onfilm").css({display: "block"});
    		 	$(".changevideo").css({display: "block"});
    		}).mouseleave(function(){
      			$("#onfilm").css({display: "none"});
				$(".changevideo").css({display: "none"});
    		});
    		$(".changevideo").mouseenter(function(){
      			$("#onfilm").fadeIn();
    		 	$(".changevideo").css({display: "block"});
    		}).mouseleave(function(){
      			$("#onfilm").fadeOut();
				$(".changevideo").css({display: "none"});
    		});
    		
    		$("#next").click(function(){
    			
    			var tip = $(".changevideo").attr("id");
    			var id = $(".changevideo").attr("rel");
    			if(tip != "" && id != ""){
    				$.ajax({
					type: "POST",
					url: "http://zoomevents.ro/server.php",
					data: "id="+id+"&tip="+tip+"&action=getvideonext",
					dataType: "html",
					cache: true,
				   success: function(video){
				   	if(tip == "videoprivate"){
				   		$("#boxprivate").html(video);
			   			} else if(tip == "videocorporate"){
			   			$("#boxcorporate").html(video);
			   		}
				   	
   				}
   				});
   				$.ajax({
					type: "POST",
					url: "http://zoomevents.ro/server.php",
					data: "id="+id+"&tip="+tip+"&action=getidnext",
					dataType: "html",
					cache: true,
				   success: function(nextid){
			   			$(".changevideo").attr("rel", nextid);
			   	
   				}
   				});
    			}
    			setTimeout(function(){ 
					$("#onfilm").fadeIn(1000);
					$(".changevideo").fadeIn(1000);
				}, 10000);
   				setTimeout(function(){ 
					$("#onfilm").fadeOut(1000);
					$(".changevideo").fadeOut(1000);
				}, 15000);
    			 return false;
    		});
    		$("#prev").click(function(){
    			var tip = $(".changevideo").attr("id");
    			var id = $(".changevideo").attr("rel");
    			if(tip != "" && id != ""){
    				$.ajax({
					type: "POST",
					url: "http://zoomevents.ro/server.php",
					data: "id="+id+"&tip="+tip+"&action=getvideoprev",
					dataType: "html",
					cache: true,
				   success: function(video){
				   	if(tip == "videoprivate"){
				   		$("#boxprivate").html(video);
			   			} else if(tip == "videocorporate"){
			   			$("#boxcorporate").html(video);
			   		}
				   	
   				}
   				});
   				$.ajax({
					type: "POST",
					url: "http://zoomevents.ro/server.php",
					data: "id="+id+"&tip="+tip+"&action=getidprev",
					dataType: "html",
					cache: true,
				   success: function(nextid){
			   			$(".changevideo").attr("rel", nextid);
			   	
   				}
   				});
    			}
    			setTimeout(function(){ 
					$("#onfilm").fadeIn(1000);
					$(".changevideo").fadeIn(1000);
				}, 10000);
   				setTimeout(function(){ 
					$("#onfilm").fadeOut(1000);
					$(".changevideo").fadeOut(1000);
				}, 15000);
    			 return false;
    		});
});
