function portfolio(){
			
			jQuery('.mainImageContainer').fadeTo(0, 0);
			jQuery('#port-pane-1 .mainImageContainer').fadeTo(0, 1);

			
			target = new Object() ;
			portfolio = new Object() ;
			
			portfolio.focusOn = 1 ;
			portfolio.focusOff = 0.3 ;
			portfolio.fadeSpeed = 1200 ;
			portfolio.easeType = "easeOutQuad" ;
			
			portfolio.totalPanels = 8 ;
			portfolio.currentPanel = "port-pane-1" ;
			portfolio.nextPanel = "port-pane-2" ;
			portfolio.currentPanelHeight = false ;
			portfolio.intransit = false ;
			
			
            port_thumb_behaviour(portfolio.totalPanels) ;
            jQuery("#" + portfolio.currentPanel + " .mainImageContainer .magnify").animate({"bottom": "-46px"}, portfolio.fadeSpeed) ;
		
			jQuery("ul.thumbBlock li").mousedown(function(){
				
				if(portfolio.intransit == false){
					
					portfolio.intransit = true ;
					//portfolio.currentPanelHeight = jQuery("#PortWebDes").height() ;
					//jQuery("#PortWebDes").css("min-height", portfolio.currentPanelHeight + "px") ;
					
					// Sets up short names for mainText and mainImageContainer targets
					
					portfolio.nextPanel = "port-" + jQuery(this).attr("id") ;
					
					
					target.closetext = "#" + portfolio.currentPanel + " .mainText" ;
					target.closeimage = "#" + portfolio.currentPanel + " .mainImageContainer" ;
					target.closemag = "#" + portfolio.currentPanel + " .mainImageContainer .magnify" ;
					target.closepanel = "#" + portfolio.currentPanel ;
					target.openimage = "#" + portfolio.nextPanel + " .mainImageContainer" ; 
					target.openmag = "#" + portfolio.nextPanel + " .mainImageContainer .magnify" ;
					target.opentext = "#" + portfolio.nextPanel + " .mainText" ;
					target.openpanel = "#" + portfolio.nextPanel ;
					
					
					//jQuery(target.closemag).animate({"bottom": "0"}, portfolio.fadeSpeed, portfolio.easeType) ;
					jQuery(target.closetext).slideUp(portfolio.fadeSpeed, function(){	
						
					
						jQuery(target.closeimage).animate({"opacity": "0"}, portfolio.fadeSpeed, portfolio.easeType, function(){
							
							jQuery(target.closepanel).css("display", "none") ;
							jQuery(target.openpanel).css("display", "block") ;
							jQuery(target.openimage).animate({"opacity": "1"}, portfolio.fadeSpeed, portfolio.easeType, function(){
							
								//jQuery(target.openmag).animate({"opacity": "1"}, portfolio.fadeSpeed, portfolio.easeType) ;
								
								jQuery(target.opentext).slideDown(portfolio.fadeSpeed, function(){
									jQuery(target.openmag).animate({"bottom": "-46px"}, portfolio.fadeSpeed, portfolio.easeType) ;
									//jQuery("#PortWebDes").css({"min-height": ""}) ;
									//jQuery("#PortWebDes").animate({"height": jQuery(target.openpanel).height() + "px"}, portfolio.fadeSpeed) ;
									portfolio.currentPanel = portfolio.nextPanel ;
									portfolio.intransit = false ;
									
								}) ;
								
							}) ;
						
						}) ;
					
					}) ;
				}
			}) ;
		}
		
		function port_thumb_behaviour(i){
			
			ii = 1 ;
			
			while(ii <= i){
				
				jQuery('#pane-' + ii).css("opacity", portfolio.focusOff) ;
				
				jQuery('#pane-' + ii).mouseenter(
						function(){ 
							if(jQuery(this).queue("fx").length <= 2){ jQuery(this).dequeue() ; }
							jQuery(this).fadeTo(portfolio.fadeSpeed, portfolio.focusOn) ;	
						}
				) ;
				
				
				jQuery('#pane-' + ii).mouseleave( 
						function(){ 
							if(jQuery(this).queue("fx").length <= 2){ jQuery(this).dequeue() ; }
							jQuery(this).fadeTo(portfolio.fadeSpeed, portfolio.focusOff) ; 
						}
				) ;
			
			ii ++ ;
			}
					
				
		}
