jQuery(document).ready(function() {
 
	jQuery('div.main-cat').live('mouseenter',function(index) {
		
		var linkIndex = $(this).index();
		
		jQuery('#secondary-nav li').eq(linkIndex).addClass('hover');
		
		var urllink = jQuery('#secondary-nav li').eq(linkIndex).children('a').attr('href');
		
		jQuery(this).find('img.project-img').parent('a').attr('href',urllink);
		
		jQuery(this).find('.border').css('display','block');
      
		jQuery(this).find('h5').addClass('highlight');
			 
	}).live('mouseleave',function() {
		
		var linkIndex = $(this).index();
		
		jQuery('#secondary-nav li').eq(linkIndex).removeClass('hover');
		
		jQuery(this).find('.border').css('display','none');
		
		jQuery(this).find('h5').removeClass('highlight');
		
	});	
 
	jQuery('ul#secondary-nav li').live('mouseenter',function() {
		
		var linkIndex = $(this).index();
		
		var urllink = jQuery(this).children('a').attr('href');
												
		if (urllink == '#')
		{
								
			$(this).children('a').css('color','#B2B2B2');
	
		}
		
		jQuery('div.main-cat').eq(linkIndex).find('.border').css('display','block');
		
		jQuery('div.main-cat').eq(linkIndex).find('div.project-thumb a').attr('href',urllink);
		
		jQuery('div.main-cat').eq(linkIndex).find('h5').addClass('highlight');
		
	}).live('mouseleave',function() {
		
		var linkIndex = $(this).index();
		
		jQuery('div.main-cat').eq(linkIndex).find('.border').css('display','none');
		
		jQuery('div.main-cat').eq(linkIndex).find('h5').removeClass('highlight');
	
	
	});
 
	jQuery('div.profile-container').live('mouseenter',function() {
		
		jQuery(this).find('.profile-border').css('display','block');
		
		jQuery(this).find('.profile-link a').addClass('highlight');
		
	}).live('mouseleave',function() {
		
		jQuery(this).find('.profile-border').css('display','none');
		
		jQuery(this).find('.profile-link a').removeClass('highlight');
	
	
	});
	/*
	// toggle "Profile" subnav (default) (360px actual width)
	$("#nav-profile").toggle(function() { 
									  
		$("#nav-profile-subnav").animate({width:"365px"}, 200);
		
	}, function() {
		
		$("#nav-profile-subnav").animate({width:"0px"}, 200);
		
	});
*/
	
});
