/*IE 6 hover plugin*/

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}('9 u=k(){9 g=/^([^#.>`]*)(#|\\.|\\>|\\`)(.+)$/;k u(a,b){9 c=a.J(/\\s*\\,\\s*/);9 d=[];n(9 i=0;i<c.l;i++){d=d.v(o(c[i],b))};6 d};k o(a,b,c){a=a.z(" ","`");9 d=a.r(g);9 e,5,m,7,i,h;9 f=[];4(d==8){d=[a,a]};4(d[1]==""){d[1]="*"};4(c==8){c="`"};4(b==8){b=E};K(d[2]){w"#":7=d[3].r(g);4(7==8){7=[8,d[3]]};e=E.L(7[1]);4(e==8||(d[1]!="*"&&!x(e,d[1]))){6 f};4(7.l==2){f.A(e);6 f};6 o(7[3],e,7[2]);w".":4(c!=">"){5=p(b,d[1])}y{5=b.B};n(i=0,h=5.l;i<h;i++){e=5[i];4(e.C!=1){q};7=d[3].r(g);4(7!=8){4(e.j==8||e.j.r("(\\\\s|^)"+7[1]+"(\\\\s|$)")==8){q};m=o(7[3],e,7[2]);f=f.v(m)}y 4(e.j!=8&&e.j.r("(\\\\s|^)"+d[3]+"(\\\\s|$)")!=8){f.A(e)}};6 f;w">":4(c!=">"){5=p(b,d[1])}y{5=b.B};n(i=0,h=5.l;i<h;i++){e=5[i];4(e.C!=1){q};4(!x(e,d[1])){q};m=o(d[3],e,">");f=f.v(m)};6 f;w"`":5=p(b,d[1]);n(i=0,h=5.l;i<h;i++){e=5[i];m=o(d[3],e,"`");f=f.v(m)};6 f;M:4(c!=">"){5=p(b,d[1])}y{5=b.B};n(i=0,h=5.l;i<h;i++){e=5[i];4(e.C!=1){q};4(!x(e,d[1])){q};f.A(e)};6 f}};k p(a,b){4(b=="*"&&a.F!=8){6 a.F};6 a.p(b)};k x(a,b){4(b=="*"){6 N};6 a.O.G().z("P:","")==b.G()};6 u}();k Q(a,b){9 c=u(a);n(9 i=0;i<c.l;i++){c[i].R=k(){4(t.j.H(b)==-1){t.j+=" "+b}};c[i].S=k(){4(t.j.H(b)!=-1){t.j=t.j.z(b,"")}}}}4(D.I&&!D.T){D.I("U",V)}',58,58,'||||if|listNodes|return|subselector|null|var||||||||limit||className|function|length|listSubNodes|for|doParse|getElementsByTagName|continue|match||this|parseSelector|concat|case|matchNodeNames|else|replace|push|childNodes|nodeType|window|document|all|toLowerCase|indexOf|attachEvent|split|switch|getElementById|default|true|nodeName|html|hoverForIE6|onmouseover|onmouseout|opera|onload|ieHover'.split('|'),0,{}))

/*parametrs [selector, hover_class]*/

function ieHover() {

	hoverForIE6(".nav li", "hover");

}



var transparentImage = "/images/none.gif";

function fixTrans() {

	if (typeof document.body.style.maxHeight == 'undefined') {

		var imgs = document.getElementsByTagName("img");

		for (i = 0; i < imgs.length; i++) {	

			if (imgs[i].src.indexOf(".png") != -1){

					var src = imgs[i].src;

					imgs[i].src = transparentImage;

					imgs[i].runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='crop')";

				}

			}	

		}

}



if (document.all && !window.opera)

	attachEvent("onload", fixTrans);



/*	sIFR v2.0.7

	Copyright 2004 - 2008 Mark Wubben and Mike Davidson. Prior contributions by Shaun Inman and Tomas Jogin.

	

	This software is licensed under the CC-GNU LGPL <http://creativecommons.org/licenses/LGPL/2.1/>

*/



var hasFlash=function(){var a=6;if(navigator.appVersion.indexOf("MSIE")!=-1&&navigator.appVersion.indexOf("Windows")>-1){document.write('<script language="VBScript"\> \non error resume next \nhasFlash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & '+a+'))) \n</script\> \n');if(window.hasFlash!=null)return window.hasFlash}if(navigator.mimeTypes&&navigator.mimeTypes["application/x-shockwave-flash"]&&navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){var b=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description;return parseInt(b.substr(b.indexOf(".")-2,2),10)>=a}return false}();String.prototype.normalize=function(){return this.replace(/\s+/g," ")};if(Array.prototype.push==null){Array.prototype.push=function(){var i=0,a=this.length,b=arguments.length;while(i<b){this[a++]=arguments[i++]}return this.length}}if(!Function.prototype.apply){Function.prototype.apply=function(a,b){var c=[];var d,e;if(!a)a=window;if(!b)b=[];for(var i=0;i<b.length;i++){c[i]="b["+i+"]"}e="a.__applyTemp__("+c.join(",")+");";a.__applyTemp__=this;d=eval(e);a.__applyTemp__=null;return d}}function named(a){return new named.Arguments(a)}named.Arguments=function(a){this.oArgs=a};named.Arguments.prototype.constructor=named.Arguments;named.extract=function(a,b){var c,d;var i=a.length;while(i--){d=a[i];if(d!=null&&d.constructor!=null&&d.constructor==named.Arguments){c=a[i].oArgs;break}}if(c==null)return;for(e in c)if(b[e]!=null)b[e](c[e]);return};var parseSelector=function(){var a=/^([^#.>`]*)(#|\.|\>|\`)(.+)$/;function r(s,t){var u=s.split(/\s*\,\s*/);var v=[];for(var i=0;i<u.length;i++)v=v.concat(b(u[i],t));return v}function b(c,d,e){c=c.normalize().replace(" ","`");var f=c.match(a);var g,h,i,j,k,n;var l=[];if(f==null)f=[c,c];if(f[1]=="")f[1]="*";if(e==null)e="`";if(d==null)d=document;switch(f[2]){case "#":k=f[3].match(a);if(k==null)k=[null,f[3]];g=document.getElementById(k[1]);if(g==null||(f[1]!="*"&&!o(g,f[1])))return l;if(k.length==2){l.push(g);return l}return b(k[3],g,k[2]);case ".":if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;k=f[3].match(a);if(k!=null){if(g.className==null||g.className.match("(\\s|^)"+k[1]+"(\\s|$)")==null)continue;j=b(k[3],g,k[2]);l=l.concat(j)}else if(g.className!=null&&g.className.match("(\\s|^)"+f[3]+"(\\s|$)")!=null)l.push(g)}return l;case ">":if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;if(!o(g,f[1]))continue;j=b(f[3],g,">");l=l.concat(j)}return l;case "`":h=m(d,f[1]);for(i=0,n=h.length;i<n;i++){g=h[i];j=b(f[3],g,"`");l=l.concat(j)}return l;default:if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;if(!o(g,f[1]))continue;l.push(g)}return l}}function m(d,o){if(o=="*"&&d.all!=null)return d.all;return d.getElementsByTagName(o)}function o(p,q){return q=="*"?true:p.nodeName.toLowerCase().replace("html:", "")==q.toLowerCase()}return r}();var sIFR=function(){var a="http://www.w3.org/1999/xhtml";var b=false;var c=false;var d;var ah=[];var al=document;var ak=al.documentElement;var am=window;var au=al.addEventListener;var av=am.addEventListener;var f=function(){var g=navigator.userAgent.toLowerCase();var f={a:g.indexOf("applewebkit")>-1,b:g.indexOf("safari")>-1,c:navigator.product!=null&&navigator.product.toLowerCase().indexOf("konqueror")>-1,d:g.indexOf("opera")>-1,e:al.contentType!=null&&al.contentType.indexOf("xml")>-1,f:true,g:true,h:null,i:null,j:null,k:null};f.l=f.a||f.c;f.m=!f.a&&navigator.product!=null&&navigator.product.toLowerCase()=="gecko";if(f.m&&g.match(/.*gecko\/(\d{8}).*/))f.j=new Number(g.match(/.*gecko\/(\d{8}).*/)[1]);f.n=g.indexOf("msie")>-1&&!f.d&&!f.l&&!f.m;f.o=f.n&&g.match(/.*mac.*/)!=null;if(f.d&&g.match(/.*opera(\s|\/)(\d+\.\d+)/))f.i=new Number(g.match(/.*opera(\s|\/)(\d+\.\d+)/)[2]);if(f.n||(f.d&&f.i<7.6))f.g=false;if(f.a&&g.match(/.*applewebkit\/(\d+).*/))f.k=new Number(g.match(/.*applewebkit\/(\d+).*/)[1]);if(am.hasFlash&&(!f.n||f.o)){var aj=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description;f.h=parseInt(aj.substr(aj.indexOf(".")-2,2),10)}if(g.match(/.*(windows|mac).*/)==null||f.o||f.c||(f.d&&(f.i<7.6))||(f.b&&f.h<7)||(!f.b&&f.a&&f.k<312)||(f.m&&f.j<20020523))f.f=false;if(!f.o&&!f.m&&al.createElementNS)try{al.createElementNS(a,"i").innerHTML=""}catch(e){f.e=true}f.p=f.c||(f.a&&f.k<312);return f}();function at(){return{bIsWebKit:f.a,bIsSafari:f.b,bIsKonq:f.c,bIsOpera:f.d,bIsXML:f.e,bHasTransparencySupport:f.f,bUseDOM:f.g,nFlashVersion:f.h,nOperaVersion:f.i,nGeckoBuildDate:f.j,nWebKitVersion:f.k,bIsKHTML:f.l,bIsGecko:f.m,bIsIE:f.n,bIsIEMac:f.o,bUseInnerHTMLHack:f.p}}if(am.hasFlash==false||!al.getElementsByTagName||!al.getElementById||(f.e&&(f.p||f.n)))return{UA:at()};function af(e){if((!k.bAutoInit&&(am.event||e)!=null)||!l(e))return;b=true;for(var i=0,h=ah.length;i<h;i++)j.apply(null,ah[i]);ah=[]}var k=af;function l(e){if(c==false||k.bIsDisabled==true||((f.e&&f.m||f.l)&&e==null&&b==false)||al.getElementsByTagName("body").length==0)return false;return true}function m(n){if(f.n)return n.replace(new RegExp("%\d{0}","g"),"%25");return n.replace(new RegExp("%(?!\d)","g"),"%25")}function as(p,q){return q=="*"?true:p.nodeName.toLowerCase().replace("html:", "")==q.toLowerCase()}function o(p,q,r,s,t){var u="";var v=p.firstChild;var w,x,y,z;if(s==null)s=0;if(t==null)t="";while(v){if(v.nodeType==3){z=v.nodeValue.replace("<","&lt;");switch(r){case "lower":u+=z.toLowerCase();break;case "upper":u+=z.toUpperCase();break;default:u+=z}}else if(v.nodeType==1){if(as(v,"a")&&!v.getAttribute("href")==false){if(v.getAttribute("target"))t+="&sifr_url_"+s+"_target="+v.getAttribute("target");t+="&sifr_url_"+s+"="+m(v.getAttribute("href")).replace(/&/g,"%26");u+='<a href="asfunction:_root.launchURL,'+s+'">';s++}else if(as(v,"br"))u+="<br/>";if(v.hasChildNodes()){y=o(v,null,r,s,t);u+=y.u;s=y.s;t=y.t}if(as(v,"a"))u+="</a>"}w=v;v=v.nextSibling;if(q!=null){x=w.parentNode.removeChild(w);q.appendChild(x)}}return{"u":u,"s":s,"t":t}}function A(B){if(al.createElementNS&&f.g)return al.createElementNS(a,B);return al.createElement(B)}function C(D,E,z){var p=A("param");p.setAttribute("name",E);p.setAttribute("value",z);D.appendChild(p)}function F(p,G){var H=p.className;if(H==null)H=G;else H=H.normalize()+(H==""?"":" ")+G;p.className=H}function aq(ar){var a=ak;if(k.bHideBrowserText==false)a=al.getElementsByTagName("body")[0];if((k.bHideBrowserText==false||ar)&&a)if(a.className==null||a.className.match(/\bsIFR\-hasFlash\b/)==null)F(a, "sIFR-hasFlash")}function j(I,J,K,L,M,N,O,P,Q,R,S,r,T){if(!l())return ah.push(arguments);aq();named.extract(arguments,{sSelector:function(ap){I=ap},sFlashSrc:function(ap){J=ap},sColor:function(ap){K=ap},sLinkColor:function(ap){L=ap},sHoverColor:function(ap){M=ap},sBgColor:function(ap){N=ap},nPaddingTop:function(ap){O=ap},nPaddingRight:function(ap){P=ap},nPaddingBottom:function(ap){Q=ap},nPaddingLeft:function(ap){R=ap},sFlashVars:function(ap){S=ap},sCase:function(ap){r=ap},sWmode:function(ap){T=ap}});var U=parseSelector(I);if(U.length==0)return false;if(S!=null)S="&"+S.normalize();else S="";if(K!=null)S+="&textcolor="+K;if(M!=null)S+="&hovercolor="+M;if(M!=null||L!=null)S+="&linkcolor="+(L||K);if(O==null)O=0;if(P==null)P=0;if(Q==null)Q=0;if(R==null)R=0;if(N==null)N="#FFFFFF";if(T=="transparent")if(!f.f)T="opaque";else N="transparent";if(T==null)T="";var p,V,W,X,Y,Z,aa,ab,ac;var ad=null;for(var i=0,h=U.length;i<h;i++){p=U[i];if(p.className!=null&&p.className.match(/\bsIFR\-replaced\b/)!=null)continue;V=p.offsetWidth-R-P;W=p.offsetHeight-O-Q;aa=A("span");aa.className="sIFR-alternate";ac=o(p,aa,r);Z="txt="+m(ac.u).replace(/\+/g,"%2B").replace(/&/g,"%26").replace(/\"/g, "%22").normalize() + S + "&w=" + V + "&h=" + W + ac.t;F(p,"sIFR-replaced");if(ad==null||!f.g){if(!f.g){if(!f.n)p.innerHTML=['<embed class="sIFR-flash" type="application/x-shockwave-flash" src="',J,'" quality="best" wmode="',T,'" bgcolor="',N,'" flashvars="',Z,'" width="',V,'" height="',W,'" sifr="true"></embed>'].join("");else p.innerHTML=['<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" sifr="true" width="',V,'" height="',W,'" class="sIFR-flash"><param name="movie" value="',J,'"></param><param name="flashvars" value="',Z,'"></param><param name="quality" value="best"></param><param name="wmode" value="',T,'"></param><param name="bgcolor" value="',N,'"></param> </object>'].join('')}else{if(f.d){ab=A("object");ab.setAttribute("data",J);C(ab,"quality","best");C(ab,"wmode",T);C(ab,"bgcolor",N)}else{ab=A("embed");ab.setAttribute("src",J);ab.setAttribute("quality","best");ab.setAttribute("flashvars",Z);ab.setAttribute("wmode",T);ab.setAttribute("bgcolor",N)}ab.setAttribute("sifr","true");ab.setAttribute("type","application/x-shockwave-flash");ab.className="sIFR-flash";if(!f.l||!f.e)ad=ab.cloneNode(true)}}else ab=ad.cloneNode(true);if(f.g){if(f.d)C(ab,"flashvars",Z);else ab.setAttribute("flashvars",Z);ab.setAttribute("width",V);ab.setAttribute("height",W);ab.style.width=V+"px";ab.style.height=W+"px";p.appendChild(ab)}p.appendChild(aa);if(f.p)p.innerHTML+=""}if(f.n&&k.bFixFragIdBug)setTimeout(function(){al.title=d},0)}function ai(){d=al.title}function ae(){if(k.bIsDisabled==true)return;c=true;if(k.bHideBrowserText)aq(true);if(am.attachEvent)am.attachEvent("onload",af);else if(!f.c&&(al.addEventListener||am.addEventListener)){if(f.a&&f.k>=132&&am.addEventListener)am.addEventListener("load",function(){setTimeout("sIFR({})",1)},false);else{if(al.addEventListener)al.addEventListener("load",af,false);if(am.addEventListener)am.addEventListener("load",af,false)}}else if(typeof am.onload=="function"){var ag=am.onload;am.onload=function(){ag();af()}}else am.onload=af;if(!f.n||am.location.hash=="")k.bFixFragIdBug=false;else ai()}k.UA=at();k.bAutoInit=true;k.bFixFragIdBug=true;k.replaceElement=j;k.updateDocumentTitle=ai;k.appendToClassName=F;k.setup=ae;k.debug=function(){aq(true)};k.debug.replaceNow=function(){ae();k()};k.bIsDisabled=false;k.bHideBrowserText=true;return k}();



if(typeof sIFR == "function" && !sIFR.UA.bIsIEMac && (!sIFR.UA.bIsWebKit || sIFR.UA.nWebKitVersion >= 100)){

	sIFR.setup();

};

/*	sIFR 2.0.1 Official Add-ons 1.2

	Copyright 2005 Mark Wubben



	This software is licensed under the CC-GNU LGPL <http://creativecommons.org/licenses/LGPL/2.1/>

*/



if(typeof sIFR=="function")(function(){var j=document;var h=j.documentElement;sIFR.removeDecoyClasses=function(){function a(b){if(b&&b.className!=null)b.className=b.className.replace(/\bsIFR-hasFlash\b/,"")}return function(){a(h);a(j.getElementsByTagName("body")[0])}}();sIFR.preferenceManager={storage:{sCookieId:"sifr",set:function(a){var b=new Date();b.setFullYear(b.getFullYear()+3);j.cookie=[this.sCookieId,"=",a,";expires=",b.toGMTString(),";path=/"].join("")},get:function(){var a=j.cookie.match(new RegExp(";?"+this.sCookieId+"=([^;]+);?"));if(a!=null&&a[1]=="false")return false;else return true},reset:function(){var a=new Date();a.setFullYear(a.getFullYear()-1);j.cookie=[this.sCookieId,"=true;expires=",a.toGMTString(),";path=/"].join("")}},disable:function(){this.storage.set(false)},enable:function(){this.storage.set(true)},test:function(){return this.storage.get()}};if(sIFR.preferenceManager.test()==false){sIFR.bIsDisabled=true;sIFR.removeDecoyClasses()}sIFR.rollback=function(){function a(b){var c,d,e,f,g,h;var l=parseSelector(b);var i=l.length-1;var m=false;while(i>=0){c=l[i];l.length--;d=c.parentNode;if(c.getAttribute("sifr")=="true"){h=0;while(h<d.childNodes.length){c=d.childNodes[h];if(c.className=="sIFR-alternate"){e=c;h++;continue}d.removeChild(c)}if(e!=null){f=e.firstChild;while(f!=null){g=f.nextSibling;d.appendChild(e.removeChild(f));f=g}d.removeChild(e)}if(!sIFR.UA.bIsXML&&sIFR.UA.bUseInnerHTMLHack)d.innerHTML+="";d.className=d.className.replace(/\bsIFR\-replaced\b/,"")};m=true;i--}return m}return function(k){named.extract(arguments,{sSelector:function(a){k=a}});if(k==null)k="";else k+=">";sIFR.removeDecoyClasses();sIFR.bHideBrowserText=false;if(a(k+"embed")==false)a(k+"object")}}()})()

	sIFR.replaceElement(named({sSelector:"h1 span", sFlashSrc:"/swf/myriad.swf", sWmode:"transparent", sColor:"#bf3236", nPaddingTop:0, nPaddingBottom:0}));





function initSlideBlocks(){

	

	// top slider

	var _opener = $('.submit-box .btn-submit');

	var _slideD = 1000;

	_opener.click(function(){

		if($(this).hasClass('opened')){

			$(this).removeClass('opened');

			$(this).prev('.slider').slideUp(_slideD);

		}else{

			$(this).addClass('opened');

			$(this).prev('.slider').slideDown(_slideD);

		}

		return false;

	});

	

	var _formSlideDur = 500;

	var _formHold = $('.hurt-form');

	

	// form sliders

	_formHold.each(function(){

		var __this = $(this);

		__this.mouseenter(function(){

			$(this).addClass('opened');

			if(!$(this).hasClass('focused')){

				var _h = $(this).find('.add-box ul').height();

				$(this).find('.add-box').animate({

					'height':_h+2

				},{duraion: _formSlideDur, queue: false});

			}

		});

		__this.mouseleave(function(){

			$(this).removeClass('opened');

			if(!$(this).hasClass('focused')){

				$(this).find('.add-box').animate({

					'height':0

				},{duraion: _formSlideDur, queue: false});

			}

		});

		__this.find('input, textarea, select').focus(function(){

			$(this).parents('.hurt-form').addClass('focused');

			if(!$(this).parents('.hurt-form').hasClass('opened')){

				$(this).parents('.hurt-form').find('.add-box').animate({

					'height':0

				},{duraion: _formSlideDur, queue: false});

			}

		});

		__this.find('input, textarea, select').blur(function(){

			$(this).parents('.hurt-form').removeClass('focused');

			if(!$(this).parents('.hurt-form').hasClass('opened')){

				$(this).parents('.hurt-form').find('.add-box').animate({

					'height':0

				},{duraion: _formSlideDur, queue: false});

			}

		});

	});

	

	// location

	$('.location-drop > a').hover(function(){

		$(this).parents('.location-drop').addClass('location-drop-hover');

	},function(){

		$(this).parents('.location-drop').removeClass('location-drop-hover');

	});

	$('.location-drop .drop').hover(function(){

		$(this).parents('.location-drop').addClass('location-drop-hover');

	},function(){

		$(this).parents('.location-drop').removeClass('location-drop-hover');

	});

	

	// tooltips

    $('.tooltip-holder').each(function(){

		var _x = 0;

		var _y = 0;

		var _tooltip = $('<div id="tooltip-container"></div>');

		$(this).mouseenter(function(e){

			var _rel = $(this).find('.title').text();

			if(_rel) _tooltip.html('<span>' + _rel + '</span>');

			var _offset = $(this).offset();

			_tooltip.css({

				left:e.pageX - _offset.left + 20,

				top:e.pageY - _offset.top + 20,

				opacity:0

			});

			$('body').append(_tooltip);

			setTimeout(function(){

				_tooltip.css('opacity',1);

			},10);

		}).mouseleave(function(){

			$('#tooltip-container').css({

				left:'-9999px',

				top:'-9999px'

			});

			_tooltip.remove();

		}).mousemove(function(e){

			_tooltip.css({left:e.pageX - _x + 20, top:e.pageY - _y + 20});

		});

	});

	

	

	// ajax drop appear

	var _openerP = $('.how-help-box .practice-btn, .how-help-box .drop');

	var _hideTime = false;

	_openerP.hover(function(){

		if(_hideTime) clearTimeout(_hideTime);

		$(this).parents('.how-help-box').addClass('how-help-box-hover');

	},function(){

		var ___this = $(this);

		_hideTime = setTimeout(function(){

			___this.parents('.how-help-box').removeClass('how-help-box-hover');

		},50);

	});

	

	// ajax drop implementation

	var _hideDropDur = 200;

	$('.how-help-box .drop a').click(function(){

		var _href = $(this).attr('href');

		var _holdContent = $(this).parents('.how-help-box').find('.center');

		var _hh = _holdContent.height();

		if(_href && _holdContent){

			var _obj = $(this);

			_obj.parents('.drop').animate({

				opacity:0

			},_hideDropDur,function(){

				_obj.parents('.drop').css('opacity',1);

				_obj.parents('.how-help-box').removeClass('how-help-box-hover');

			});

			_holdContent.html('<div class="loading-content">loading...</div>');

			_holdContent.css('height',_hh);

			$.ajax({

				url: _href,

				cache: false,

				dataType: 'html',

				success: function(_htmls){

					_holdContent.html(_htmls);

					_holdContent.css('height','auto');

				}

			});

		}

		return false;

	});

	

	// menu drop

	$('.tab-list > li').each(function(){

		var _li = $(this);

		_li.attr('_h',_li.find('.drop-holder').height());

		_li.find('.drop-holder').css('height',0).show();

		_li.click(function(){

			$(this).find('.drop-holder').animate({

				height:parseInt(_li.attr('_h'))

			},{

				duration:500,

				queue:false

			});

		});

		_li.mouseleave(function(){

			$(this).find('.drop-holder').animate({

				height:0

			},{

				duration:500,

				queue:false

			});

		});

	});

	

	//news rotator

	var _nHold = $('.news-box');

	_nHold.each(function(){

		var _nH = $(this);

		var _prBt = _nH.find('.prv-btn a');

		var _nxBt = _nH.find('.next-btn a');

		var _plBt = _nH.find('.stop-btn a');

		

		var __stopped = false;

		var ___animated = false;

		

		var _newsHolder = _nH.find('.gallery ul');

		var _newsEl = _newsHolder.find('li');

		var _hdHolder = _nH.find('.player-holder .info');

		var _hdEl = _hdHolder.find('p');

		

		var _currN = 0;

		var _nextN = 0;

		

		var _fadeN = 500; // fade animation duration

		var _slideN = 500; // slide animation duration

		var _showDelay = 8000; // 8 sec slideshow delay

		

		if(_newsEl.length>1 && _newsEl.length==_hdEl.length) {

			// reset news

			_newsHolder.css({

				position:'relative'

			});

			_newsEl.css({

				position:'absolute',

				left:0,

				top:0,

				zIndex:1

			});

			_newsEl.eq(_currN).css('z-index',2);

			_newsHolder.css('height',_newsEl.eq(_currN).height());

			

			// reset headings

			_hdHolder.css({

				position:'relative'

			});

			_hdEl.css({

				position:'absolute',

				left:0,

				top:0

			}).hide();

			_hdEl.eq(_currN).show();

			_hdHolder.css('height',_hdEl.eq(_currN).outerHeight()+2);

			

			// 'prev' click

			_prBt.click(function(){

				if(!___animated){

					___animated = true;

					_currN = _nextN;

					if(_nextN<_newsEl.length-1) _nextN++

					else _nextN = 0;

					newsAnima(_currN,_nextN);

				}

				return false;

			});

			

			// 'next' click

			_nxBt.click(function(){

				if(!___animated){

					___animated = true;

					_currN = _nextN;

					if(_nextN>0) _nextN--

					else _nextN = _newsEl.length-1;

					newsAnima(_currN,_nextN);

				}

				return false;

			});

			

			// auto rotation

			setInterval(function(){

				if(!__stopped && !___animated){

					___animated = true;

					_currN = _nextN;

					if(_nextN>0) _nextN--

					else _nextN = _newsEl.length-1;

					newsAnima(_currN,_nextN);

				}

			},_showDelay);

			

			// animation

			function newsAnima(prE,nxE){

				_hdEl.eq(prE).fadeOut(_fadeN);

				_hdEl.eq(nxE).fadeIn(_fadeN);

				_hdHolder.animate({

					'height':_hdEl.eq(nxE).outerHeight()+2

				},_slideN,function(){

					___animated = false;

				});

				

				_newsEl.eq(prE).fadeOut(_fadeN);

				_newsEl.eq(nxE).fadeIn(_fadeN);

				_newsHolder.animate({

					'height':_newsEl.eq(nxE).outerHeight()

				},_slideN);

			}

			

			// 'play'/'pause' button

			_plBt.click(function(){

				if($(this).parent().hasClass('play-btn')) {

					$(this).parent().removeClass('play-btn');

					__stopped = false;

				}else{

					$(this).parent().addClass('play-btn');

					__stopped = true;

				}

				return false;

			});

			

		}

	});

	

	// footer pics rotator

	$('.column-gallery').each(function(){

		var _navHolder = $(this);

		var _navEl = _navHolder.find('li');

		var _navSl = _navHolder.find('.gallery div');

		var _listUL = _navHolder.find('ul');

		var _listULW = _listUL.width();

		var _prevL = _navHolder.find('a.prev-btn');

		var _nextL = _navHolder.find('a.next-btn');

		var _currElPrev = _navEl.length-1;

		var _currElNext = 0;

		var _listAnimated = false;

		var _slideTime = 500;

		var _boxB = $(this);

		var ___hoverF = false;

		

		var _autoSlideS = 8000;  //8 sec slideshow delay

		

		_navHolder.hover(function(){

			___hoverF = true;

		},function(){

			___hoverF = false;

		});

		

		var _autoRotate = false;

		

		var _ulPrev = _listUL.clone(true).insertBefore(_listUL);

		var _ulNext = _listUL.clone(true).insertAfter(_listUL);

		

		_navSl.css('marginLeft',-_listULW);

		

		_prevL.click(function(){

			if(!_listAnimated){

				_listAnimated = true;

				_navSl.animate({

					'marginLeft':'+=' + _navEl.eq(_currElPrev).outerWidth()

				},_slideTime,function(){

					_listAnimated = false;

					if(parseInt(_navSl.css('marginLeft')) >= 0) {

						_navSl.css('marginLeft',-_listULW);

						_currElPrev = _navEl.length-1;

						_currElNext = 0;

					}

				});

				if(_currElPrev>0) _currElPrev--

				else _currElPrev = _navEl.length-1;

				if(_currElNext>0) _currElNext--

				else _currElNext = _navEl.length-1;

			}

			return false;

		});

		

		_nextL.click(function(){

			if(!_listAnimated){

				_listAnimated = true;

				_navSl.animate({

					'marginLeft':'-=' + _navEl.eq(_currElNext).outerWidth()

				},_slideTime,function(){

					_listAnimated = false;

					if(parseInt(_navSl.css('marginLeft')) <= -2*_listULW) {

						_navSl.css('marginLeft',-_listULW);

						_currElPrev = _navEl.length-1;

						_currElNext = 0;

					}

				});

				if(_currElPrev<_navEl.length-1) _currElPrev++

				else _currElPrev = 0;

				if(_currElNext<_navEl.length-1) _currElNext++

				else _currElNext = 0;

			}

			return false;

		});

		

		function autoR(){

			if(!_listAnimated){

				_listAnimated = true;

				_navSl.animate({

					'marginLeft':'-=' + _navEl.eq(_currElNext).outerWidth()

				},_slideTime,function(){

					_listAnimated = false;

					if(parseInt(_navSl.css('marginLeft')) <= -2*_listULW) {

						_navSl.css('marginLeft',-_listULW);

						_currElPrev = _navEl.length-1;

						_currElNext = 0;

					}

				});

				if(_currElPrev<_navEl.length-1) _currElPrev++

				else _currElPrev = 0;

				if(_currElNext<_navEl.length-1) _currElNext++

				else _currElNext = 0;

			}

			return false;

		}

		

		setInterval(function(){

			if(!___hoverF) autoR();

		},_autoSlideS);

	});

}

if (window.addEventListener) window.addEventListener("load", initSlideBlocks, false);

else if (window.attachEvent) window.attachEvent("onload", initSlideBlocks);



function initInputs(){

	var _inputs = document.getElementsByTagName('input');

	var _val = [];

	for(i=0;i<_inputs.length;i++) {

		if (_inputs[i].className.indexOf('text')!=-1) {

			_val[i] = _inputs[i].value;

			_inputs[i].index = i;

			_inputs[i].onfocus = function(){

				this.parentNode.className += ' focused';

				if(_val[this.index] == this.value) this.value = '';

			}

			_inputs[i].onblur = function(){

				this.parentNode.className = this.parentNode.className.replace('focused','');

				if(_val[this.index] == this.value || this.value == '') this.value = _val[this.index];

			}

		}

	}

	var _textareas = document.getElementsByTagName('textarea');

	var _val2 = [];

	for(i=0;i<_textareas.length;i++) {

		if (_textareas[i].className.indexOf('text')!=-1) {

			_val2[i] = _textareas[i].value;

			_textareas[i].index = i;

			_textareas[i].onfocus = function(){

				this.parentNode.className += ' focused';

				if(_val2[this.index] == this.value) this.value = '';

			}

			_textareas[i].onblur = function(){

				this.parentNode.className = this.parentNode.className.replace('focused','');

				if(_val2[this.index] == this.value || this.value == '') this.value = _val2[this.index];

			}

		}

	}

}



if (window.addEventListener) window.addEventListener("load", initInputs, false);

else if (window.attachEvent) window.attachEvent("onload", initInputs);


/***Hover Intent */
/**
* hoverIntent r6 // 2011.02.26 // jQuery 1.5.1+
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
* 
* @param  f  onMouseOver function || An object with configuration options
* @param  g  onMouseOut function  || Nothing (use configuration options object)
* @author    Brian Cherne brian(at)cherne(dot)net
*/
(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev])};var handleHover=function(e){var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t)}if(e.type=="mouseenter"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}}};return this.bind('mouseenter',handleHover).bind('mouseleave',handleHover)}})(jQuery);


		
		
	//Set custom configurations

var config = {

     sensitivity: 5, // number = sensitivity threshold (must be 1 or higher)

     interval: 50, // number = milliseconds for onMouseOver polling interval

     over: megaHoverOver, // function = onMouseOver callback (REQUIRED)

     timeout: 200, // number = milliseconds delay before onMouseOut

     out: megaHoverOut // function = onMouseOut callback (REQUIRED)

};




//On Hover Over

function megaHoverOver(){

    $(this).find(".mega").stop().fadeTo(50, .97).show(); //Find sub and fade it in

   }

//On Hover Out

function megaHoverOut(){

  $(this).find(".mega").stop().hide();

}

/* End hover Intent */


/***********************************************************************************************************************

DOCUMENT: includes/javascript.js

DEVELOPED BY: Ryan Stemkoski

COMPANY: Zipline Interactive

EMAIL: ryan@gozipline.com

PHONE: 509-321-2849

DATE: 3/26/2009

UPDATED: 3/25/2010

DESCRIPTION: This is the JavaScript required to create the accordion style menu.  Requires jQuery library

NOTE: Because of a bug in jQuery with IE8 we had to add an IE stylesheet hack to get the system to work in all browsers. I hate hacks but had no choice :(.

************************************************************************************************************************/

$(document).ready(function() {

	//For the Mega Drop

	$(".nav li .mega").css({'opacity':'0'}); //Fade sub nav to 0 opacity on default

	$(".nav li").hoverIntent(config); //Trigger Hover intent with custom configurations


	//ACCORDION BUTTON ACTION (ON CLICK DO THE FOLLOWING)

	$('.accordionButton').click(function() {



		//REMOVE THE ON CLASS FROM ALL BUTTONS

		$('.accordionButton').removeClass('on');

		  

		//NO MATTER WHAT WE CLOSE ALL OPEN SLIDES

	 	$('.accordionContent').slideUp('normal');

   

		//IF THE NEXT SLIDE WASN'T OPEN THEN OPEN IT

		if($(this).next().is(':hidden') == true) {

			

			//ADD THE ON CLASS TO THE BUTTON

			$(this).addClass('on');

			  

			//OPEN THE SLIDE

			$(this).next().slideDown('normal');

		 } 

		  

	 });

	  

	

	/*** REMOVE IF MOUSEOVER IS NOT REQUIRED ***/

	

	//ADDS THE .OVER CLASS FROM THE STYLESHEET ON MOUSEOVER 

	$('.accordionButton').mouseover(function() {

		$(this).addClass('over');

		

	//ON MOUSEOUT REMOVE THE OVER CLASS

	}).mouseout(function() {

		$(this).removeClass('over');										

	});

	

	/*** END REMOVE IF MOUSEOVER IS NOT REQUIRED ***/

	

	

	/********************************************************************************************************************

	CLOSES ALL S ON PAGE LOAD

	********************************************************************************************************************/	

	$('.accordionContent').hide();



});
