// SpryAccordion.js - version 0.14 - Spry Pre-Release 1.6
//
// Copyright (c) 2006. Adobe Systems Incorporated.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
//   * Redistributions of source code must retain the above copyright notice,
//     this list of conditions and the following disclaimer.
//   * Redistributions in binary form must reproduce the above copyright notice,
//     this list of conditions and the following disclaimer in the documentation
//     and/or other materials provided with the distribution.
//   * Neither the name of Adobe Systems Incorporated nor the names of its
//     contributors may be used to endorse or promote products derived from this
//     software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('j 5;4(!5)5={};4(!5.6)5.6={};5.6.7=8(a,b){3.o=3.Z(a);3.1J=0;3.18="2x";3.S="2q";3.R="2m";3.1d="2h";3.1b=v;3.U=v;3.r=q;3.w=q;3.17=q;3.1q=5.6.7.1p;3.16=5.6.7.1R;3.T=v;3.J=0;5.6.7.1h(3,b,v);3.1O()};5.6.7.k.Z=8(a){4(a&&1K a=="2l")9 2k.2j(a);9 a};5.6.7.k.D=8(a,b){4(!a||!b||(a.x&&a.x.1G(B 1a("\\\\b"+b+"\\\\b"))!=-1))9;a.x+=(a.x?" ":"")+b};5.6.7.k.C=8(a,b){4(!a||!b||(a.x&&a.x.1G(B 1a("\\\\b"+b+"\\\\b"))==-1))9;a.x=a.x.2a(B 1a("\\\\s*\\\\b"+b+"\\\\b","g"),"")};5.6.7.1h=8(a,b,c){4(!b)9;L(j d 25 b){4(c&&b[d]==1s)21;a[d]=b[d]}};5.6.7.k.1r=8(e,a){4(a)3.D(3.Y(a),3.18);9 n};5.6.7.k.1T=8(e,a){4(a)3.C(3.Y(a),3.18);9 n};5.6.7.k.G=8(a){j b=3.r;j c;4(1K a=="2w")c=3.I()[a];t c=3.Z(a);4(!c||b==c)9 q;j d=b?3.O(b):q;j e=3.O(c);4(!e)9 q;4(3.T&&!3.J)3.J=(d.1k)?d.1k:d.1j;4(3.1b){4(3.w)3.w.1i();3.w=B 5.6.7.E(3,c,{H:3.H,M:3.M,Q:3.Q});3.w.1e()}t{4(d){d.l.P="13";d.l.u="12"}e.l.P="1I";e.l.u=(3.T?3.J:e.1j)+"V"}4(b){3.C(b,3.S);3.D(b,3.R)}3.C(c,3.R);3.D(c,3.S);3.r=c;9 c};5.6.7.k.1H=8(){4(!3.T&&3.r){j a=3.r;j b=3.O(a);4(b){4(3.1b){4(3.w)3.w.1i();3.w=B 5.6.7.E(3,q,{H:3.H,M:3.M,Q:3.Q});3.w.1e()}t{b.l.P="13";b.l.u="12"}}3.C(a,3.S);3.D(a,3.R);3.r=q}};5.6.7.k.2i=8(){9 3.G(3.1c()+1)};5.6.7.k.2g=8(){9 3.G(3.1c()-1)};5.6.7.k.2f=8(){9 3.G(0)};5.6.7.k.2e=8(){j a=3.I();9 3.G(a[a.y-1])};5.6.7.k.1F=8(e,a){4(a!=3.r)3.G(a);t 3.1H();4(3.U)4(e.11)e.11();t e.1E=n;4(e.10)e.10();t e.1D=v;9 n};5.6.7.k.2d=8(e){3.17=v;3.D(3.o,3.1d);9 n};5.6.7.k.1C=8(e){3.17=n;3.C(3.o,3.1d);9 n};5.6.7.1p=2c;5.6.7.1R=2b;5.6.7.k.1B=8(e){j a=e.29;4(!3.17||(a!=3.1q&&a!=3.16))9 v;j b=3.I();4(!b||b.y<1)9 n;j c=3.r?3.r:b[0];j d=(a==3.16)?c.19:c.1A;1z(d){4(d.1y==1)28;d=(a==3.16)?d.19:d.1A}4(d&&c!=d)3.G(d);4(e.11)e.11();t e.1E=n;4(e.10)e.10();t e.1D=v;9 n};5.6.7.k.1x=8(a){4(!a)9;j b=3.Y(a);4(b){j c=3;5.6.7.z(b,"1w",8(e){9 c.1F(e,a)},n);5.6.7.z(b,"1w",8(e){9 c.1r(e,a)},n);5.6.7.z(b,"27",8(e){9 c.1T(e,a)},n)}};5.6.7.z=8(a,b,c,d){26{4(a.z)a.z(b,c,d);t 4(a.1v)a.1v("24"+b,c)}23(e){}};5.6.7.k.1t=8(a,b){j c=3.O(a);4(b){3.r=a;3.C(a,3.R);3.D(a,3.S);4(c){4(3.T){4(3.J)c.l.u=3.J+"V"}t{c.l.u="22"}}}t{3.C(a,3.S);3.D(a,3.R);4(c){c.l.u="12";c.l.P="13"}}3.1x(a)};5.6.7.k.1O=8(){j a=3.I();L(j i=0;i<a.y;i++)3.1t(a[i],i==3.1J);3.U=(3.U&&3.o.20.1Z("1Y"));4(3.U){j b=3;5.6.7.z(3.o,"W",8(e){9 b.1C(e)},n);5.6.7.z(3.o,"1X",8(e){9 b.1B(e)},n)}};5.6.7.k.I=8(){9 3.X(3.o)};5.6.7.k.1W=8(){9 3.r};5.6.7.k.1u=8(a){j b=3.I();L(j i=0;i<b.y;i++){4(a==b[i])9 i}9-1};5.6.7.k.1c=8(){9 3.1u(3.r)};5.6.7.k.Y=8(a){4(!a)9 q;9 3.X(a)[0]};5.6.7.k.O=8(a){4(!a)9 q;9 3.X(a)[1]};5.6.7.k.X=8(a){j b=[];j c=a.1V;1z(c){4(c.1y==1)b.1S(c);c=c.19}9 b};5.6.7.k.1o=8(){4(3.o&&3.o.1o)3.o.1o()};5.6.7.k.W=8(){4(3.o&&3.o.W)3.o.W()};5.6.7.E=8(a,b,d){3.N=q;3.15=0;3.M=2v;3.H=2u;3.1n=0;3.Q=5.6.7.E.1Q;3.1m=q;3.14=b;3.2t=a.Z(b);3.A=[];5.6.7.1h(3,d,v);3.15=1P.2s(2r/3.M);j e=a.I();L(j i=0;i<e.y;i++){j p=e[i];j c=a.O(p);4(c){j h=c.1k;4(h==1s)h=0;4(p==b&&h==0)c.l.P="1I";4(p==b||h>0){j f=B 2p;f.14=p;f.F=c;f.1g=h;f.1f=(p==b)?(a.T?a.J:c.1j):0;f.1N=f.1f-f.1g;f.K=c.l.K;3.A.1S(f);c.l.K="2o";c.l.u=h+"V"}}}};5.6.7.E.1Q=8(a,b,c,d){a/=d;9 b+((2-a)*a*c)};5.6.7.E.k.1e=8(){j a=3;3.1n=(B 1M).1U();3.N=1L(8(){a.1l()},3.15)};5.6.7.E.k.1i=8(){4(3.N){2n(3.N);L(i=0;i<3.A.y;i++){m=3.A[i];m.F.l.K=m.K}}3.N=q};5.6.7.E.k.1l=8(){j a=(B 1M).1U();j b=a-3.1n;j i,m;4(b>=3.H){L(i=0;i<3.A.y;i++){m=3.A[i];4(m.14!=3.14){m.F.l.P="13";m.F.l.u="12"}m.F.l.K=m.K;m.F.l.u=m.1f+"V"}4(3.1m)3.1m();9}L(i=0;i<3.A.y;i++){m=3.A[i];j c=1P.2y(3.Q(b,m.1g,m.1N,3.H));m.F.l.u=((c<0)?0:c)+"V"}j d=3;3.N=1L(8(){d.1l()},3.15)};',62,159,'|||this|if|Spry|Widget|Accordion|function|return||||||||||var|prototype|style|obj|false|element||null|currentPanel||else|height|true|animator|className|length|addEventListener|panelData|new|removeClassName|addClassName|PanelAnimator|content|openPanel|duration|getPanels|fixedPanelHeight|overflow|for|fps|timer|getPanelContent|display|transition|closedClass|openClass|useFixedPanelHeights|enableKeyboardNavigation|px|blur|getElementChildren|getPanelTab|getElement|stopPropagation|preventDefault|0px|none|panel|interval|nextPanelKeyCode|hasFocus|hoverClass|nextSibling|RegExp|enableAnimation|getCurrentPanelIndex|focusedClass|start|toHeight|fromHeight|setOptions|stop|scrollHeight|offsetHeight|stepAnimation|onComplete|startTime|focus|KEY_UP|previousPanelKeyCode|onPanelTabMouseOver|undefined|initPanel|getPanelIndex|attachEvent|mouseover|attachPanelHandlers|nodeType|while|previousSibling|onKeyDown|onBlur|cancelBubble|returnValue|onPanelTabClick|search|closePanel|block|defaultPanel|typeof|setTimeout|Date|distance|attachBehaviors|Math|defaultTransition|KEY_DOWN|push|onPanelTabMouseOut|getTime|firstChild|getCurrentPanel|keydown|tabindex|getNamedItem|attributes|continue|auto|catch|on|in|try|mouseout|break|keyCode|replace|40|38|onFocus|openLastPanel|openFirstPanel|openPreviousPanel|AccordionFocused|openNextPanel|getElementById|document|string|AccordionPanelClosed|clearTimeout|hidden|Object|AccordionPanelOpen|1000|floor|panelToOpen|500|60|number|AccordionPanelTabHover|round'.split('|'),0,{}))


/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;


$(document).ready(function() {
 
	// Expand Panel
	$("#open").click(function(){
		$("div#panel").slideDown("slow");	
	});	
 
	// Collapse Panel
	$("#close").click(function(){
		$("div#panel").slideUp("slow");	
	});		
 
	// Switch buttons from "Log In | Register" to "Close Panel" on click
	$("#toggle a").click(function () {
		$("#toggle a").toggle();
	});		
 
});





// JavaScript Document

/*
 * jQuery Easing v1.1.1 - http://gsgd.co.uk/sandbox/jquery.easing.php
 *
 * Uses the built in easing capabilities added in jQuery 1.1
 * to offer multiple easing options
 *
 * Copyright (c) 2007 George Smith
 * Licensed under the MIT License:
 *   http://www.opensource.org/licenses/mit-license.php
 */

jQuery.extend(jQuery.easing, {
	easein: function(x, t, b, c, d) {
		return c*(t/=d)*t + b; // in
	},
	easeinout: function(x, t, b, c, d) {
		if (t < d/2) return 2*c*t*t/(d*d) + b;
		var ts = t - d/2;
		return -2*c*ts*ts/(d*d) + 2*c*ts/d + c/2 + b;		
	},
	easeout: function(x, t, b, c, d) {
		return -c*t*t/(d*d) + 2*c*t/d + b;
	},
	expoin: function(x, t, b, c, d) {
		var flip = 1;
		if (c < 0) {
			flip *= -1;
			c *= -1;
		}
		return flip * (Math.exp(Math.log(c)/d * t)) + b;		
	},
	expoout: function(x, t, b, c, d) {
		var flip = 1;
		if (c < 0) {
			flip *= -1;
			c *= -1;
		}
		return flip * (-Math.exp(-Math.log(c)/d * (t-d)) + c + 1) + b;
	},
	expoinout: function(x, t, b, c, d) {
		var flip = 1;
		if (c < 0) {
			flip *= -1;
			c *= -1;
		}
		if (t < d/2) return flip * (Math.exp(Math.log(c/2)/(d/2) * t)) + b;
		return flip * (-Math.exp(-2*Math.log(c/2)/d * (t-d)) + c + 1) + b;
	},
	bouncein: function(x, t, b, c, d) {
		return c - jQuery.easing['bounceout'](x, d-t, 0, c, d) + b;
	},
	bounceout: function(x, t, b, c, d) {
		if ((t/=d) < (1/2.75)) {
			return c*(7.5625*t*t) + b;
		} else if (t < (2/2.75)) {
			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
		} else if (t < (2.5/2.75)) {
			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
		} else {
			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
		}
	},
	bounceinout: function(x, t, b, c, d) {
		if (t < d/2) return jQuery.easing['bouncein'] (x, t*2, 0, c, d) * .5 + b;
		return jQuery.easing['bounceout'] (x, t*2-d,0, c, d) * .5 + c*.5 + b;
	},
	elasin: function(x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
	},
	elasout: function(x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
	},
	elasinout: function(x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
	},
	backin: function(x, t, b, c, d) {
		var s=1.70158;
		return c*(t/=d)*t*((s+1)*t - s) + b;
	},
	backout: function(x, t, b, c, d) {
		var s=1.70158;
		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
	},
	backinout: function(x, t, b, c, d) {
		var s=1.70158;
		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
	}
});


//dimension.js

/* Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * $LastChangedDate: 2007-10-06 20:11:15 +0200 (Sa, 06 Okt 2007) $
 * $Rev: 3581 $
 *
 * Version: @VERSION
 *
 * Requires: jQuery 1.2+
 */

(function($){
	
$.dimensions = {
	version: '@VERSION'
};

// Create innerHeight, innerWidth, outerHeight and outerWidth methods
$.each( [ 'Height', 'Width' ], function(i, name){
	
	// innerHeight and innerWidth
	$.fn[ 'inner' + name ] = function() {
		if (!this[0]) return;
		
		var torl = name == 'Height' ? 'Top'    : 'Left',  // top or left
		    borr = name == 'Height' ? 'Bottom' : 'Right'; // bottom or right
		
		return num( this, name.toLowerCase() ) + num(this, 'padding' + torl) + num(this, 'padding' + borr);
	};
	
	// outerHeight and outerWidth
	$.fn[ 'outer' + name ] = function(options) {
		if (!this[0]) return;
		
		var torl = name == 'Height' ? 'Top'    : 'Left',  // top or left
		    borr = name == 'Height' ? 'Bottom' : 'Right'; // bottom or right
		
		options = $.extend({ margin: false }, options || {});
		
		return num( this, name.toLowerCase() )
				+ num(this, 'border' + torl + 'Width') + num(this, 'border' + borr + 'Width')
				+ num(this, 'padding' + torl) + num(this, 'padding' + borr)
				+ (options.margin ? (num(this, 'margin' + torl) + num(this, 'margin' + borr)) : 0);
	};
});

// Create scrollLeft and scrollTop methods
$.each( ['Left', 'Top'], function(i, name) {
	$.fn[ 'scroll' + name ] = function(val) {
		if (!this[0]) return;
		
		return val != undefined ?
		
			// Set the scroll offset
			this.each(function() {
				this == window || this == document ?
					window.scrollTo( 
						name == 'Left' ? val : $(window)[ 'scrollLeft' ](),
						name == 'Top'  ? val : $(window)[ 'scrollTop'  ]()
					) :
					this[ 'scroll' + name ] = val;
			}) :
			
			// Return the scroll offset
			this[0] == window || this[0] == document ?
				self[ (name == 'Left' ? 'pageXOffset' : 'pageYOffset') ] ||
					$.boxModel && document.documentElement[ 'scroll' + name ] ||
					document.body[ 'scroll' + name ] :
				this[0][ 'scroll' + name ];
	};
});

$.fn.extend({
	position: function() {
		var left = 0, top = 0, elem = this[0], offset, parentOffset, offsetParent, results;
		
		if (elem) {
			// Get *real* offsetParent
			offsetParent = this.offsetParent();
			
			// Get correct offsets
			offset       = this.offset();
			parentOffset = offsetParent.offset();
			
			// Subtract element margins
			offset.top  -= num(elem, 'marginTop');
			offset.left -= num(elem, 'marginLeft');
			
			// Add offsetParent borders
			parentOffset.top  += num(offsetParent, 'borderTopWidth');
			parentOffset.left += num(offsetParent, 'borderLeftWidth');
			
			// Subtract the two offsets
			results = {
				top:  offset.top  - parentOffset.top,
				left: offset.left - parentOffset.left
			};
		}
		
		return results;
	},
	
	offsetParent: function() {
		var offsetParent = this[0].offsetParent;
		while ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && $.css(offsetParent, 'position') == 'static') )
			offsetParent = offsetParent.offsetParent;
		return $(offsetParent);
	}
});

function num(el, prop) {
	return parseInt($.css(el.jquery?el[0]:el,prop))||0;
};

})(jQuery);

//accordion.js

/*
 * jQuery UI Accordion
 * 
 * Copyright (c) 2007 Jörn Zaefferer
 *
 * http://docs.jquery.com/UI/Accordion
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 *
 * Revision: $Id: ui.accordion.js 5046 2008-03-17 09:18:08Z joern.zaefferer $
 *
 */

;(function($) {
	
// If the UI scope is not available, add it
$.ui = $.ui || {};

$.fn.extend({
	accordion: function(options, data) {
		var args = Array.prototype.slice.call(arguments, 1);

		return this.each(function() {
			if (typeof options == "string") {
				var accordion = $.data(this, "accordion");
				if (accordion)
					accordion[options].apply(accordion, args);
			// INIT with optional options
			} else if (!$(this).is(".ui-accordion"))
				$.data(this, "accordion", new $.ui.accordion(this, options));
		});
	},
	// deprecated, use accordion("activate", index) instead
	activate: function(index) {
		return this.accordion("activate", index);
	}
});

$.ui.accordion = function(container, options) {
	
	// setup configuration
	this.options = options = $.extend({}, $.ui.accordion.defaults, options);
	this.element = container;
	
	$(container).addClass("ui-accordion");
	
	if ( options.navigation ) {
		var current = $(container).find("a").filter(options.navigationFilter);
		if ( current.length ) {
			if ( current.filter(options.header).length ) {
				options.active = current;
			} else {
				options.active = current.parent().parent().prev();
				current.addClass("current");
			}
		}
	}
	
	// calculate active if not specified, using the first header
	options.headers = $(container).find(options.header);
	options.active = findActive(options.headers, options.active);

	if ( options.fillSpace ) {
		var maxHeight = $(container).parent().height();
		options.headers.each(function() {
			maxHeight -= $(this).outerHeight();
		});
		var maxPadding = 0;
		options.headers.next().each(function() {
			maxPadding = Math.max(maxPadding, $(this).innerHeight() - $(this).height());
		}).height(maxHeight - maxPadding);
	} else if ( options.autoHeight ) {
		var maxHeight = 0;
		options.headers.next().each(function() {
			maxHeight = Math.max(maxHeight, $(this).outerHeight());
		}).height(maxHeight);
	}

	options.headers
		.not(options.active || "")
		.next()
		.hide();
	options.active.parent().andSelf().addClass(options.selectedClass);
	
	if (options.event)
		$(container).bind((options.event) + ".accordion", clickHandler);
};

$.ui.accordion.prototype = {
	activate: function(index) {
		// call clickHandler with custom event
		clickHandler.call(this.element, {
			target: findActive( this.options.headers, index )[0]
		});
	},
	
	enable: function() {
		this.options.disabled = false;
	},
	disable: function() {
		this.options.disabled = true;
	},
	destroy: function() {
		this.options.headers.next().css("display", "");
		if ( this.options.fillSpace || this.options.autoHeight ) {
			this.options.headers.next().css("height", "");
		}
		$.removeData(this.element, "accordion");
		$(this.element).removeClass("ui-accordion").unbind(".accordion");
	}
};

function scopeCallback(callback, scope) {
	return function() {
		return callback.apply(scope, arguments);
	};
};

function completed(cancel) {
	// if removed while animated data can be empty
	if (!$.data(this, "accordion"))
		return;
	var instance = $.data(this, "accordion");
	var options = instance.options;
	options.running = cancel ? 0 : --options.running;
	if ( options.running )
		return;
	if ( options.clearStyle ) {
		options.toShow.add(options.toHide).css({
			height: "",
			overflow: ""
		});
	}
	$(this).triggerHandler("accordionchange", [options.data], options.change);
}

function toggle(toShow, toHide, data, clickedActive, down) {
	var options = $.data(this, "accordion").options;
	options.toShow = toShow;
	options.toHide = toHide;
	options.data = data;
	var complete = scopeCallback(completed, this);
	
	// count elements to animate
	options.running = toHide.size() == 0 ? toShow.size() : toHide.size();
	
	if ( options.animated ) {
		if ( !options.alwaysOpen && clickedActive ) {
			$.ui.accordion.animations[options.animated]({
				toShow: jQuery([]),
				toHide: toHide,
				complete: complete,
				down: down,
				autoHeight: options.autoHeight
			});
		} else {
			$.ui.accordion.animations[options.animated]({
				toShow: toShow,
				toHide: toHide,
				complete: complete,
				down: down,
				autoHeight: options.autoHeight
			});
		}
	} else {
		if ( !options.alwaysOpen && clickedActive ) {
			toShow.toggle();
		} else {
			toHide.hide();
			toShow.show();
		}
		complete(true);
	}
}

function clickHandler(event) {
	var options = $.data(this, "accordion").options;
	if (options.disabled)
		return false;
	
	// called only when using activate(false) to close all parts programmatically
	if ( !event.target && !options.alwaysOpen ) {
		options.active.parent().andSelf().toggleClass(options.selectedClass);
		var toHide = options.active.next(),
			data = {
				instance: this,
				options: options,
				newHeader: jQuery([]),
				oldHeader: options.active,
				newContent: jQuery([]),
				oldContent: toHide
			},
			toShow = options.active = $([]);
		toggle.call(this, toShow, toHide, data );
		return false;
	}
	// get the click target
	var clicked = $(event.target);
	
	// due to the event delegation model, we have to check if one
	// of the parent elements is our actual header, and find that
	if ( clicked.parents(options.header).length )
		while ( !clicked.is(options.header) )
			clicked = clicked.parent();
	
	var clickedActive = clicked[0] == options.active[0];
	
	// if animations are still active, or the active header is the target, ignore click
	if (options.running || (options.alwaysOpen && clickedActive))
		return false;
	if (!clicked.is(options.header))
		return;

	// switch classes
	options.active.parent().andSelf().toggleClass(options.selectedClass);
	if ( !clickedActive ) {
		clicked.parent().andSelf().addClass(options.selectedClass);
	}

	// find elements to show and hide
	var toShow = clicked.next(),
		toHide = options.active.next(),
		//data = [clicked, options.active, toShow, toHide],
		data = {
			instance: this,
			options: options,
			newHeader: clicked,
			oldHeader: options.active,
			newContent: toShow,
			oldContent: toHide
		},
		down = options.headers.index( options.active[0] ) > options.headers.index( clicked[0] );
	
	options.active = clickedActive ? $([]) : clicked;
	toggle.call(this, toShow, toHide, data, clickedActive, down );

	return false;
};

function findActive(headers, selector) {
	return selector != undefined
		? typeof selector == "number"
			? headers.filter(":eq(" + selector + ")")
			: headers.not(headers.not(selector))
		: selector === false
			? $([])
			: headers.filter(":eq(0)");
}

$.extend($.ui.accordion, {
	defaults: {
		selectedClass: "selected",
		alwaysOpen: true,
		animated: 'slide',
		event: "click",
		header: "a",
		autoHeight: true,
		running: 0,
		navigationFilter: function() {
			return this.href.toLowerCase() == location.href.toLowerCase();
		}
	},
	animations: {
		slide: function(options, additions) {
			options = $.extend({
				easing: "swing",
				duration: 300
			}, options, additions);
			if ( !options.toHide.size() ) {
				options.toShow.animate({height: "show"}, options);
				return;
			}
			var hideHeight = options.toHide.height(),
				showHeight = options.toShow.height(),
				difference = showHeight / hideHeight;
			options.toShow.css({ height: 0, overflow: 'hidden' }).show();
			options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate({height:"hide"},{
				step: function(now) {
					var current = (hideHeight - now) * difference;
					if ($.browser.msie || $.browser.opera) {
						current = Math.ceil(current);
					}
					options.toShow.height( current );
				},
				duration: options.duration,
				easing: options.easing,
				complete: function() {
					if ( !options.autoHeight ) {
						options.toShow.css("height", "auto");
					}
					options.complete();
				}
			});
		},
		bounceslide: function(options) {
			this.slide(options, {
				easing: options.down ? "bounceout" : "swing",
				duration: options.down ? 1000 : 500
			});
		},
		easeslide: function(options) {
			this.slide(options, {
				easing: "easeinout",
				duration: 700
			});
		}
	}
});

})(jQuery);

// accordian script
	jQuery().ready(function(){
		
	
		// highly customized accordion
		jQuery('#accordian').accordion({
			event: 'mouseover',
			active: '.selected',
			selectedClass: 'active',
			animated: "bounceslide",
			header: "div.header"
		}).bind("changeaccordion", function(event, ui) {
			jQuery('<div>' + ui.oldHeader.text() + ' hidden, ' + ui.newHeader.text() + ' shown</div>').appendTo('#log');
		});
		
		
		
		
	
	});
	



//script for tabs





$( function()
{
	$( 'a' ).each(
		function()
		{
			if( this.rel == 'external' ) this.target = '_blank';
		}
	);

	if( getQueryString( 'display' ) ) addScript( getQueryString( 'display' ) +'.js' );

	$( '#headlines .mainlink' ).click( function() 
	{
		var item = this;
		var id = this.id.replace( /link$/, '' );

		if( id != 'news' ) addScript( id +'.js' );

		var open = true;
		if( this.parentNode.className.match( 'headlineopen' ) )
		{
			open = false;
		}

		$( '#headlines .headlineopen' ).each(
			function()
			{
				var $this = $( this );

				/* Friggin fukin IE! */
				if( $.browser.msie && $.browser.version < 7 ) $this.find( 'div a' ).css( 'position', 'static' );
				$this.animate( { height: 24 }, 'fast', 'easein', function() { $( this ).removeClass( 'headlineopen' ); } );
			}
		);

		var parent = $( this.parentNode );
		if( open )
		{
			parent.animate( { height: parent.find( 'div' ).height() + 33 }, 'fast', 'easein', 
				function()
				{
					var $this = $( this );

				$this.addClass( 'headlineopen' ).css( 'height', 'auto' ).css( 'overflow', 'hidden' );
				}
			);
		}

		return false;
	} );

	
	
} );


function getQueryString( key ) 
{
	var query = window.location.search.substring( 1 );

	var vars = query.split( '&' );
	for( var i = 0, l = vars.length; i < l; i++ ) 
	{
		var pair = vars[i].split( '=' );
		if( pair[0] == key ) 
		{ 
			return pair[1];
		}
	}
	return false;
} 

function addScript( url )
{
	var script = document.createElement( 'script' )
	script = $( script );
	script.attr( 'src', 'js/'+ url );
	script.attr( 'type', 'text/javascript' );
	$( 'head' ).append( script );
}


function openWin( windowURL, windowName, windowFeatures ) {
	return window.open( windowURL, windowName, windowFeatures ) ;
}

function toggleVisibility(tId){
	if(document.getElementById(tId)){
		if(document.getElementById(tId).style.display == "none"){
			document.getElementById(tId).style.display = "";
		}
		else {
			document.getElementById(tId).style.display = "none";			
		}
	}
}	

// position helpers
function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}

// displays the messagebox 'id' with the message msg
function showMessagebox(id, msg)
{
	var div = document.getElementById (id);
	if (typeof msg != 'undefined') {
		div.firstChild.innerHTML = msg;
	}
	div.style.display='block';
	// scroll to div - 100...
	pos = findPos(div);
	window.scrollTo (0, Math.max (pos[1]-100, 0));
}


var bigImageContainerId = "big_image_container div span";
var togglerId = "toggler";
var thumbsContainerId = "thumbs_container";

// ----------------------------------------
$(document).ready(function() {
	var bigImageEl = $("#" + bigImageContainerId)[0];
	var togglerEl = $("#" + togglerId);
	var thumbsEl = $("#" + thumbsContainerId);
	var prevButtonId = "";

	thumbsEl.hide();

	$(".image_gallery a").click(function (){return false});
	$(".image_gallery img.thumb").each(function() {														
		$(this).click(function () {
			$("#" + bigImageContainerId + " img").attr( {
				src : $(this).parent().attr("rel")
			}).appendTo($(bigImageEl));
	
		});
	});
	togglerEl.click(function() {
		thumbsEl.toggle();
	});
	$("#" + thumbsContainerId + " a.close").click(function() {
		thumbsEl.hide();
	});

	$("#prev_button").click(function() {
		var imgSrc = $("#" + bigImageContainerId + " img").attr("src");
		if ($(".image_gallery a[rel="+imgSrc+"]").parent().prev().length)
		{
			$(".image_gallery a[rel="+imgSrc+"]").parent().prev().find("img").click();
		}
		else
		{
			$(".image_gallery:last-child").find("img").click();
		}
	});
	$("#next_button").click(function() {
		var imgSrc = $("#" + bigImageContainerId + " img").attr("src");
		if ($(".image_gallery a[rel="+imgSrc+"]").parent().next().length)
		{
			$(".image_gallery a[rel="+imgSrc+"]").parent().next().find("img").click();
		}
		else
		{
			$(".image_gallery img.thumb:first").click();
		}
	});
});

// ----------------------------------------


$(document).ready(function() {

	//Default Action
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content
	
	//On Click Event
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active content
		return false;
	});

});

