// JavaScript Document

$(document).ready(function(){
		
	$(function(){
        $('.column').equalHeight();
    });
	
//window resize	
	$(window).bind('resize',function(){
    window.location.href = window.location.href;
	});

//Redirect page
$('#launch').hide().animate({opacity: 0});
$('#redirect').show().animate({opacity: 1});
$('#launch').delay(6000).show().animate({opacity: 1}, 2000);	

//studio Team
$('#principal, #designer, #developer, #marketing, #entertainment').show();
/*$('#principal, #designer, #developer, #marketing, #entertainment').hide().animate({opacity: 0});
$('#principalimg, #designerimg, #developerimg, #marketingimg, #entertainmentimg').hover( function() {
				$('#principal, #designer, #developer, #marketing, #entertainment' ).stop().show().animate({opacity: 0}, 1000);				
           });  
$('#team_principal').hover( function() {
				$('#principal').stop().show().animate({opacity: 1}, 1000);				
          		$('#designer, #developer, #marketing, #entertainment' ).stop().show().animate({opacity: 0}, 1000);				
           });  
$('#team_designer').hover( function() {
				$('#designer').stop().show().animate({opacity: 1}, 1000);				
          		$('#principal, #developer, #marketing, #entertainment').stop().show().animate({opacity: 0}, 1000);	
           }); 
$('#team_developer').hover( function() {
				$('#developer').stop().show().animate({opacity: 1}, 1000);	
				$('#principal, #designer, #marketing, #entertainment').stop().show().animate({opacity: 0}, 1000);		
           });
$('#team_marketing').hover( function() {
				$('#marketing').stop().show().animate({opacity: 1}, 1000);	
				$('#principal, #designer, #developer, #entertainment').stop().show().animate({opacity: 0}, 1000);			
           });
$('#team_entertainment').hover( function() {
				$('#entertainment').stop().show().animate({opacity: 1}, 1000);				
           		$('#principal, #designer, #developer, #marketing').stop().show().animate({opacity: 0}, 1000);				
           });*/

//to go to cases page 
			var pagecases = function() {
			window.location = 'cases.html';
			};
		
		$('#closedetail').click(function(){				
				//from animated page
				//$('.wrapslide').hide().animate({opacity: 0}, 0);
				$('.detailholder').show().animate({opacity:0}, 300);
				$('#detailanim').delay(500).animate({width: 0}, 2000);	
				$('.detailholder').delay(500).animate({width: 0}, 2000);
				$('#casecolholder').delay(500).animate({left: 200}, 2500);
				$('#casecolholder').delay(400).queue(function () {
       					pagecases();
					});		
				//from static page
				//$('.wrapslide').hide().animate({opacity: 0}, 0);
				$('.detailleft, .detailright, .casetab').animate({opacity:0}, 300);
				$('#detail').delay(500).animate({width: 0}, 2000);	
				$('#caseholder').delay(500).animate({left: -800}, 2500);
				$('#caseholder').delay(400).queue(function () {
       					pagecases();
					});
			});		
	
	   
});

