// JavaScript Document

$(document).ready(function(){						  
					   
						   $(".bottomnavhome").css({'visibility' : 'visible'});
						   
						   $("#content").css({
													 'position' : 'relative',
													 'z-index' : '10'
													 });
						   
						   
						   $(".bottomnavdemo").css({
												   'position' : 'relative',
												   'z-index' : '1',
												   'bottom' : '60px'
												   });
						   
						   $(".bottomnavinvest").css({
												   'position' : 'relative',
												   'z-index' : '1',
												   'bottom' : '60px'
												   });	
						   
						   
	
	
	
	
	
	
	$('.demolink').click(function(){ 
	if($(".bottomnavinvest").is(':visible')){
	hidebottomnavinvest()							
	}
	$('#contentinner').fadeOut( 1000 , function(){
	$(this).children().remove();
	$("#content").animate({'height' : '330px'}, function(){
												
	$('#contentinner').load( 'demoreelcontent.html' ,'', showbottomnavdemo() )
									   })
							  
												})	
		return false					 
	});
	
	
	
	
	$('.investlink').click(function(){
	if($(".bottomnavdemo").is(':visible')){
	hidebottomnavdemo()							
	}
	$('#contentinner').fadeOut( 1000 , function(){
	$(this).children().remove();											
	$('#contentinner').load( 'investcontent.html' ,'', showbottomnavinvest() )
												})
	
	
	
	
    return false;  
    });
	
	$(".homelink").click(function(){
	if($(".bottomnavdemo").is(':visible')){
	hidebottomnavdemo()							
	}
	if($(".bottomnavinvest").is(':visible')){
	hidebottomnavinvest()							
	}
	$('#contentinner').fadeOut( 1000 , function(){
	$(this).children().remove();
	$('#contentinner').load('homecontent.html' ,'', showcontent() )											
												})
	
	return false
								  });
	
	
	$(".invitelink").click(function(){
	if($(".bottomnavdemo").is(':visible')){
	hidebottomnavdemo()							
	}
	if($(".bottomnavinvest").is(':visible')){
	hidebottomnavinvest()							
	}
	$('#contentinner').fadeOut( 1000 , function(){
	$(this).children().remove();											
	$('#contentinner').load('invitecontent.html' ,'', showcontent() )											
												})
	
	return false
								  });
	
	
	$(".dvdlink").click(function(){
	if($(".bottomnavdemo").is(':visible')){
	hidebottomnavdemo()							
	}
	if($(".bottomnavinvest").is(':visible')){
	hidebottomnavinvest()							
	}
	$('#contentinner').fadeOut( 1000 , function(){
	$(this).children().remove();											
	$('#contentinner').load('dvdcontent.html' ,'', showcontent() )											
												})
	
	return false
								  });


		
	$(".contactlink").click(function(){
	return true
									 })
	
	
	
	$(".nikkinathanlink").click(function(){									 
	$('#contentinner').fadeOut( 1000 , function(){
	$(this).children().remove();											
	$('#contentinner').load('demoreelcontent.html' ,'', showcontentvideo() )											
												})	
	$("#demoreelright").slideUp(500);
	return false
										 })
	
	$(".chriscarloslink").click(function(){									 
	$('#contentinner').fadeOut( 1000 , function(){
	$(this).children().remove();											
	$('#contentinner').load('chriscarloscontent.html' ,'', showcontentvideo() )											
												})	
	$("#demoreelright").slideUp(500);
	return false
										 })
		
	$(".sonalrajlink").click(function(){									 
	$('#contentinner').fadeOut( 1000 , function(){
	$(this).children().remove();											
	$('#contentinner').load('sonalrajcontent.html' ,'', showcontentvideo() )											
												})
	$("#demoreelright").slideUp(500);
	return false
										 })		
	
	$(".chardarryllink").click(function(){	
	$("#demoreelright").slideUp(500);
	$('#contentinner').fadeOut( 1000 , function(){
	$(this).children().remove();											
	$('#contentinner').load('chardarrylcontent.html' ,'', showcontentvideo() )											
												})	
	
	return false
										 })	
	
	$(".indielink").click(function(){									 
	$('#contentinner').fadeOut( 1000 , function(){
	$(this).children().remove();											
	$('#contentinner').load('investcontent.html' ,'', showcontent() )											
												})	
	return false
										 })	
	
	$(".featurelink").click(function(){									 
	$('#contentinner').fadeOut( 1000 , function(){
	$(this).children().remove();											
	$('#contentinner').load('featurecontent.html' ,'', showcontent() )											
												})	
	return false
										 })	
	
	$(".epiclink").click(function(){									 
	$('#contentinner').fadeOut( 1000 , function(){
	$(this).children().remove();											
	$('#contentinner').load('epiccontent.html' ,'', showcontent() )											
												})	
	return false
										 })	
	
	$(".addonlink").click(function(){									 
	$('#contentinner').fadeOut( 1000 , function(){
	$(this).children().remove();											
	$('#contentinner').load('addoncontent.html' ,'', showcontent() )											
												})	
	return false
										 })	
	
	$("#nav ul li a").click(function(){
	$("#nav ul li a").removeClass('navactive');
	$(this).addClass('navactive');
	})
						  
	$(".bottomnavdemo li a").click(function(){
	$(".bottomnavdemo li a").removeClass('demoactive');
	$(this).addClass('demoactive');
	})
	
	$(".bottomnavinvest li a").click(function(){
	$(".bottomnavinvest li a").removeClass('bottomnavactive');
	$(this).addClass('bottomnavactive');
	})
	
	function showbottomnavdemo(){
	$(".bottomnavdemo").show();
	$(".bottomnavdemo").animate({ 'bottom' : '0px' }, 800 , 'easeOutBounce', showcontentvideo());
	}
	
	function hidebottomnavdemo(){
	
	$(".bottomnavdemo").animate({ 'bottom' : '60px' }, 800 , 'easeInBounce', function(){
	$(".bottomnavdemo").hide('1', function(){
	$('#content').animate({'height' : '225px'});
										   })
																					  })
																					 	
	}
	
	function showbottomnavinvest(){
	$(".bottomnavinvest").show();
	$(".bottomnavinvest").animate({ 'bottom' : '0px' }, 800 , 'easeOutBounce', showcontent());
	}
	
	function hidebottomnavinvest(){
	
	$(".bottomnavinvest").animate({ 'bottom' : '60px' }, 800 , 'easeInBounce', function(){
	$(".bottomnavinvest").hide('1')																				  
																					  })
																					 	
	}
	
	function showcontent(){
		
	$("#contentinner").fadeIn(1000);
											  
	}
	
	function showcontentvideo(){
	
	$("#contentinner").fadeIn(1000, function(){
	$("#demoreelright").slideDown(500);
	
										  	 })
											  
	}
						   
	})//end doc ready