/*onload fade carousel in*/



/*jQuery(function () {
	jQuery('img').hide();//hide all the images on the page
	});

	var i = 0;//initialize
	var int=0;//Internet Explorer Fix
	jQuery(window).bind("load", function() {//The load event will only fire if the entire page or document is fully loaded
		var int = setInterval("doThis(i)",500);//500 is the fade in speed in milliseconds
	});

	function doThis() {
		var images = jQuery('img').length;//count the number of images on the page
		if (i >= images) {// Loop the images
			clearInterval(int);//When it reaches the last image the loop ends
		}
		jQuery('img:hidden').eq(0).fadeIn(500);//fades in the hidden images one by one
		i++;//add 1 to the count
	}
*/

function jump_url(url) {
	location.href=url;
}

function close_page(url) {
	jQuery("#overlay").fadeIn(500);
	jQuery('#overlay').delay(500);
	jump_url(url);
}

jQuery(document).ready(function() {
	/*
	jQuery('.stepcarousel').hide();
	jQuery('.stepcarousel').fadeIn(2000);
	*/
	jQuery('#accordion').accordion({header: 'h1'});//accordion
    jQuery('#accordion').accordion('activate', 0);//accordion
	jQuery('#accordion').accordion({ autoHeight: true });//accordion

    jQuery('.aboutUs').hide();


	
	
	jQuery('#overlay').fadeOut(500);
	/*jQuery('#overlay').hide();*/
	
/*NAVIGATION accordian menu*/  
	jQuery(document).ready(function(){
jQuery( '#menu > li > ul' ).hide()
	.click(function( e ){
		e.stopPropagation();
	});
  jQuery('#menu > li').toggle(function(){
	  jQuery(this).find('ul').slideDown();
  }, function(){
  	jQuery( this ).find('ul').slideUp();
  });
});

/*NAVIGATION for WORK accordian menu*/  
	jQuery(document).ready(function(){
jQuery( '#menuWork > li > ul' ).show()
	.click(function( e ){
		e.stopPropagation();
	});
  jQuery('#menuWork > li').toggle(function(){
	  jQuery(this).find('ul').slideDown();
  }, function(){
  	jQuery( this ).find('ul').slideUp();
  });
});


/*new page fade out*/
 	jQuery('.aboutButton').click(function(url) {
    jQuery('.stepcarousel').hide();
    jQuery(this).fadeOut(500,'jump_url(url)');
    });	
	
/*Left menu hide*/
	jQuery('.nav').show();
	jQuery('#logo').show();
	jQuery('.closeLeft').show();
	jQuery('#toggleButton').hide();
	/*jQuery('.nav').mouseleave(function() {*/
	jQuery('.closeLeft').click(function() {
	jQuery('#logo,.navLinks').fadeOut(200);
	jQuery('.nav').delay(400).animate({width:'hide'}, 500, 'easeInOutExpo');
	jQuery('.closeLeft').delay(500).fadeOut(600);
	jQuery('#toggleButton').delay(700).fadeIn(600);
	/*jQuery('.nav').delay(400).animate({"left": "-=300"}, 1000);*/
	});
	
/*Left menu show*/
	jQuery('#toggleButton').click(function() {
	jQuery('.nav').animate({width:'show'}, 1000, 'easeInOutExpo');
	/*jQuery('.nav').animate({"left": "+=300"}, 1000);*/
	jQuery('#logo,.navLinks').delay(1000).fadeIn(200);
	jQuery('#toggleButton').delay(1000).fadeOut(500);
	jQuery('.closeLeft').delay(1000).fadeIn(500);
	});	
	
/*Right menu hide*/
	jQuery('#navRight').hide();
	jQuery('.aboutText').hide();
	jQuery('.closeRight').click(function() {
	jQuery('#projectText').fadeOut(200);
	jQuery('.aboutText').fadeOut(200);
	jQuery('.contactText').fadeOut(200);
	jQuery('#navRight').delay(400).animate({width:'hide'}, 500, 'easeInOutExpo');
	jQuery('.closeRight').delay(500).fadeOut(500);
	jQuery('#toggleButtonRight').delay(700).fadeIn(500);
	});
	
/*Right menu show*/
	jQuery('.closeRight').hide();
	jQuery('.aboutText').hide();
	jQuery('.contactText').hide();
	jQuery('#toggleButtonRight').click(function() {
	jQuery('#navRight').animate({width:'show'}, 1000, 'easeInOutExpo');
	jQuery('#projectText').delay(1000).fadeIn(200);
	jQuery('.closeRight').delay(1000).fadeIn(500);
	jQuery('#toggleButtonRight').delay(1000).fadeOut(500);
	});

/*Right menu ABOUT*/
	jQuery('.closeRight').hide();
	jQuery('#projectText').hide();
	jQuery('.aboutBtn').click(function() {
	jQuery('.contactText').fadeOut(200);
	jQuery('#projectText').fadeOut(200);
			
		if (jQuery('.aboutText').is(':visible')) {
			jQuery('.aboutText').fadeOut(200);
			jQuery('#navRight').delay(400).animate({width:'hide'}, 500, 'easeInOutExpo');
			jQuery('.closeRight').delay(500).fadeOut(500);
			jQuery('#toggleButtonRight').delay(700).fadeIn(500);
	}else{
			jQuery('#navRight').animate({width:'show'}, 1000, 'easeInOutExpo');
			jQuery('.aboutText').delay(1000).fadeIn(200);
			jQuery('.closeRight').delay(1000).fadeIn(500);
			jQuery('#toggleButtonRight').delay(1000).fadeOut(500);
			}
			
	
	});
	
	

	

	
	
	
	
	
/*Right menu Contact*/
	jQuery('.closeRight').hide();
	jQuery('.contactText').hide();
	jQuery('.contactBtn').click(function() {
	jQuery('.aboutText').fadeOut(200);	
	jQuery('#projectText').fadeOut(200);
										 
		if (jQuery('.contactText').is(':visible')) {
			jQuery('.contactText').fadeOut(200);
			jQuery('#navRight').delay(400).animate({width:'hide'}, 500, 'easeInOutExpo');
			jQuery('.closeRight').delay(500).fadeOut(500);
			jQuery('#toggleButtonRight').delay(700).fadeIn(500);
	}else{
			jQuery('#navRight').animate({width:'show'}, 1000, 'easeInOutExpo');
			jQuery('.contactText').delay(1000).fadeIn(200);
			jQuery('.closeRight').delay(1000).fadeIn(500);
			jQuery('#toggleButtonRight').delay(1000).fadeOut(500);
			}
	});
	
	
/*Nav bubble*/
	jQuery('.bubbleNav').hide();
	jQuery('#toggleButton').hover(function(){
	jQuery('.bubbleNav').fadeIn(60);
	}, function() {
	jQuery('.bubbleNav').fadeOut(600);
	});

/*Info bubble*/
	jQuery('.bubbleInfo').hide();
	jQuery('#toggleButtonRight').hover(function(){
	jQuery('.bubbleInfo').fadeIn(60);
	}, function() {
	jQuery('.bubbleInfo').fadeOut(600);
	});		
	
	
	
	
/*News Panel*/
	jQuery('.newsPanel').hide();
	jQuery('#accordion').hide();
	jQuery('.previousNews').hide();
	jQuery(document).ready(function() {
	jQuery('#newsPanel').delay(3000);
	jQuery('.newsPanel').animate({width:'show'}, 3000, 'easeInOutExpo');
	jQuery('#accordion').delay(3500);
	jQuery('#accordion').fadeIn(200);
	jQuery('.previousNews').delay(3500);
	jQuery('.previousNews').fadeIn(200);

});


/*newS FADE IN*/
 	jQuery('.newsArticle').hide();
	jQuery('.newsText').hide();
	jQuery('.newsArticle').delay(2000);
	/*jQuery('.newsArticle').fadeIn(200);*/
	jQuery('.newsArticle').slideDown(400);
	jQuery('.newsText').delay(3000);
	jQuery('.newsText').fadeIn(200);
	
/*FOOTER*/
	jQuery('.footer').hide();
	jQuery('.footerTrigger').hover(function(){
	jQuery('.footer').slideDown(200);
	jQuery('.footerText').delay(200);jQuery('.footerText').fadeIn(400);
	}, function() {
		jQuery('.footerText').fadeOut(400);
		jQuery('.footer').delay(400);jQuery('.footer').slideUp(200);

	});
  

 
 
 
  

});/*everything end*/  

