 


 var scroll = new Fx.Scroll('demo-wrapper', {
	wait: false,
	duration: 1500,
	offset: {'x': -160, 'y': 0},
	transition: Fx.Transitions.Quad.easeInOut
});
 
 

    var  accordion = new Accordion('h3.atStart', 'div.atStart', {
    
				 alwaysHide: false, duration: 400, opacity: false,	start: false,  display:-1,		

				
				onActive: function(toggler, element){
				
					toggler.setStyle('color', '#000000');
			},
				
				onBackground: function(toggler, element){
				
					toggler.setStyle('color', '#666666');
					
				}
			}, $('accordion'));



function jumpTo(whichSection,whichAccordion){
scroll.toElement(whichSection);
accordion.display(whichAccordion);

}

function rememberMe(whichArea){


if (whichArea=="#Felt") {
jumpTo('section1',0);
}


if (whichArea=="#Felt:Aboutus" ) {
jumpTo('section2',0);
}

if (whichArea=="#Felt:Approach" ) {
jumpTo('section3',0);
}






if (whichArea=="#Portfolio" ){
jumpTo('section4',1);
}

if (whichArea=="#Portfolio:Airlines" ){
jumpTo('section5',1);
}

if ( whichArea=="#Portfolio:Byron"){
jumpTo('section6',1);
}

if (whichArea=="#Portfolio:Macmillan"){
jumpTo('section7',1);
}

if (whichArea=="#Portfolio:Octink"){
jumpTo('section8',1);
}

if (whichArea=="#Portfolio:OxfordAirport"){
jumpTo('section9',1);
}
if (whichArea=="#Portfolio:PizzaExpress"){
jumpTo('section10',1);
}


 



if (whichArea=="#Contact") {
jumpTo('section20',4);
}
	
	


}





var oldStatus="#Felt";

function statusChecker(){
var currentStatus=(window.location.hash);

if (currentStatus==""){
currentStatus = "#Felt";
}
 
 if (currentStatus != oldStatus){
 rememberMe(currentStatus);
 }
 
 oldStatus = currentStatus;
}

setInterval("statusChecker()", 100);

rememberMe();
 
 
 
function next(){
		jQuery('.element a').removeClass('sub-selected');
 document.getElementById(pnextid).className='sub-selected';
if(pnextid!=''){portcat='';loadport(pnextid);}
jQuery("#demo-wrapper").animate({scrollLeft: 0},"fast");
		
 
}

function back(){ 

  jQuery("#demo-wrapper").animate({scrollLeft: 0},"slow");


}

function nextn(){if(nnextid!=''){togglernews(nnextid);}}

function backn(){if(nbackid!=''){togglernews(nbackid);}}

var nbackid,nnextid,pbackid,pnextid;
function setvarsnews(cat){
var nid=newsArr.indexOf(cat);  
if(nid>0){nbackid=newsArr[(nid-1)];}else{nbackid=newsArr[0];}
if(nid == (newsArr.length -1 )){
 nnextid=newsArr[0];
}else{
 nnextid=newsArr[(nid+1)];
}
  }
 function setvarsports(cat){
var nid=portsArr.indexOf(cat);  
ccat=cat;
 
if(nid>0){pbackid=portsArr[(nid-1)];}else{pbackid=portsArr[0];}
if((nid)==(portsArr.length -1)){
pnextid=portsArr[0];
}else{
pnextid=portsArr[(nid+1)];
}
  }
 
