

$(document).ready(function(){
	//References
	var sections = $("#menu li");
	var loading = $("#loading");
	var content = $("#contentss");
	var caption = $(".caption");
	var trans = $("#transparency");
        var fady = content.fadeTo(1000, 100);


////////////////////////////////
 
///////////////////////
//$(".caption").hide();	
//Manage click events
//sections.click(function(){
//show the loading bar


$("#menu li").click(function(){
content.fadeTo(200, 0);


        
       
  
});


		//load selected section
		$("#www").click(function(){
								  showLoading();
$("#transparency").animate({backgroundColor: '#F00'},600);



content.load("cattry.php", hideLoading);

				

							 });
		$("#ads").click(function(){
								 showLoading();
							 
                               $("#transparency").animate({backgroundColor: '#F30'},600);
                              
				content.load("ads.php", hideLoading);
				
				
							 
							 });
		
		$("#demo").click(function(){
		showLoading();   
                $("#transparency").animate({backgroundColor: '#F60'},600);
                
                                content.load("demo", hideLoading); 
							
							 });
		
		
		$("#all").click(function(){
				showLoading();
				$("#transparency").animate({backgroundColor: '#F90'},600);
			       
                                content.load("client.php", hideLoading);
                                 	 
							 });
		
			$("#twod").click(function(){
									  showLoading();
                                
				$("#transparency").animate({backgroundColor: '#603'},600);
                               		 
				content.load("2d.php", hideLoading);
				
				
							 
							 });
			
			$("#threed").click(function(){
										showLoading();
				$("#transparency").animate({backgroundColor: '#633'},600);
                                  			 
				content.load("3d.php", hideLoading);
				
				
							 
							 });
			
			$("#video").click(function(){
									   showLoading();
                                $("#transparency").animate({backgroundColor: '#663'},600);
				    			 
				content.load("videos.php", hideLoading);
				
				
							 
							 });
			
			$("#all2").click(function(){
									  showLoading();
                                $("#transparency").animate({backgroundColor: '#693'},600);
				
				content.load("art.php", hideLoading);
				
				
							 
							 });
			
			$("#news").click(function(){
									 showLoading();
				$("#transparency").animate({backgroundColor: '#993399'},600);	
                               	
				content.load("news.php", hideLoading);
				
				
							 
							 });
			
			$("#blog").click(function(){
										  showLoading();
				$("#transparency").animate({backgroundColor: '#9966cc'},600);	
                               	 
				content.load("blog.php", hideLoading);
				
				
							 
							 });
			$("#bio").click(function(){
										   showLoading();
                                $("#transparency").animate({backgroundColor: '#69C'},600);
				   		 
				content.load("bio.html", hideLoading);
				
				
							 
							 });
			$("#contact").click(function(){
										   showLoading();
				$("#transparency").animate({backgroundColor: '#6FF'},600);	
                                 		
				content.load("contact.html", hideLoading);
				
				
							 
							 });
		

//	//show loading bar
	function showLoading(){
		loading
			.css({visibility:"visible"})
			.css({opacity:"1"})
			.css({display:"block"})
		;
	}
	////hide loading bar
function hideLoading(){

loading.fadeTo(1000, 0);

content.fadeTo(600, 1);



	};



$("#menu li").hover(function(){
				//$(this).children(".caption").animate({marginTop:'0px'},'fast');   

//$(this).children(".caption").fadeIn(500);
$(this).children(".caption").css({visibility:"visible"});
				
		 //$(this).children(".ogcaption").fadeTo(100,0);
$(this).children(".ogcaption").css({visibility:"hidden"});
$(this).fadeTo(400, 1);

						 // $(".ogcaption").fadeTo(200,0);
						  },
						  function(){
							//$(this).children(".caption").animate({marginTop:'114px'},'fast');   
//$(this).children(".caption").fadeOut(300);	
$(this).children(".caption").css({visibility:"hidden"});
$(this).fadeTo(400, 0.5);

						 //$(this).children(".ogcaption").fadeTo(200,100);
$(this).children(".ogcaption").css({visibility:"visible"});
						  });

$("#menu li").click(function(){
							 $("#menu li").removeClass('active');
							 $(this).addClass('active');
							
							 });


///////////////////



/////////////////////////////


//////////////////////
});





