jQuery.fn.delay = function(time,func){
	this.each(function(){
		setTimeout(func,time);
	});
	
	return this;
};

		

$(function () {
	//	$('a[rel*=facebox]').facebox();

		//$('.tTip').betterTooltip({speed: 300, delay: 400}); 
	
		//tabs();
		 
		//$('.tTip').live('click',function(){
		//$('#frame_overlay').fadeIn('fast');
		
		/*$('#frame_body').fadeOut('fast');
		
	 	var page=$(this).attr('href');
		
		setTimeout(function(){
			$.ajax({
				type: "POST",
				url: "page.php",
				data: "page="+page,
				success: function(msg){
					tabs();
					setTimeout(function(){tabs();
						$('#frame_body').html(msg);
					 },500)
				 	setTimeout(function(){tabs();
					 	$('#frame_body').fadeIn('fast');
					 },500)
				}
			},1000);
		});
			
		return false;
	});
 */
	$('#portfolio').hide();
	$('.port_clicker').live('click',function(){
	
	    if($(this).attr("id") =='portfolio_launch'){
	   			   		
	   		$('#portfolio').slideDown("slow");
	   		$(this).delay(500,function(){
	   		
	   		})
	   		$('#portfolio_launch').attr("id","portfolio_close");
					
	   		$(this).delay(1500,function(){
				
				 			});		
	   }
	   else{
	        $('#portfolio').slideUp("slow");
			$('#portfolio_close').attr("id","portfolio_launch");
	   }		
	        
	});
	});
