/**
 * global.js
 * Javascript specific to the "Persistent Tab" on multiple domains. 
 * @package ja-pt
 * @author Tony Collings
 * @version 1.0, Aug 2011
 *
 *
 * NOTES: This inherits the Mootools library on the host website. Be careful of versioning. 
 */

var oToggleFX; // Tab/Toggle FX
function fnTogglePT(){
	var oIFrameDiv = $('persistent-tab');
	if(oIFrameDiv){
		var bToggled = (oIFrameDiv.getCoordinates().width>145)?true:false;
		this.oToggleFX = new Fx.Tween(oIFrameDiv,{
			duration: 650,
			link: 'cancel',
			transition: Fx.Transitions.Expo.easeInOut
			//transition: Fx.Transitions.Bounce.easeOut
		});		 
		
		if(!bToggled){
			this.oToggleFX.cancel();
			this.oToggleFX.start('width',740); // Must match width of iframe.contentWindow ! 
		}else{
			this.oToggleFX.cancel();
			this.oToggleFX.start('width',145); 	
		}	
	}
	
}
