


/*****************************************************
 * Name: E-mail Signup Form Validation
 * Desc: Validates Form Input
 * Author: Lyris
 * Version: 2 (updated: 01/17/2012)
*****************************************************/
function emailCheck (emailStr) {var emailPat=/^(.+)@(.+)$/;var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]";var validChars="\[^\\s" + specialChars + "\]";var quotedUser="(\"[^\"]*\")";var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;var atom=validChars + '+';var word="(" + atom + "|" + quotedUser + ")";var userPat=new RegExp("^" + word + "(\\." + word + ")*$");var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");var matchArray=emailStr.match(emailPat);if (matchArray==null) {alert("Email address seems incorrect (check @ and .'s)");return false;}var user=matchArray[1];var domain=matchArray[2];if (user.match(userPat)==null) {alert("The username doesn't seem to be valid.");return false;}var IPArray=domain.match(ipDomainPat);if (IPArray!=null) {for (var i=1;i<=4;i++) {if (IPArray[i]>255) {alert("Destination IP address is invalid!");return false;}}return true;}var domainArray=domain.match(domainPat);if (domainArray==null) {alert("The domain name doesn't seem to be valid.");return false;}var atomPat=new RegExp(atom,"g");var domArr=domain.match(atomPat);var len=domArr.length;if ((domArr[domArr.length-1] != "info") &&(domArr[domArr.length-1] != "name") &&(domArr[domArr.length-1] != "arpa") &&(domArr[domArr.length-1] != "coop") &&(domArr[domArr.length-1] != "aero")) {if (domArr[domArr.length-1].length<2 ||domArr[domArr.length-1].length>3) {alert("The address must end in a three-letter domain, or two letter country.");return false;}}if (len<2){var errStr="This address is missing a hostname!";alert(errStr);return false;}return true;}function UPTvalidateform(thisform){if (emailCheck(thisform.email.value)){email_param = $('input[name$="email"]').val();thisform.action = 'http://www.allheart.com/emailsignup.html?email='+email_param+'&loc=bottom';return false;}else {return true;}}function UPTvalidateform2(thisform){if (emailCheck(thisform.email.value)){email_param = $('input[name$="email"]').val();thisform.action = 'http://www.allheart.com/emailsignup.html?email='+email_param+'&loc=top';return false;}else {return true;}}



/*****************************************************
 * Name: EXPAND/COLLAPSE FOOTER LOGOS
 * Desc: Expand Hidden Footer Logos onClick
 * Author: allheart
*****************************************************/
$(document).ready(function(){$(".footer-logos-all").hide();$(".footer-logos-more").click(function(){$(".footer-logos-all").slideToggle(500);$(this).toggleClass("view-less"); return false;});});



/*****************************************************
 * Name: IE5.5+ PNG Alpha Fix
 * Desc: Fixes ie6 Tansparency Issues for PNG Images
 * Author: Angus Turnbull
           http://www.twinhelix.com
		   Copyright (c) 2008-2009
 * Version: v2.0
 * License(s): GNU LGPL - http://creativecommons.org/licenses/LGPL/2.1/
*****************************************************/
var IEPNGFix=window.IEPNGFix||{}; IEPNGFix.tileBG=function(b,e,c){var a=this.data[b.uniqueID],k=Math.max(b.clientWidth,b.scrollWidth),l=Math.max(b.clientHeight,b.scrollHeight),n=b.currentStyle.backgroundPositionX,o=b.currentStyle.backgroundPositionY,p=b.currentStyle.backgroundRepeat;if(!a.tiles)a.tiles={elm:b,src:"",cache:[],img:new Image,old:{}};var a=a.tiles,h=a.img.width,i=a.img.height;if(e){if(!c&&e!=a.src)return a.img.onload=function(){this.onload=null;IEPNGFix.tileBG(b,e,1)},a.img.src=e}else a.src&&(c=1),h=i=0;a.src=e;if(c|| !(k==a.old.w&&l==a.old.h&&n==a.old.x&&o==a.old.y&&p==a.old.r)){var c={top:"0%",left:"0%",center:"50%",bottom:"100%",right:"100%"},d,f;d=c[n]||n;c=c[o]||o;if(f=d.match(/(\d+)%/))d=Math.round((k-h)*(parseInt(f[1])/100));if(f=c.match(/(\d+)%/))c=Math.round((l-i)*(parseInt(f[1])/100));d=parseInt(d);var c=parseInt(c),q={repeat:1,"repeat-x":1}[p],r={repeat:1,"repeat-y":1}[p];q&&(d%=h,d>0&&(d-=h));r&&(c%=i,c>0&&(c-=i));this.hook.enabled=0;if(!{relative:1,absolute:1}[b.currentStyle.position])b.style.position= "relative";f=0;var q=q?k:d+0.1,j,r=r?l:c+0.1,m,g,s;if(h&&i)for(;d<q;d+=h)for(j=c;j<r;j+=i){s=0;a.cache[f]||(a.cache[f]=document.createElement("div"),s=1);var t=Math.max(0,d+h>k?k-d:h),u=Math.max(0,j+i>l?l-j:i);m=a.cache[f];g=m.style;g.behavior="none";g.left=d-parseInt(b.currentStyle.paddingLeft)+"px";g.top=j+"px";g.width=t+"px";g.height=u+"px";g.clip="rect("+(j<0?0-j:0)+"px,"+t+"px,"+u+"px,"+(d<0?0-d:0)+"px)";g.display="block";if(s)g.position="absolute",g.zIndex=-999,b.firstChild?b.insertBefore(m, b.firstChild):b.appendChild(m);this.fix(m,e,0);f++}for(;f<a.cache.length;)this.fix(a.cache[f],"",0),a.cache[f++].style.display="none";this.hook.enabled=1;a.old={w:k,h:l,x:n,y:o,r:p}}};IEPNGFix.update=function(){for(var b in IEPNGFix.data){var e=IEPNGFix.data[b].tiles;e&&e.elm&&e.src&&IEPNGFix.tileBG(e.elm,e.src)}};IEPNGFix.update.timer=0; window.attachEvent&&!window.opera&&window.attachEvent("onresize",function(){clearTimeout(IEPNGFix.update.timer);IEPNGFix.update.timer=setTimeout(IEPNGFix.update,100)});



/*****************************************************
 * Name: Celebros Auto Complete
 * Desc: Search Box Auto Complete Menu
 * Author: Celebros 
           http://celebros.com/
 * Version:
 * License(s):
*****************************************************/
if(typeof YAHOO=="undefined")var YAHOO={};YAHOO.namespace=function(){var a=arguments,b=null,c,d,i;for(c=0;c<a.length;c+=1){i=a[c].split(".");b=YAHOO;for(d=i[0]=="YAHOO"?1:0;d<i.length;d+=1)b[i[d]]=b[i[d]]||{},b=b[i[d]]}return b};YAHOO.log=function(a,b,c){var d=YAHOO.widget.Logger;return d&&d.log?d.log(a,b,c):!1}; YAHOO.init=function(){this.namespace("util","widget","example");if(typeof YAHOO_config!="undefined"){var a=YAHOO_config.listener,b=YAHOO.env.listeners,c=!0,d;if(a){for(d=0;d<b.length;d+=1)if(b[d]==a){c=!1;break}c&&b.push(a)}}}; YAHOO.register=function(a,b,c){var d=YAHOO.env.modules;d[a]||(d[a]={versions:[],builds:[]});var d=d[a],i=c.version,c=c.build,h=YAHOO.env.listeners;d.name=a;d.version=i;d.build=c;d.versions.push(i);d.builds.push(c);d.mainClass=b;for(var j=0;j<h.length;j+=1)h[j](d);b?(b.VERSION=i,b.BUILD=c):YAHOO.log("mainClass is undefined for module "+a,"warn")};YAHOO.env=YAHOO.env||{modules:[],listeners:[],getVersion:function(a){return YAHOO.env.modules[a]||null}}; YAHOO.lang={isArray:function(a){return a.constructor&&a.constructor.toString().indexOf("Array")>-1?!0:YAHOO.lang.isObject(a)&&a.constructor==Array},isBoolean:function(a){return typeof a=="boolean"},isFunction:function(a){return typeof a=="function"},isNull:function(a){return a===null},isNumber:function(a){return typeof a=="number"&&isFinite(a)},isObject:function(a){return typeof a=="object"||YAHOO.lang.isFunction(a)},isString:function(a){return typeof a=="string"},isUndefined:function(a){return typeof a== "undefined"},hasOwnProperty:function(a,b){return Object.prototype.hasOwnProperty?a.hasOwnProperty(b):!YAHOO.lang.isUndefined(a[b])&&a.constructor.prototype[b]!==a[b]},extend:function(a,b,c){var d=function(){};d.prototype=b.prototype;a.prototype=new d;a.prototype.constructor=a;a.superclass=b.prototype;if(b.prototype.constructor==Object.prototype.constructor)b.prototype.constructor=b;if(c)for(var i in c)a.prototype[i]=c[i]},augment:function(a,b){var c=a.prototype,d=b.prototype,i=arguments,h;if(i[2])for(h= 2;h<i.length;h+=1)c[i[h]]=d[i[h]];else for(h in d)c[h]||(c[h]=d[h])}};YAHOO.init();YAHOO.util.Lang=YAHOO.lang;YAHOO.augment=YAHOO.lang.augment;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.2.0",build:"127"}); (function(){var a=YAHOO.util,b,c,d=0,i={},h=navigator.userAgent.toLowerCase(),j=h.indexOf("opera")>-1,n=h.indexOf("safari")>-1;!j&&!n&&h.indexOf("gecko");var m=!j&&h.indexOf("msie")>-1,f=/(-[a-z])/i,k=function(a){if(!f.test(a))return a;if(i[a])return i[a];for(;f.exec(a);)a=a.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());return i[a]=a};b=document.defaultView&&document.defaultView.getComputedStyle?function(a,g){var e=null,f=document.defaultView.getComputedStyle(a,"");f&&(e=f[k(g)]);return a.style[g]|| e}:document.documentElement.currentStyle&&m?function(a,g){switch(k(g)){case "opacity":var e=100;try{e=a.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(f){try{e=a.filters("alpha").opacity}catch(b){}}return e/100;default:return e=a.currentStyle?a.currentStyle[g]:null,a.style[g]||e}}:function(a,g){return a.style[g]};c=m?function(a,g,f){switch(g){case "opacity":if(typeof a.style.filter=="string"&&(a.style.filter="alpha(opacity="+f*100+")",!a.currentStyle||!a.currentStyle.hasLayout))a.style.zoom= 1;break;default:a.style[g]=f}}:function(a,g,f){a.style[g]=f};YAHOO.util.Dom={get:function(f){if(!f)return null;if(typeof f!="string"&&!(f instanceof Array))return f;if(typeof f=="string")return document.getElementById(f);else{for(var g=[],e=0,b=f.length;e<b;++e)g[g.length]=a.Dom.get(f[e]);return g}},getStyle:function(f,g){g=k(g);return a.Dom.batch(f,function(a){return b(a,g)},a.Dom,!0)},setStyle:function(f,g,e){g=k(g);a.Dom.batch(f,function(a){c(a,g,e)},a.Dom,!0)},getXY:function(f){return a.Dom.batch(f, function(f){if(f.parentNode===null||f.offsetParent===null||this.getStyle(f,"display")=="none")return!1;var e=null,b=[];if(f.getBoundingClientRect){e=f.getBoundingClientRect();b=document;if(!this.inDocument(f)&&parent.document!=document&&(b=parent.document,!this.isAncestor(b.documentElement,f)))return!1;f=Math.max(b.documentElement.scrollTop,b.body.scrollTop);b=Math.max(b.documentElement.scrollLeft,b.body.scrollLeft);return[e.left+b,e.top+f]}else{b=[f.offsetLeft,f.offsetTop];e=f.offsetParent;if(e!= f)for(;e;)b[0]+=e.offsetLeft,b[1]+=e.offsetTop,e=e.offsetParent;n&&this.getStyle(f,"position")=="absolute"&&(b[0]-=document.body.offsetLeft,b[1]-=document.body.offsetTop)}for(e=f.parentNode?f.parentNode:null;e&&e.tagName.toUpperCase()!="BODY"&&e.tagName.toUpperCase()!="HTML";)a.Dom.getStyle(e,"display")!="inline"&&(b[0]-=e.scrollLeft,b[1]-=e.scrollTop),e=e.parentNode?e.parentNode:null;return b},a.Dom,!0)},getX:function(f){return a.Dom.batch(f,function(f){return a.Dom.getXY(f)[0]},a.Dom,!0)},getY:function(f){return a.Dom.batch(f, function(f){return a.Dom.getXY(f)[1]},a.Dom,!0)},setXY:function(f,g,e){a.Dom.batch(f,function(a){var f=this.getStyle(a,"position");f=="static"&&(this.setStyle(a,"position","relative"),f="relative");var b=this.getXY(a);if(b===!1)return!1;var l=[parseInt(this.getStyle(a,"left"),10),parseInt(this.getStyle(a,"top"),10)];isNaN(l[0])&&(l[0]=f=="relative"?0:a.offsetLeft);isNaN(l[1])&&(l[1]=f=="relative"?0:a.offsetTop);if(g[0]!==null)a.style.left=g[0]-b[0]+l[0]+"px";if(g[1]!==null)a.style.top=g[1]-b[1]+l[1]+ "px";e||(f=this.getXY(a),(g[0]!==null&&f[0]!=g[0]||g[1]!==null&&f[1]!=g[1])&&this.setXY(a,g,!0))},a.Dom,!0)},setX:function(f,g){a.Dom.setXY(f,[g,null])},setY:function(f,g){a.Dom.setXY(f,[null,g])},getRegion:function(f){return a.Dom.batch(f,function(f){return new a.Region.getRegion(f)},a.Dom,!0)},getClientWidth:function(){return a.Dom.getViewportWidth()},getClientHeight:function(){return a.Dom.getViewportHeight()},getElementsByClassName:function(f,b,e){return a.Dom.getElementsBy(function(b){return a.Dom.hasClass(b, f)},b,e)},hasClass:function(f,b){var e=RegExp("(?:^|\\s+)"+b+"(?:\\s+|$)");return a.Dom.batch(f,function(a){return e.test(a.className)},a.Dom,!0)},addClass:function(f,b){a.Dom.batch(f,function(a){this.hasClass(a,b)||(a.className=[a.className,b].join(" "))},a.Dom,!0)},removeClass:function(f,b){var e=RegExp("(?:^|\\s+)"+b+"(?:\\s+|$)","g");a.Dom.batch(f,function(a){if(this.hasClass(a,b))a.className=a.className.replace(e," "),this.hasClass(a,b)&&this.removeClass(a,b)},a.Dom,!0)},replaceClass:function(f, b,e){if(b===e)return!1;var k=RegExp("(?:^|\\s+)"+b+"(?:\\s+|$)","g");a.Dom.batch(f,function(a){this.hasClass(a,b)?(a.className=a.className.replace(k," "+e+" "),this.hasClass(a,b)&&this.replaceClass(a,b,e)):this.addClass(a,e)},a.Dom,!0)},generateId:function(f,b){b=b||"yui-gen";f=f||{};return a.Dom.batch(f,function(f){f=f?a.Dom.get(f):{};if(!f.id)f.id=b+d++;return f.id},a.Dom,!0)},isAncestor:function(f,b){f=a.Dom.get(f);return!f||!b?!1:a.Dom.batch(b,function(a){if(f.contains&&!n)return f.contains(a); else if(f.compareDocumentPosition)return!!(f.compareDocumentPosition(a)&16);else{for(a=a.parentNode;a;){if(a==f)return!0;else if(!a.tagName||a.tagName.toUpperCase()=="HTML")break;a=a.parentNode}return!1}},a.Dom,!0)},inDocument:function(f){return a.Dom.batch(f,function(a){return this.isAncestor(document.documentElement,a)},a.Dom,!0)},getElementsBy:function(f,b,e){var b=b||"*",k=[];if(e){if(e=a.Dom.get(e),!e)return k}else e=document;var c=e.getElementsByTagName(b);if(!c.length&&b=="*"&&e.all)c=e.all; b=0;for(e=c.length;b<e;++b)f(c[b])&&(k[k.length]=c[b]);return k},batch:function(f,b,e,k){f=a.Dom.get(f);k=k?e:window;if(!f||f.tagName||!f.length)return!f?!1:b.call(k,f,e);for(var c=[],d=0,i=f.length;d<i;++d)c[c.length]=b.call(k,f[d],e);return c},getDocumentHeight:function(){return Math.max(document.compatMode!="CSS1Compat"?document.body.scrollHeight:document.documentElement.scrollHeight,a.Dom.getViewportHeight())},getDocumentWidth:function(){return Math.max(document.compatMode!="CSS1Compat"?document.body.scrollWidth: document.documentElement.scrollWidth,a.Dom.getViewportWidth())},getViewportHeight:function(){var a=self.innerHeight,f=document.compatMode;if((f||m)&&!j)a=f=="CSS1Compat"?document.documentElement.clientHeight:document.body.clientHeight;return a},getViewportWidth:function(){var a=self.innerWidth,f=document.compatMode;if(f||m)a=f=="CSS1Compat"?document.documentElement.clientWidth:document.body.clientWidth;return a}}})(); YAHOO.util.Region=function(a,b,c,d){this.top=a;this[1]=a;this.right=b;this.bottom=c;this.left=d;this[0]=d};YAHOO.util.Region.prototype.contains=function(a){return a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom};YAHOO.util.Region.prototype.getArea=function(){return(this.bottom-this.top)*(this.right-this.left)}; YAHOO.util.Region.prototype.intersect=function(a){var b=Math.max(this.top,a.top),c=Math.min(this.right,a.right),d=Math.min(this.bottom,a.bottom),a=Math.max(this.left,a.left);return d>=b&&c>=a?new YAHOO.util.Region(b,c,d,a):null};YAHOO.util.Region.prototype.union=function(a){var b=Math.min(this.top,a.top),c=Math.max(this.right,a.right),d=Math.max(this.bottom,a.bottom),a=Math.min(this.left,a.left);return new YAHOO.util.Region(b,c,d,a)}; YAHOO.util.Region.prototype.toString=function(){return"Region {top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}"};YAHOO.util.Region.getRegion=function(a){var b=YAHOO.util.Dom.getXY(a);return new YAHOO.util.Region(b[1],b[0]+a.offsetWidth,b[1]+a.offsetHeight,b[0])};YAHOO.util.Point=function(a,b){a instanceof Array&&(b=a[1],a=a[0]);this.x=this.right=this.left=this[0]=a;this.y=this.top=this.bottom=this[1]=b};YAHOO.util.Point.prototype=new YAHOO.util.Region; YAHOO.register("dom",YAHOO.util.Dom,{version:"2.2.0",build:"127"}); if(!YAHOO.util.Event)YAHOO.util.Event=function(){var a=!1,b=[],c=[],d=[],i=[],h=0,j=[],n=[],m=0;return{POLL_RETRYS:200,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,OBJ:3,ADJ_SCOPE:4,isSafari:/KHTML/gi.test(navigator.userAgent),webkit:function(){var a=navigator.userAgent.match(/AppleWebKit\/([^ ]*)/);return a&&a[1]?a[1]:null}(),isIE:!this.webkit&&!navigator.userAgent.match(/opera/gi)&&navigator.userAgent.match(/msie/gi),_interval:null,startInterval:function(){if(!this._interval){var a=this;this._interval= setInterval(function(){a._tryPreloadAttach()},this.POLL_INTERVAL)}},onAvailable:function(a,b,c,g){j.push({id:a,fn:b,obj:c,override:g,checkReady:!1});h=this.POLL_RETRYS;this.startInterval()},onContentReady:function(a,b,c,g){j.push({id:a,fn:b,obj:c,override:g,checkReady:!0});h=this.POLL_RETRYS;this.startInterval()},addListener:function(a,k,l,g,e){if(!l||!l.call)return!1;if(this._isValidCollection(a)){for(var h=!0,j=0,m=a.length;j<m;++j)h=this.on(a[j],k,l,g,e)&&h;return h}else if(typeof a=="string")if(h= this.getEl(a))a=h;else return this.onAvailable(a,function(){YAHOO.util.Event.on(a,k,l,g,e)}),!0;if(!a)return!1;if("unload"==k&&g!==this)return c[c.length]=[a,k,l,g,e],!0;var q=a;e&&(q=e===!0?g:e);h=function(a){return l.call(q,YAHOO.util.Event.getEvent(a),g)};j=[a,k,l,h,q];b[b.length]=j;if(this.useLegacyEvent(a,k)){var o=this.getLegacyIndex(a,k);if(o==-1||a!=d[o][0])o=d.length,n[a.id+k]=o,d[o]=[a,k,a["on"+k]],i[o]=[],a["on"+k]=function(a){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(a), o)};i[o].push(j)}else try{this._simpleAdd(a,k,h,!1)}catch(r){return this.lastError=r,this.removeListener(a,k,l),!1}return!0},fireLegacyEvent:function(a,b){var c=!0,g,e,h;g=i[b];for(var j=0,n=g.length;j<n;++j)if((e=g[j])&&e[this.WFN])h=e[this.ADJ_SCOPE],e=e[this.WFN].call(h,a),c=c&&e;if((g=d[b])&&g[2])g[2](a);return c},getLegacyIndex:function(a,b){var c=this.generateId(a)+b;return typeof n[c]=="undefined"?-1:n[c]},useLegacyEvent:function(a,b){if(this.webkit&&("click"==b||"dblclick"==b)){var c=parseInt(this.webkit, 10);if(!isNaN(c)&&c<418)return!0}return!1},removeListener:function(a,k,d,g){var e,h;if(typeof a=="string")a=this.getEl(a);else if(this._isValidCollection(a)){g=!0;for(e=0,h=a.length;e<h;++e)g=this.removeListener(a[e],k,d)&&g;return g}if(!d||!d.call)return this.purgeElement(a,!1,k);if("unload"==k){for(e=0,h=c.length;e<h;e++){var j=c[e];if(j&&j[0]==a&&j[1]==k&&j[2]==d)return c.splice(e,1),!0}return!1}e=null;"undefined"==typeof g&&(g=this._getCacheIndex(a,k,d));g>=0&&(e=b[g]);if(!a||!e)return!1;if(this.useLegacyEvent(a, k)){e=this.getLegacyIndex(a,k);var n=i[e];if(n)for(e=0,h=n.length;e<h;++e)if((j=n[e])&&j[this.EL]==a&&j[this.TYPE]==k&&j[this.FN]==d){n.splice(e,1);break}}else try{this._simpleRemove(a,k,e[this.WFN],!1)}catch(m){return this.lastError=m,!1}delete b[g][this.WFN];delete b[g][this.FN];b.splice(g,1);return!0},getTarget:function(a){return this.resolveTextNode(a.target||a.srcElement)},resolveTextNode:function(a){return a&&3==a.nodeType?a.parentNode:a},getPageX:function(a){var b=a.pageX;!b&&0!==b&&(b=a.clientX|| 0,this.isIE&&(b+=this._getScrollLeft()));return b},getPageY:function(a){var b=a.pageY;!b&&0!==b&&(b=a.clientY||0,this.isIE&&(b+=this._getScrollTop()));return b},getXY:function(a){return[this.getPageX(a),this.getPageY(a)]},getRelatedTarget:function(a){var b=a.relatedTarget;if(!b)if(a.type=="mouseout")b=a.toElement;else if(a.type=="mouseover")b=a.fromElement;return this.resolveTextNode(b)},getTime:function(a){if(!a.time){var b=(new Date).getTime();try{a.time=b}catch(c){return this.lastError=c,b}}return a.time}, stopEvent:function(a){this.stopPropagation(a);this.preventDefault(a)},stopPropagation:function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},preventDefault:function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},getEvent:function(a){a=a||window.event;if(!a)for(var b=this.getEvent.caller;b;){if((a=b.arguments[0])&&Event==a.constructor)break;b=b.caller}return a},getCharCode:function(a){return a.charCode||a.keyCode||0},_getCacheIndex:function(a,c,d){for(var g=0,e=b.length;g<e;++g){var h= b[g];if(h&&h[this.FN]==d&&h[this.EL]==a&&h[this.TYPE]==c)return g}return-1},generateId:function(a){var b=a.id;if(!b)b="yuievtautoid-"+m,++m,a.id=b;return b},_isValidCollection:function(a){return a&&a.length&&typeof a!="string"&&!a.tagName&&!a.alert&&typeof a[0]!="undefined"},elCache:{},getEl:function(a){return document.getElementById(a)},clearCache:function(){},_load:function(){a=!0;var b=YAHOO.util.Event;this.isIE&&b._simpleRemove(window,"load",b._load)},_tryPreloadAttach:function(){if(this.locked)return!1; this.locked=!0;var b=!a;b||(b=h>0);for(var c=[],d=0,g=j.length;d<g;++d){var e=j[d];if(e){var i=this.getEl(e.id);if(i){if(!e.checkReady||a||i.nextSibling||document&&document.body)e.override&&(i=e.override===!0?e.obj:e.override),e.fn.call(i,e.obj),j[d]=null}else c.push(e)}}h=c.length===0?0:h-1;b?this.startInterval():(clearInterval(this._interval),this._interval=null);this.locked=!1;return!0},purgeElement:function(a,b,c){var d=this.getListeners(a,c);if(d)for(var e=0,h=d.length;e<h;++e){var j=d[e];this.removeListener(a, j.type,j.fn)}if(b&&a&&a.childNodes)for(e=0,h=a.childNodes.length;e<h;++e)this.purgeElement(a.childNodes[e],b,c)},getListeners:function(a,d){var h=[],g;g=d?d=="unload"?[c]:[b]:[b,c];for(var e=0;e<g.length;++e){var j=g[e];if(j&&j.length>0)for(var i=0,n=j.length;i<n;++i){var m=j[i];m&&m[this.EL]===a&&(!d||d===m[this.TYPE])&&h.push({type:m[this.TYPE],fn:m[this.FN],obj:m[this.OBJ],adjust:m[this.ADJ_SCOPE],index:i})}}return h.length?h:null},_unload:function(a){var h=YAHOO.util.Event,j,g,e;for(j=0,e=c.length;j< e;++j)if(g=c[j]){var i=window;g[h.ADJ_SCOPE]&&(i=g[h.ADJ_SCOPE]===!0?g[h.OBJ]:g[h.ADJ_SCOPE]);g[h.FN].call(i,h.getEvent(a),g[h.OBJ]);c[j]=null}c=null;if(b&&b.length>0){for(a=b.length;a;)j=a-1,(g=b[j])&&h.removeListener(g[h.EL],g[h.TYPE],g[h.FN],j),a-=1;h.clearCache()}for(j=0,e=d.length;j<e;++j)d[j][0]=null,d[j]=null;d=null;h._simpleRemove(window,"unload",h._unload)},_getScrollLeft:function(){return this._getScroll()[1]},_getScrollTop:function(){return this._getScroll()[0]},_getScroll:function(){var a= document.documentElement,b=document.body;return a&&(a.scrollTop||a.scrollLeft)?[a.scrollTop,a.scrollLeft]:b?[b.scrollTop,b.scrollLeft]:[0,0]},regCE:function(){},_simpleAdd:function(){return window.addEventListener?function(a,b,c,d){a.addEventListener(b,c,d)}:window.attachEvent?function(a,b,c){a.attachEvent("on"+b,c)}:function(){}}(),_simpleRemove:function(){return window.removeEventListener?function(a,b,c,d){a.removeEventListener(b,c,d)}:window.detachEvent?function(a,b,c){a.detachEvent("on"+b,c)}: function(){}}()}}(),function(){var a=YAHOO.util.Event;a.on=a.addListener;document&&document.body?a._load():a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach()}();YAHOO.util.CustomEvent=function(a,b,c,d){this.type=a;this.scope=b||window;this.silent=c;this.signature=d||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(a!=="_YUICEOnSubscribe")this.subscribeEvent=new YAHOO.util.CustomEvent("_YUICEOnSubscribe",this,!0)};YAHOO.util.CustomEvent.LIST=0; YAHOO.util.CustomEvent.FLAT=1; YAHOO.util.CustomEvent.prototype={subscribe:function(a,b,c){this.subscribeEvent&&this.subscribeEvent.fire(a,b,c);this.subscribers.push(new YAHOO.util.Subscriber(a,b,c))},unsubscribe:function(a,b){if(!a)return this.unsubscribeAll();for(var c=!1,d=0,i=this.subscribers.length;d<i;++d){var h=this.subscribers[d];h&&h.contains(a,b)&&(this._delete(d),c=!0)}return c},fire:function(){var a=this.subscribers.length;if(!a&&this.silent)return!0;var b=[],c=!0,d;for(d=0;d<arguments.length;++d)b.push(arguments[d]);for(d= 0;d<a;++d)if(c=this.subscribers[d]){var i=c.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var h=null;b.length>0&&(h=b[0]);c=c.fn.call(i,h,c.obj)}else c=c.fn.call(i,this.type,b,c.obj);if(!1===c)return!1}return!0},unsubscribeAll:function(){for(var a=0,b=this.subscribers.length;a<b;++a)this._delete(b-1-a);return a},_delete:function(a){var b=this.subscribers[a];b&&(delete b.fn,delete b.obj);this.subscribers.splice(a,1)},toString:function(){return"CustomEvent: '"+this.type+"', scope: "+ this.scope}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=b||null;this.override=c};YAHOO.util.Subscriber.prototype.getScope=function(a){return this.override?this.override===!0?this.obj:this.override:a};YAHOO.util.Subscriber.prototype.contains=function(a,b){return b?this.fn==a&&this.obj==b:this.fn==a};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+(this.obj||"")+", override: "+(this.override||"no")+" }"};YAHOO.util.EventProvider=function(){}; YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,b,c,d){this.__yui_events=this.__yui_events||{};var i=this.__yui_events[a];i?i.subscribe(b,c,d):(i=this.__yui_subscribers=this.__yui_subscribers||{},i[a]||(i[a]=[]),i[a].push({fn:b,obj:c,override:d}))},unsubscribe:function(a,b,c){this.__yui_events=this.__yui_events||{};return(a=this.__yui_events[a])?a.unsubscribe(b,c):!1},unsubscribeAll:function(a){return this.unsubscribe(a)},createEvent:function(a,b){this.__yui_events= this.__yui_events||{};var c=b||{},d=this.__yui_events;if(!d[a]){var i=new YAHOO.util.CustomEvent(a,c.scope||this,c.silent||null,YAHOO.util.CustomEvent.FLAT);d[a]=i;c.onSubscribeCallback&&i.subscribeEvent.subscribe(c.onSubscribeCallback);this.__yui_subscribers=this.__yui_subscribers||{};if(c=this.__yui_subscribers[a])for(var h=0;h<c.length;++h)i.subscribe(c[h].fn,c[h].obj,c[h].override)}return d[a]},fireEvent:function(a,b,c,d){this.__yui_events=this.__yui_events||{};var i=this.__yui_events[a];if(i){for(var h= [],j=1;j<arguments.length;++j)h.push(arguments[j]);return i.fire.apply(i,h)}else return null},hasEvent:function(a){return this.__yui_events&&this.__yui_events[a]?!0:!1}}; YAHOO.util.KeyListener=function(a,b,c,d){function i(a){if(!b.shift)b.shift=!1;if(!b.alt)b.alt=!1;if(!b.ctrl)b.ctrl=!1;if(a.shiftKey==b.shift&&a.altKey==b.alt&&a.ctrlKey==b.ctrl){var c;if(b.keys instanceof Array)for(var d=0;d<b.keys.length;d++)if(c=b.keys[d],c==a.charCode){h.fire(a.charCode,a);break}else{if(c==a.keyCode){h.fire(a.keyCode,a);break}}else c=b.keys,c==a.charCode?h.fire(a.charCode,a):c==a.keyCode&&h.fire(a.keyCode,a)}}if(!d)d=YAHOO.util.KeyListener.KEYDOWN;var h=new YAHOO.util.CustomEvent("keyPressed"); this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");typeof a=="string"&&(a=document.getElementById(a));typeof c=="function"?h.subscribe(c):h.subscribe(c.fn,c.scope,c.correctScope);this.enable=function(){this.enabled||(YAHOO.util.Event.addListener(a,d,i),this.enabledEvent.fire(b));this.enabled=!0};this.disable=function(){this.enabled&&(YAHOO.util.Event.removeListener(a,d,i),this.disabledEvent.fire(b));this.enabled=!1};this.toString=function(){return"KeyListener ["+ b.keys+"] "+a.tagName+(a.id?"["+a.id+"]":"")}};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.register("event",YAHOO.util.Event,{version:"2.2.0",build:"127"});var bLoaded=!1,initialized=!1;function JSLoaded(){bLoaded=!0} function LoadACJS(){if(!bLoaded)script=document.createElement("script"),script.type="text/javascript",script.src=sProtocol+"//"+sSiteKey+"-AC.celebros-analytics.com/AutoComplete/autocompleteV2.js",document.getElementsByTagName("head")[0].appendChild(script)}function isArray(a){if(a){var b=YAHOO.lang;return b.isNumber(a.length)&&b.isFunction(a.splice)&&!b.hasOwnProperty(a.length)}return!1} function InsertElementAfterEnd(a,b){a.nextSibling?a.parentNode.insertBefore(b,a.nextSibling):a.parentNode.appendChild(b)}var sSeperator;function IsSpecialSuggestion(a){return a.length>1?a.charAt(0)==sSeperator&&a.charAt(a.length-1)==sSeperator?!0:!1:!1}window.location.protocol=="http:"?sProtocol="http:":window.location.protocol=="https:"&&(sProtocol="https:");var sDisableParemeter="autocomplete=no",sProtocol,sServiceLocation,sSiteKey,sSearchBox,oSearchBox,oResultFunction; function CelebrosAutoComplete(a,b,c,d,i){window.location.href.indexOf(sDisableParemeter)==-1&&(sServiceLocation=sProtocol+"//"+a+"-ACS.celebros-analytics.com/AutoCompleteWebServiceV2/GetSuggestions.aspx",sSiteKey=a,sSearchBox=b,oResultFunction=c,oSearchBox=document.getElementById(sSearchBox),YAHOO.util.Event.addListener(oSearchBox,"focus",LoadACJS),initAC(d,i))} function ItemSelected(a,b){oAc=b[0];oItem=b[1];oItemData=b[2];var c="",d="",i="",h="";if(oAc._typedQuery!=void 0)d=oAc._typedQuery;h=[];if(oItemData==null)c=document.getElementById(sSearchBox).value,c=c.replace(/</g,""),c=c.replace(/>/g,""),c=c.replace(/'/g,"");else for(var c=oItemData[0],i=oItemData[1],j=0;j<oAc._aListItems.length;j++)oAc._aListItems[j]._oResultData&&(IsSpecialSuggestion(oAc._aListItems[j]._oResultData[0],"#")||(oAc._aListItems[j]._oResultData[5]!=""?h.push(oAc._aListItems[j]._oResultData[5]): h.push(oAc._aListItems[j]._oResultData[0])));if(oResultFunction)j=[],j.SelectedQuery=c,j.EnteredQuery=d,j.SelectedURL=i,j.Suggestions=h,j.IsAutoComplete=oItemData!=null,document.getElementById(sSearchBox).value=c,oResultFunction(j)} function initAC(a,b){if(bLoaded){if(!initialized){initialized=!0;var c=[];sSeperator="#";c.SeperatorFunction=IsSpecialSuggestion;var d=document.createElement("div");d.setAttribute("id","divSuggestions");InsertElementAfterEnd(document.getElementById(sSearchBox),d);var i=new YAHOO.widget.DS_XHR(sServiceLocation,"sug,dc,u,iu,p,l,s".split(","));i.responseType=YAHOO.widget.DS_XHR.TYPE_XML;i.maxCacheEntries=0;i.scriptQueryParam="strPrefix";i.scriptQueryAppend="strSiteKey="+sSiteKey;c=new YAHOO.widget.AutoComplete(sSearchBox, d,i,c);c.minQueryLength=1;c.queryDelay=0.1;c.autoHighlight=!1;c.maxResultsDisplayed=100;c.typeAhead=!0;c.useShadow=!1;c.forceSelection=!1;c.itemSelectEvent.subscribe(this.ItemSelected,this);typeof a!="undefined"&&c.containerExpandEvent.subscribe(a);typeof b!="undefined"&&c.containerCollapseEvent.subscribe(b);c.formatResult=function(a,b){var c=b[0],d=b[3],f=b[4];if(c.charAt(0)=="#"&&c.charAt(c.length-1)=="#")return a.className="ACHeaderItem","<b>"+c.substr(1,c.length-2)+"</b>";if(!(d==""||f=="")){var i= [],l=0,g=0;if(isArray(d)==!1)l=parseInt(d),g=parseInt(f),i.push(c.substr(0,l)),i.push("<b><u>"),i.push(c.substr(l,g)),i.push("</u></b>"),i.push(c.substr(l+g,c.length));else if(d.length==f.length){for(var e=0,p=0;p<d.length;p++)l=parseInt(d[p]),g=parseInt(f[p]),i.push(c.substr(e,l-e)),i.push("<b><u>"),i.push(c.substr(l,g)),i.push("</u></b>"),e=l+g;i.push(c.substr(e,c.length))}else i.push(c);c=i.join("")}return b[1]==""?(a.className="ACQueryItem",c):(d=b[2],a.className="ACProductItem",['<table cellpadding=0 cellspacing=0 width="100%" class="ACproduct" style="background-color:Transparent;"><tr><td><table cellpadding=0 cellspacing=0><tr><td class="ACProductImageCell"><img class="ACProductImage" align="center" src="', d,'" /></td><td align="left" class="ACproductText"><u>',c,'</u></td></tr></table></td></tr><tr><td><div class="Seperator">&nbsp<div/></td></tr></table>'].join(""))};c.doBeforeExpandContainer=function(a,b){var c=YAHOO.util.Dom.getXY(a);c[1]+=YAHOO.util.Dom.get(a).offsetHeight;YAHOO.util.Dom.setXY(b,c);return!0}}}else window.setTimeout("initAC("+a+", "+b+")",200)};



/*****************************************************
 * Name: Easing
 * Desc: jQuery Easing Options
 * Author: George McGinley Smith
           http://gsgd.co.uk/sandbox/jquery/easing/
		   Copyright (c) 2008
 * Version: 1.3
 * License(s): BSD - http://www.freebsd.org/copyright/license.html
*****************************************************/
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}('h.i[\'1a\']=h.i[\'z\'];h.O(h.i,{y:\'D\',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.A(x,t*2,0,c,d)*.5+b;6 h.i.v(x,t*2-d,0,c,d)*.5+c*.5+b}});',62,74,'||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|asin|||undefined|easeOutBounce|abs||def|swing|easeInBounce|525|cos|easeOutQuad|easeOutBack|easeInBack|easeInSine|easeOutElastic|easeInOutQuint|easeOutQuint|easeInQuint|easeInOutQuart|easeOutQuart|easeInQuart|extend|easeInElastic|easeInOutCirc|easeInOutCubic|easeOutCirc|easeInOutElastic|easeOutCubic|easeInCirc|easeInOutExpo|easeInCubic|easeOutExpo|easeInExpo||9375|easeInOutSine|easeInOutQuad|25|easeOutSine|easeInOutBack|easeInQuad|625|984375|jswing|easeInOutBounce'.split('|'),0,{}))



/*****************************************************
 * Name: Beauty Tips
 * Desc: jQuery Tooltip Balloon
 * Author: Jeff Robbins 
           http://www.lullabot.com
 * Version: 0.9.5-rc1  (05/20/2009)
 * License(s): MIT - http://www.opensource.org/licenses/mit-license.php
               GPL - http://www.gnu.org/licenses/gpl.html
*****************************************************/
jQuery.bt={version:"0.9.5-rc1"};(function($){jQuery.fn.bt=function(content,options){if(typeof content!="string"){var contentSelect=true;options=content;content=false;}else{var contentSelect=false;}if(jQuery.fn.hoverIntent&&jQuery.bt.defaults.trigger=="hover"){jQuery.bt.defaults.trigger="hoverIntent";}return this.each(function(index){var opts=jQuery.extend(false,jQuery.bt.defaults,jQuery.bt.options,options);opts.spikeLength=numb(opts.spikeLength);opts.spikeGirth=numb(opts.spikeGirth);opts.overlap=numb(opts.overlap);var ajaxTimeout=false;if(opts.killTitle){$(this).find("[title]").andSelf().each(function(){if(!$(this).attr("bt-xTitle")){$(this).attr("bt-xTitle",$(this).attr("title")).attr("title","");}});}if(typeof opts.trigger=="string"){opts.trigger=[opts.trigger];}if(opts.trigger[0]=="hoverIntent"){var hoverOpts=jQuery.extend(opts.hoverIntentOpts,{over:function(){this.btOn();},out:function(){this.btOff();}});$(this).hoverIntent(hoverOpts);}else{if(opts.trigger[0]=="hover"){$(this).hover(function(){this.btOn();},function(){this.btOff();});}else{if(opts.trigger[0]=="now"){if($(this).hasClass("bt-active")){this.btOff();}else{this.btOn();}}else{if(opts.trigger[0]=="none"){}else{if(opts.trigger.length>1&&opts.trigger[0]!=opts.trigger[1]){$(this).bind(opts.trigger[0],function(){this.btOn();}).bind(opts.trigger[1],function(){this.btOff();});}else{$(this).bind(opts.trigger[0],function(){if($(this).hasClass("bt-active")){this.btOff();}else{this.btOn();}});}}}}}this.btOn=function(){if(typeof $(this).data("bt-box")=="object"){this.btOff();}opts.preBuild.apply(this);$(jQuery.bt.vars.closeWhenOpenStack).btOff();$(this).addClass("bt-active "+opts.activeClass);if(contentSelect&&opts.ajaxPath==null){if(opts.killTitle){$(this).attr("title",$(this).attr("bt-xTitle"));}content=$.isFunction(opts.contentSelector)?opts.contentSelector.apply(this):eval(opts.contentSelector);if(opts.killTitle){$(this).attr("title","");}}if(opts.ajaxPath!=null&&content==false){if(typeof opts.ajaxPath=="object"){var url=eval(opts.ajaxPath[0]);url+=opts.ajaxPath[1]?" "+opts.ajaxPath[1]:"";}else{var url=opts.ajaxPath;}var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}var cacheData=opts.ajaxCache?$(document.body).data("btCache-"+url.replace(/\./g,"")):null;if(typeof cacheData=="string"){content=selector?$("<div/>").append(cacheData.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):cacheData;}else{var target=this;var ajaxOpts=jQuery.extend(false,{type:opts.ajaxType,data:opts.ajaxData,cache:opts.ajaxCache,url:url,complete:function(XMLHttpRequest,textStatus){if(textStatus=="success"||textStatus=="notmodified"){if(opts.ajaxCache){$(document.body).data("btCache-"+url.replace(/\./g,""),XMLHttpRequest.responseText);}ajaxTimeout=false;content=selector?$("<div/>").append(XMLHttpRequest.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):XMLHttpRequest.responseText;}else{if(textStatus=="timeout"){ajaxTimeout=true;}content=opts.ajaxError.replace(/%error/g,XMLHttpRequest.statusText);}if($(target).hasClass("bt-active")){target.btOn();}}},opts.ajaxOpts);jQuery.ajax(ajaxOpts);content=opts.ajaxLoading;}}var shadowMarginX=0;var shadowMarginY=0;var shadowShiftX=0;var shadowShiftY=0;if(opts.shadow&&!shadowSupport()){opts.shadow=false;jQuery.extend(opts,opts.noShadowOpts);}if(opts.shadow){if(opts.shadowBlur>Math.abs(opts.shadowOffsetX)){shadowMarginX=opts.shadowBlur*2;}else{shadowMarginX=opts.shadowBlur+Math.abs(opts.shadowOffsetX);}shadowShiftX=(opts.shadowBlur-opts.shadowOffsetX)>0?opts.shadowBlur-opts.shadowOffsetX:0;if(opts.shadowBlur>Math.abs(opts.shadowOffsetY)){shadowMarginY=opts.shadowBlur*2;}else{shadowMarginY=opts.shadowBlur+Math.abs(opts.shadowOffsetY);}shadowShiftY=(opts.shadowBlur-opts.shadowOffsetY)>0?opts.shadowBlur-opts.shadowOffsetY:0;}if(opts.offsetParent){var offsetParent=$(opts.offsetParent);var offsetParentPos=offsetParent.offset();var pos=$(this).offset();var top=numb(pos.top)-numb(offsetParentPos.top)+numb($(this).css("margin-top"))-shadowShiftY;var left=numb(pos.left)-numb(offsetParentPos.left)+numb($(this).css("margin-left"))-shadowShiftX;}else{var offsetParent=($(this).css("position")=="absolute")?$(this).parents().eq(0).offsetParent():$(this).offsetParent();var pos=$(this).btPosition();var top=numb(pos.top)+numb($(this).css("margin-top"))-shadowShiftY;var left=numb(pos.left)+numb($(this).css("margin-left"))-shadowShiftX;}var width=$(this).btOuterWidth();var height=$(this).outerHeight();if(typeof content=="object"){var original=content;var clone=$(original).clone(true).show();var origClones=$(original).data("bt-clones")||[];origClones.push(clone);$(original).data("bt-clones",origClones);$(clone).data("bt-orig",original);$(this).data("bt-content-orig",{original:original,clone:clone});content=clone;}if(typeof content=="null"||content==""){return;}var $text=$('<div class="bt-content"></div>').append(content).css({padding:opts.padding,position:"absolute",width:(opts.shrinkToFit?"auto":opts.width),zIndex:opts.textzIndex,left:shadowShiftX,top:shadowShiftY}).css(opts.cssStyles);var $box=$('<div class="bt-wrapper"></div>').append($text).addClass(opts.cssClass).css({position:"absolute",width:opts.width,zIndex:opts.wrapperzIndex,visibility:"hidden"}).appendTo(offsetParent);if(jQuery.fn.bgiframe){$text.bgiframe();$box.bgiframe();}$(this).data("bt-box",$box);var scrollTop=numb($(document).scrollTop());var scrollLeft=numb($(document).scrollLeft());var docWidth=numb($(window).width());var docHeight=numb($(window).height());var winRight=scrollLeft+docWidth;var winBottom=scrollTop+docHeight;var space=new Object();var thisOffset=$(this).offset();space.top=thisOffset.top-scrollTop;space.bottom=docHeight-((thisOffset+height)-scrollTop);space.left=thisOffset.left-scrollLeft;space.right=docWidth-((thisOffset.left+width)-scrollLeft);var textOutHeight=numb($text.outerHeight());var textOutWidth=numb($text.btOuterWidth());if(opts.positions.constructor==String){opts.positions=opts.positions.replace(/ /,"").split(",");}if(opts.positions[0]=="most"){var position="top";for(var pig in space){position=space[pig]>space[position]?pig:position;}}else{for(var x in opts.positions){var position=opts.positions[x];if((position=="left"||position=="right")&&space[position]>textOutWidth+opts.spikeLength){break;}else{if((position=="top"||position=="bottom")&&space[position]>textOutHeight+opts.spikeLength){break;}}}}var horiz=left+((width-textOutWidth)*0.5);var vert=top+((height-textOutHeight)*0.5);var points=new Array();var textTop,textLeft,textRight,textBottom,textTopSpace,textBottomSpace,textLeftSpace,textRightSpace,crossPoint,textCenter,spikePoint;switch(position){case"top":$text.css("margin-bottom",opts.spikeLength+"px");$box.css({top:(top-$text.outerHeight(true))+opts.overlap,left:horiz});textRightSpace=(winRight-opts.windowMargin)-($text.offset().left+$text.btOuterWidth(true));var xShift=shadowShiftX;if(textRightSpace<0){$box.css("left",(numb($box.css("left"))+textRightSpace)+"px");xShift-=textRightSpace;}textLeftSpace=($text.offset().left+numb($text.css("margin-left")))-(scrollLeft+opts.windowMargin);if(textLeftSpace<0){$box.css("left",(numb($box.css("left"))-textLeftSpace)+"px");xShift+=textLeftSpace;}textTop=$text.btPosition().top+numb($text.css("margin-top"));textLeft=$text.btPosition().left+numb($text.css("margin-left"));textRight=textLeft+$text.btOuterWidth();textBottom=textTop+$text.outerHeight();textCenter={x:textLeft+($text.btOuterWidth()*opts.centerPointX),y:textTop+($text.outerHeight()*opts.centerPointY)};points[points.length]=spikePoint={y:textBottom+opts.spikeLength,x:((textRight-textLeft)*0.5)+xShift,type:"spike"};crossPoint=findIntersectX(spikePoint.x,spikePoint.y,textCenter.x,textCenter.y,textBottom);crossPoint.x=crossPoint.x<textLeft+opts.spikeGirth/2+opts.cornerRadius?textLeft+opts.spikeGirth/2+opts.cornerRadius:crossPoint.x;crossPoint.x=crossPoint.x>(textRight-opts.spikeGirth/2)-opts.cornerRadius?(textRight-opts.spikeGirth/2)-opts.CornerRadius:crossPoint.x;points[points.length]={x:crossPoint.x-(opts.spikeGirth/2),y:textBottom,type:"join"};points[points.length]={x:textLeft,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textBottom,type:"corner"};points[points.length]={x:crossPoint.x+(opts.spikeGirth/2),y:textBottom,type:"join"};points[points.length]=spikePoint;break;case"left":$text.css("margin-right",opts.spikeLength+"px");$box.css({top:vert+"px",left:((left-$text.btOuterWidth(true))+opts.overlap)+"px"});textBottomSpace=(winBottom-opts.windowMargin)-($text.offset().top+$text.outerHeight(true));var yShift=shadowShiftY;if(textBottomSpace<0){$box.css("top",(numb($box.css("top"))+textBottomSpace)+"px");yShift-=textBottomSpace;}textTopSpace=($text.offset().top+numb($text.css("margin-top")))-(scrollTop+opts.windowMargin);if(textTopSpace<0){$box.css("top",(numb($box.css("top"))-textTopSpace)+"px");yShift+=textTopSpace;}textTop=$text.btPosition().top+numb($text.css("margin-top"));textLeft=$text.btPosition().left+numb($text.css("margin-left"));textRight=textLeft+$text.btOuterWidth();textBottom=textTop+$text.outerHeight();textCenter={x:textLeft+($text.btOuterWidth()*opts.centerPointX),y:textTop+($text.outerHeight()*opts.centerPointY)};points[points.length]=spikePoint={x:textRight+opts.spikeLength,y:((textBottom-textTop)*0.5)+yShift,type:"spike"};crossPoint=findIntersectY(spikePoint.x,spikePoint.y,textCenter.x,textCenter.y,textRight);crossPoint.y=crossPoint.y<textTop+opts.spikeGirth/2+opts.cornerRadius?textTop+opts.spikeGirth/2+opts.cornerRadius:crossPoint.y;crossPoint.y=crossPoint.y>(textBottom-opts.spikeGirth/2)-opts.cornerRadius?(textBottom-opts.spikeGirth/2)-opts.cornerRadius:crossPoint.y;points[points.length]={x:textRight,y:crossPoint.y+opts.spikeGirth/2,type:"join"};points[points.length]={x:textRight,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textTop,type:"corner"};points[points.length]={x:textRight,y:crossPoint.y-opts.spikeGirth/2,type:"join"};points[points.length]=spikePoint;break;case"bottom":$text.css("margin-top",opts.spikeLength+"px");$box.css({top:(top+height)-opts.overlap,left:horiz});textRightSpace=(winRight-opts.windowMargin)-($text.offset().left+$text.btOuterWidth(true));var xShift=shadowShiftX;if(textRightSpace<0){$box.css("left",(numb($box.css("left"))+textRightSpace)+"px");xShift-=textRightSpace;}textLeftSpace=($text.offset().left+numb($text.css("margin-left")))-(scrollLeft+opts.windowMargin);if(textLeftSpace<0){$box.css("left",(numb($box.css("left"))-textLeftSpace)+"px");xShift+=textLeftSpace;}textTop=$text.btPosition().top+numb($text.css("margin-top"));textLeft=$text.btPosition().left+numb($text.css("margin-left"));textRight=textLeft+$text.btOuterWidth();textBottom=textTop+$text.outerHeight();textCenter={x:textLeft+($text.btOuterWidth()*opts.centerPointX),y:textTop+($text.outerHeight()*opts.centerPointY)};points[points.length]=spikePoint={x:((textRight-textLeft)*0.5)+xShift,y:shadowShiftY,type:"spike"};crossPoint=findIntersectX(spikePoint.x,spikePoint.y,textCenter.x,textCenter.y,textTop);crossPoint.x=crossPoint.x<textLeft+opts.spikeGirth/2+opts.cornerRadius?textLeft+opts.spikeGirth/2+opts.cornerRadius:crossPoint.x;crossPoint.x=crossPoint.x>(textRight-opts.spikeGirth/2)-opts.cornerRadius?(textRight-opts.spikeGirth/2)-opts.cornerRadius:crossPoint.x;points[points.length]={x:crossPoint.x+opts.spikeGirth/2,y:textTop,type:"join"};points[points.length]={x:textRight,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textTop,type:"corner"};points[points.length]={x:crossPoint.x-(opts.spikeGirth/2),y:textTop,type:"join"};points[points.length]=spikePoint;break;case"right":$text.css("margin-left",(opts.spikeLength+"px"));$box.css({top:vert+"px",left:((left+width)-opts.overlap)+"px"});textBottomSpace=(winBottom-opts.windowMargin)-($text.offset().top+$text.outerHeight(true));var yShift=shadowShiftY;if(textBottomSpace<0){$box.css("top",(numb($box.css("top"))+textBottomSpace)+"px");yShift-=textBottomSpace;}textTopSpace=($text.offset().top+numb($text.css("margin-top")))-(scrollTop+opts.windowMargin);if(textTopSpace<0){$box.css("top",(numb($box.css("top"))-textTopSpace)+"px");yShift+=textTopSpace;}textTop=$text.btPosition().top+numb($text.css("margin-top"));textLeft=$text.btPosition().left+numb($text.css("margin-left"));textRight=textLeft+$text.btOuterWidth();textBottom=textTop+$text.outerHeight();textCenter={x:textLeft+($text.btOuterWidth()*opts.centerPointX),y:textTop+($text.outerHeight()*opts.centerPointY)};points[points.length]=spikePoint={x:shadowShiftX,y:((textBottom-textTop)*0.5)+yShift,type:"spike"};crossPoint=findIntersectY(spikePoint.x,spikePoint.y,textCenter.x,textCenter.y,textLeft);crossPoint.y=crossPoint.y<textTop+opts.spikeGirth/2+opts.cornerRadius?textTop+opts.spikeGirth/2+opts.cornerRadius:crossPoint.y;crossPoint.y=crossPoint.y>(textBottom-opts.spikeGirth/2)-opts.cornerRadius?(textBottom-opts.spikeGirth/2)-opts.cornerRadius:crossPoint.y;points[points.length]={x:textLeft,y:crossPoint.y-opts.spikeGirth/2,type:"join"};points[points.length]={x:textLeft,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:crossPoint.y+opts.spikeGirth/2,type:"join"};points[points.length]=spikePoint;break;}var canvas=document.createElement("canvas");$(canvas).attr("width",(numb($text.btOuterWidth(true))+opts.strokeWidth*2+shadowMarginX)).attr("height",(numb($text.outerHeight(true))+opts.strokeWidth*2+shadowMarginY)).appendTo($box).css({position:"absolute",zIndex:opts.boxzIndex});if(typeof G_vmlCanvasManager!="undefined"){canvas=G_vmlCanvasManager.initElement(canvas);}if(opts.cornerRadius>0){var newPoints=new Array();var newPoint;for(var i=0;i<points.length;i++){if(points[i].type=="corner"){newPoint=betweenPoint(points[i],points[(i-1)%points.length],opts.cornerRadius);newPoint.type="arcStart";newPoints[newPoints.length]=newPoint;newPoints[newPoints.length]=points[i];newPoint=betweenPoint(points[i],points[(i+1)%points.length],opts.cornerRadius);newPoint.type="arcEnd";newPoints[newPoints.length]=newPoint;}else{newPoints[newPoints.length]=points[i];}}points=newPoints;}var ctx=canvas.getContext("2d");if(opts.shadow&&opts.shadowOverlap!==true){var shadowOverlap=numb(opts.shadowOverlap);switch(position){case"top":if(opts.shadowOffsetX+opts.shadowBlur-shadowOverlap>0){$box.css("top",(numb($box.css("top"))-(opts.shadowOffsetX+opts.shadowBlur-shadowOverlap)));}break;case"right":if(shadowShiftX-shadowOverlap>0){$box.css("left",(numb($box.css("left"))+shadowShiftX-shadowOverlap));}break;case"bottom":if(shadowShiftY-shadowOverlap>0){$box.css("top",(numb($box.css("top"))+shadowShiftY-shadowOverlap));}break;case"left":if(opts.shadowOffsetY+opts.shadowBlur-shadowOverlap>0){$box.css("left",(numb($box.css("left"))-(opts.shadowOffsetY+opts.shadowBlur-shadowOverlap)));}break;}}drawIt.apply(ctx,[points],opts.strokeWidth);ctx.fillStyle=opts.fill;if(opts.shadow){ctx.shadowOffsetX=opts.shadowOffsetX;ctx.shadowOffsetY=opts.shadowOffsetY;ctx.shadowBlur=opts.shadowBlur;ctx.shadowColor=opts.shadowColor;}ctx.closePath();ctx.fill();if(opts.strokeWidth>0){ctx.shadowColor="rgba(0, 0, 0, 0)";ctx.lineWidth=opts.strokeWidth;ctx.strokeStyle=opts.strokeStyle;ctx.beginPath();drawIt.apply(ctx,[points],opts.strokeWidth);ctx.closePath();ctx.stroke();}opts.preShow.apply(this,[$box[0]]);$box.css({display:"none",visibility:"visible"});opts.showTip.apply(this,[$box[0]]);if(opts.overlay){var overlay=$('<div class="bt-overlay"></div>').css({position:"absolute",backgroundColor:"blue",top:top,left:left,width:width,height:height,opacity:".2"}).appendTo(offsetParent);$(this).data("overlay",overlay);}if((opts.ajaxPath!=null&&opts.ajaxCache==false)||ajaxTimeout){content=false;}if(opts.clickAnywhereToClose){jQuery.bt.vars.clickAnywhereStack.push(this);$(document).click(jQuery.bt.docClick);}if(opts.closeWhenOthersOpen){jQuery.bt.vars.closeWhenOpenStack.push(this);}opts.postShow.apply(this,[$box[0]]);};this.btOff=function(){var box=$(this).data("bt-box");opts.preHide.apply(this,[box]);var i=this;i.btCleanup=function(){var box=$(i).data("bt-box");var contentOrig=$(i).data("bt-content-orig");var overlay=$(i).data("bt-overlay");if(typeof box=="object"){$(box).remove();$(i).removeData("bt-box");}if(typeof contentOrig=="object"){var clones=$(contentOrig.original).data("bt-clones");$(contentOrig).data("bt-clones",arrayRemove(clones,contentOrig.clone));}if(typeof overlay=="object"){$(overlay).remove();$(i).removeData("bt-overlay");}jQuery.bt.vars.clickAnywhereStack=arrayRemove(jQuery.bt.vars.clickAnywhereStack,i);jQuery.bt.vars.closeWhenOpenStack=arrayRemove(jQuery.bt.vars.closeWhenOpenStack,i);$(i).removeClass("bt-active "+opts.activeClass);opts.postHide.apply(i);};opts.hideTip.apply(this,[box,i.btCleanup]);};var refresh=this.btRefresh=function(){this.btOff();this.btOn();};});function drawIt(points,strokeWidth){this.moveTo(points[0].x,points[0].y);for(i=1;i<points.length;i++){if(points[i-1].type=="arcStart"){this.quadraticCurveTo(round5(points[i].x,strokeWidth),round5(points[i].y,strokeWidth),round5(points[(i+1)%points.length].x,strokeWidth),round5(points[(i+1)%points.length].y,strokeWidth));i++;}else{this.lineTo(round5(points[i].x,strokeWidth),round5(points[i].y,strokeWidth));}}}function round5(num,strokeWidth){var ret;strokeWidth=numb(strokeWidth);if(strokeWidth%2){ret=num;}else{ret=Math.round(num-0.5)+0.5;}return ret;}function numb(num){return parseInt(num)||0;}function arrayRemove(arr,elem){var x,newArr=new Array();for(x in arr){if(arr[x]!=elem){newArr.push(arr[x]);}}return newArr;}function canvasSupport(){var canvas_compatible=false;try{canvas_compatible=!!(document.createElement("canvas").getContext("2d"));}catch(e){canvas_compatible=!!(document.createElement("canvas").getContext);}return canvas_compatible;}function shadowSupport(){try{var userAgent=navigator.userAgent.toLowerCase();if(/webkit/.test(userAgent)){return true;}else{if(/gecko|mozilla/.test(userAgent)&&parseFloat(userAgent.match(/firefox\/(\d+(?:\.\d+)+)/)[1])>=3.1){return true;}}}catch(err){}return false;}function betweenPoint(point1,point2,dist){var y,x;if(point1.x==point2.x){y=point1.y<point2.y?point1.y+dist:point1.y-dist;return{x:point1.x,y:y};}else{if(point1.y==point2.y){x=point1.x<point2.x?point1.x+dist:point1.x-dist;return{x:x,y:point1.y};}}}function centerPoint(arcStart,corner,arcEnd){var x=corner.x==arcStart.x?arcEnd.x:arcStart.x;var y=corner.y==arcStart.y?arcEnd.y:arcStart.y;var startAngle,endAngle;if(arcStart.x<arcEnd.x){if(arcStart.y>arcEnd.y){startAngle=(Math.PI/180)*180;endAngle=(Math.PI/180)*90;}else{startAngle=(Math.PI/180)*90;endAngle=0;}}else{if(arcStart.y>arcEnd.y){startAngle=(Math.PI/180)*270;endAngle=(Math.PI/180)*180;}else{startAngle=0;endAngle=(Math.PI/180)*270;}}return{x:x,y:y,type:"center",startAngle:startAngle,endAngle:endAngle};}function findIntersect(r1x1,r1y1,r1x2,r1y2,r2x1,r2y1,r2x2,r2y2){if(r2x1==r2x2){return findIntersectY(r1x1,r1y1,r1x2,r1y2,r2x1);}if(r2y1==r2y2){return findIntersectX(r1x1,r1y1,r1x2,r1y2,r2y1);}var r1m=(r1y1-r1y2)/(r1x1-r1x2);var r1b=r1y1-(r1m*r1x1);var r2m=(r2y1-r2y2)/(r2x1-r2x2);var r2b=r2y1-(r2m*r2x1);var x=(r2b-r1b)/(r1m-r2m);var y=r1m*x+r1b;return{x:x,y:y};}function findIntersectY(r1x1,r1y1,r1x2,r1y2,x){if(r1y1==r1y2){return{x:x,y:r1y1};}var r1m=(r1y1-r1y2)/(r1x1-r1x2);var r1b=r1y1-(r1m*r1x1);var y=r1m*x+r1b;return{x:x,y:y};}function findIntersectX(r1x1,r1y1,r1x2,r1y2,y){if(r1x1==r1x2){return{x:r1x1,y:y};}var r1m=(r1y1-r1y2)/(r1x1-r1x2);var r1b=r1y1-(r1m*r1x1);var x=(y-r1b)/r1m;return{x:x,y:y};}};jQuery.fn.btPosition=function(){function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,"marginTop");offset.left-=num(this,"marginLeft");parentOffset.top+=num(offsetParent,"borderTopWidth");parentOffset.left+=num(offsetParent,"borderLeftWidth");results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;};jQuery.fn.btOuterWidth=function(margin){function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}return this["innerWidth"]()+num(this,"borderLeftWidth")+num(this,"borderRightWidth")+(margin?num(this,"marginLeft")+num(this,"marginRight"):0);};jQuery.fn.btOn=function(){return this.each(function(index){if(jQuery.isFunction(this.btOn)){this.btOn();}});};jQuery.fn.btOff=function(){return this.each(function(index){if(jQuery.isFunction(this.btOff)){this.btOff();}});};jQuery.bt.vars={clickAnywhereStack:[],closeWhenOpenStack:[]};jQuery.bt.docClick=function(e){if(!e){var e=window.event;}if(!$(e.target).parents().andSelf().filter(".bt-wrapper, .bt-active").length&&jQuery.bt.vars.clickAnywhereStack.length){$(jQuery.bt.vars.clickAnywhereStack).btOff();$(document).unbind("click",jQuery.bt.docClick);}};jQuery.bt.defaults={trigger:"hover",clickAnywhereToClose:true,closeWhenOthersOpen:false,shrinkToFit:false,width:"200px",padding:"10px",spikeGirth:10,spikeLength:15,overlap:0,overlay:false,killTitle:true,textzIndex:9999,boxzIndex:9998,wrapperzIndex:9997,offsetParent:null,positions:["most"],fill:"rgb(255, 255, 102)",windowMargin:10,strokeWidth:1,strokeStyle:"#000",cornerRadius:5,centerPointX:0.5,centerPointY:0.5,shadow:false,shadowOffsetX:2,shadowOffsetY:2,shadowBlur:3,shadowColor:"#000",shadowOverlap:false,noShadowOpts:{strokeStyle:"#999"},cssClass:"",cssStyles:{},activeClass:"bt-active",contentSelector:"$(this).attr('title')",ajaxPath:null,ajaxError:"<strong>ERROR:</strong> <em>%error</em>",ajaxLoading:"<blink>Loading...</blink>",ajaxData:{},ajaxType:"GET",ajaxCache:true,ajaxOpts:{},preBuild:function(){},preShow:function(box){},showTip:function(box){$(box).show();},postShow:function(box){},preHide:function(box){},hideTip:function(box,callback){$(box).hide();callback();},postHide:function(){},hoverIntentOpts:{interval:300,timeout:500}};jQuery.bt.options={};})(jQuery);



/*****************************************************
 * Name: Excanvas
 * Desc: jQuery Canvasing Script for IE Browsers
 * Author:  Google 
            Copyright (c) 2006
 * Version: v1.3 (12/11/07)
 * License(s): Apache License v2.0 - http://www.apache.org/licenses/LICENSE-2.0
*****************************************************/
document.createElement("canvas").getContext||function(){function G(){return this.context_||(this.context_=new v(this))}function H(a,b){var c=z.call(arguments,2);return function(){return a.apply(b,c.concat(z.call(arguments)))}}function I(a){var b=a.srcElement;switch(a.propertyName){case "width":b.style.width=b.attributes.width.nodeValue+"px";b.getContext().clearRect();break;case "height":b.style.height=b.attributes.height.nodeValue+"px",b.getContext().clearRect()}}function J(a){a=a.srcElement;if(a.firstChild)a.firstChild.style.width= a.clientWidth+"px",a.firstChild.style.height=a.clientHeight+"px"}function w(){return[[1,0,0],[0,1,0],[0,0,1]]}function n(a,b){for(var c=w(),d=0;d<3;d++)for(var e=0;e<3;e++){for(var f=0,h=0;h<3;h++)f+=a[d][h]*b[h][e];c[d][e]=f}return c}function A(a,b){b.fillStyle=a.fillStyle;b.lineCap=a.lineCap;b.lineJoin=a.lineJoin;b.lineWidth=a.lineWidth;b.miterLimit=a.miterLimit;b.shadowBlur=a.shadowBlur;b.shadowColor=a.shadowColor;b.shadowOffsetX=a.shadowOffsetX;b.shadowOffsetY=a.shadowOffsetY;b.strokeStyle=a.strokeStyle; b.globalAlpha=a.globalAlpha;b.arcScaleX_=a.arcScaleX_;b.arcScaleY_=a.arcScaleY_;b.lineScale_=a.lineScale_}function B(a){var b,c=1,a=String(a);if(a.substring(0,3)=="rgb"){b=a.indexOf("(",3);var d=a.indexOf(")",b+1),d=a.substring(b+1,d).split(",");b="#";for(var e=0;e<3;e++)b+=C[Number(d[e])];d.length==4&&a.substr(3,1)=="a"&&(c=d[3])}else b=a;return{color:b,alpha:c}}function K(a){switch(a){case "butt":return"flat";case "round":return"round";default:return"square"}}function v(a){this.m_=w();this.mStack_= [];this.aStack_=[];this.currentPath_=[];this.fillStyle=this.strokeStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=j*1;this.globalAlpha=1;this.canvas=a;var b=a.ownerDocument.createElement("div");b.style.width=a.clientWidth+"px";b.style.height=a.clientHeight+"px";b.style.overflow="hidden";b.style.position="absolute";a.appendChild(b);this.element_=b;this.lineScale_=this.arcScaleY_=this.arcScaleX_=1}function D(a,b,c,d){a.currentPath_.push({type:"bezierCurveTo", cp1x:b.x,cp1y:b.y,cp2x:c.x,cp2y:c.y,x:d.x,y:d.y});a.currentX_=d.x;a.currentY_=d.y}function o(a,b,c){var d;a:{for(d=0;d<3;d++)for(var e=0;e<2;e++)if(!isFinite(b[d][e])||isNaN(b[d][e])){d=!1;break a}d=!0}if(d&&(a.m_=b,c))a.lineScale_=L(M(b[0][0]*b[1][1]-b[0][1]*b[1][0]))}function q(a){this.type_=a;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}function E(){}var p=Math,i=p.round,x=p.sin,y=p.cos,M=p.abs,L=p.sqrt,j=10,l=j/2,z=Array.prototype.slice,F={init:function(a){/MSIE/.test(navigator.userAgent)&& !window.opera&&(a=a||document,a.createElement("canvas"),a.attachEvent("onreadystatechange",H(this.init_,this,a)))},init_:function(a){a.namespaces.g_vml_||a.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML");a.namespaces.g_o_||a.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML");if(!a.styleSheets.ex_canvas_){var b=a.createStyleSheet();b.owningElement.id="ex_canvas_";b.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}g_o_\\:*{behavior:url(#default#VML)}"}a= a.getElementsByTagName("canvas");for(b=0;b<a.length;b++)this.initElement(a[b])},initElement:function(a){if(!a.getContext){a.getContext=G;a.innerHTML="";a.attachEvent("onpropertychange",I);a.attachEvent("onresize",J);var b=a.attributes;b.width&&b.width.specified?a.style.width=b.width.nodeValue+"px":a.width=a.clientWidth;b.height&&b.height.specified?a.style.height=b.height.nodeValue+"px":a.height=a.clientHeight}return a}};F.init();for(var C=[],f=0;f<16;f++)for(var r=0;r<16;r++)C[f*16+r]=f.toString(16)+ r.toString(16);f=v.prototype;f.clearRect=function(){this.element_.innerHTML=""};f.beginPath=function(){this.currentPath_=[]};f.moveTo=function(a,b){var c=this.getCoords_(a,b);this.currentPath_.push({type:"moveTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};f.lineTo=function(a,b){var c=this.getCoords_(a,b);this.currentPath_.push({type:"lineTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};f.bezierCurveTo=function(a,b,c,d,e,f){e=this.getCoords_(e,f);a=this.getCoords_(a,b);c=this.getCoords_(c, d);D(this,a,c,e)};f.quadraticCurveTo=function(a,b,c,d){a=this.getCoords_(a,b);c=this.getCoords_(c,d);d={x:this.currentX_+2/3*(a.x-this.currentX_),y:this.currentY_+2/3*(a.y-this.currentY_)};D(this,d,{x:d.x+(c.x-this.currentX_)/3,y:d.y+(c.y-this.currentY_)/3},c)};f.arc=function(a,b,c,d,e,f){c*=j;var h=f?"at":"wa",g=a+y(d)*c-l,i=b+x(d)*c-l,d=a+y(e)*c-l,e=b+x(e)*c-l;g==d&&!f&&(g+=0.125);a=this.getCoords_(a,b);g=this.getCoords_(g,i);d=this.getCoords_(d,e);this.currentPath_.push({type:h,x:a.x,y:a.y,radius:c, xStart:g.x,yStart:g.y,xEnd:d.x,yEnd:d.y})};f.rect=function(a,b,c,d){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath()};f.strokeRect=function(a,b,c,d){var e=this.currentPath_;this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath();this.stroke();this.currentPath_=e};f.fillRect=function(a,b,c,d){var e=this.currentPath_;this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a, b+d);this.closePath();this.fill();this.currentPath_=e};f.createLinearGradient=function(a,b,c,d){var e=new q("gradient");e.x0_=a;e.y0_=b;e.x1_=c;e.y1_=d;return e};f.createRadialGradient=function(a,b,c,d,e,f){var h=new q("gradientradial");h.x0_=a;h.y0_=b;h.r0_=c;h.x1_=d;h.y1_=e;h.r1_=f;return h};f.drawImage=function(a){var b,c,d,e,f,h,g,m;d=a.runtimeStyle.width;e=a.runtimeStyle.height;a.runtimeStyle.width="auto";a.runtimeStyle.height="auto";var s=a.width,t=a.height;a.runtimeStyle.width=d;a.runtimeStyle.height= e;if(arguments.length==3)b=arguments[1],c=arguments[2],f=h=0,g=d=s,m=e=t;else if(arguments.length==5)b=arguments[1],c=arguments[2],d=arguments[3],e=arguments[4],f=h=0,g=s,m=t;else if(arguments.length==9)f=arguments[1],h=arguments[2],g=arguments[3],m=arguments[4],b=arguments[5],c=arguments[6],d=arguments[7],e=arguments[8];else throw Error("Invalid number of arguments");var k=this.getCoords_(b,c),u=[];u.push(" <g_vml_:group",' coordsize="',j*10,",",j*10,'"',' coordorigin="0,0"',' style="width:',10, "px;height:",10,"px;position:absolute;");if(this.m_[0][0]!=1||this.m_[0][1]){var l=[];l.push("M11=",this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",i(k.x/j),",","Dy=",i(k.y/j),"");var n=this.getCoords_(b+d,c),o=this.getCoords_(b,c+e);b=this.getCoords_(b+d,c+e);k.x=p.max(k.x,n.x,o.x,b.x);k.y=p.max(k.y,n.y,o.y,b.y);u.push("padding:0 ",i(k.x/j),"px ",i(k.y/j),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",l.join(""),", sizingmethod='clip');")}else u.push("top:", i(k.y/j),"px;left:",i(k.x/j),"px;");u.push(' ">','<g_vml_:image src="',a.src,'"',' style="width:',j*d,"px;"," height:",j*e,'px;"',' cropleft="',f/s,'"',' croptop="',h/t,'"',' cropright="',(s-f-g)/s,'"',' cropbottom="',(t-h-m)/t,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",u.join(""))};f.stroke=function(a){var b=[],c=B(a?this.fillStyle:this.strokeStyle),d=c.color,c=c.alpha*this.globalAlpha;b.push("<g_vml_:shape",' filled="',!!a,'"',' style="position:absolute;width:',10, "px;height:",10,'px;"',' coordorigin="0 0" coordsize="',j*10," ",j*10,'"',' stroked="',!a,'"',' path="');for(var e={x:null,y:null},f={x:null,y:null},h=0;h<this.currentPath_.length;h++){var g=this.currentPath_[h];switch(g.type){case "moveTo":b.push(" m ",i(g.x),",",i(g.y));break;case "lineTo":b.push(" l ",i(g.x),",",i(g.y));break;case "close":b.push(" x ");g=null;break;case "bezierCurveTo":b.push(" c ",i(g.cp1x),",",i(g.cp1y),",",i(g.cp2x),",",i(g.cp2y),",",i(g.x),",",i(g.y));break;case "at":case "wa":b.push(" ", g.type," ",i(g.x-this.arcScaleX_*g.radius),",",i(g.y-this.arcScaleY_*g.radius)," ",i(g.x+this.arcScaleX_*g.radius),",",i(g.y+this.arcScaleY_*g.radius)," ",i(g.xStart),",",i(g.yStart)," ",i(g.xEnd),",",i(g.yEnd))}if(g){if(e.x==null||g.x<e.x)e.x=g.x;if(f.x==null||g.x>f.x)f.x=g.x;if(e.y==null||g.y<e.y)e.y=g.y;if(f.y==null||g.y>f.y)f.y=g.y}}b.push(' ">');if(a)if(typeof this.fillStyle=="object"){var d=this.fillStyle,g=0,a={x:0,y:0},c=0,m=1;d.type_=="gradient"?(g=d.x1_/this.arcScaleX_,e=d.y1_/this.arcScaleY_, h=this.getCoords_(d.x0_/this.arcScaleX_,d.y0_/this.arcScaleY_),g=this.getCoords_(g,e),g=Math.atan2(g.x-h.x,g.y-h.y)*180/Math.PI,g<0&&(g+=360),g<1.0E-6&&(g=0)):(h=this.getCoords_(d.x0_,d.y0_),c=f.x-e.x,m=f.y-e.y,a={x:(h.x-e.x)/c,y:(h.y-e.y)/m},c/=this.arcScaleX_*j,m/=this.arcScaleY_*j,h=p.max(c,m),c=2*d.r0_/h,m=2*d.r1_/h-c);e=d.colors_;e.sort(function(a,b){return a.offset-b.offset});for(var f=e.length,l=e[0].color,n=e[f-1].color,k=e[0].alpha*this.globalAlpha,o=e[f-1].alpha*this.globalAlpha,q=[],h= 0;h<f;h++){var r=e[h];q.push(r.offset*m+c+" "+r.color)}b.push('<g_vml_:fill type="',d.type_,'"',' method="none" focus="100%"',' color="',l,'"',' color2="',n,'"',' colors="',q.join(","),'"',' opacity="',o,'"',' g_o_:opacity2="',k,'"',' angle="',g,'"',' focusposition="',a.x,",",a.y,'" />')}else b.push('<g_vml_:fill color="',d,'" opacity="',c,'" />');else a=this.lineScale_*this.lineWidth,a<1&&(c*=a),b.push("<g_vml_:stroke",' opacity="',c,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',this.miterLimit, '"',' endcap="',K(this.lineCap),'"',' weight="',a,'px"',' color="',d,'" />');b.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",b.join(""))};f.fill=function(){this.stroke(!0)};f.closePath=function(){this.currentPath_.push({type:"close"})};f.getCoords_=function(a,b){var c=this.m_;return{x:j*(a*c[0][0]+b*c[1][0]+c[2][0])-l,y:j*(a*c[0][1]+b*c[1][1]+c[2][1])-l}};f.save=function(){var a={};A(this,a);this.aStack_.push(a);this.mStack_.push(this.m_);this.m_=n(w(),this.m_)};f.restore=function(){A(this.aStack_.pop(), this);this.m_=this.mStack_.pop()};f.translate=function(a,b){o(this,n([[1,0,0],[0,1,0],[a,b,1]],this.m_),!1)};f.rotate=function(a){var b=y(a),a=x(a);o(this,n([[b,a,0],[-a,b,0],[0,0,1]],this.m_),!1)};f.scale=function(a,b){this.arcScaleX_*=a;this.arcScaleY_*=b;o(this,n([[a,0,0],[0,b,0],[0,0,1]],this.m_),!0)};f.transform=function(a,b,c,d,e,f){o(this,n([[a,b,0],[c,d,0],[e,f,1]],this.m_),!0)};f.setTransform=function(a,b,c,d,e,f){o(this,[[a,b,0],[c,d,0],[e,f,1]],!0)};f.clip=function(){};f.arcTo=function(){}; f.createPattern=function(){return new E};q.prototype.addColorStop=function(a,b){b=B(b);this.colors_.push({offset:a,color:b.color,alpha:b.alpha})};G_vmlCanvasManager=F;CanvasRenderingContext2D=v;CanvasGradient=q;CanvasPattern=E}();



/*****************************************************
 * Name: bxSlider
 * Desc: jQuery Content Slider
 * Author:  Steven Wanderski 
            http://stevenwanderski.com
            http://bxlider.com
            Copyright (c) 2010
 * Version: v3.0 (01/13/11)
 * Requires: jQuery v1.3+
 * License(s): MIT - http://www.opensource.org/licenses/mit-license.php
*****************************************************/
(function(a){a.fn.bxSlider=function(b){function Z(b,c,d,e){var f=[];var g=d;var h=false;if(e=="backward"){b=a.makeArray(b);b.reverse()}while(g>0){a.each(b,function(b,d){if(g>0){if(!h){if(b==c){h=true;f.push(a(this).clone());g--}}else{f.push(a(this).clone());g--}}else{return false}})}return f}function Y(){var a=i.outerHeight()*b.displaySlideQty;return a}function X(){var a=i.outerWidth()*b.displaySlideQty;return a}function W(b,c){if(c=="left"){var d=a(".pager",h).eq(b).position().left}else if(c=="top"){var d=a(".pager",h).eq(b).position().top}return d}function V(){if(!b.infiniteLoop&&b.hideControlOnEnd){if(x==F){a(".bx-prev",h).css({'background-position':'-671px 0','opacity':'.4','display':'block','cursor':'default'})}else{a(".bx-prev",h).css({'opacity':'1','cursor':'pointer'})}if(x==G){a(".bx-next",h).css({'background-position':'-671px -60px','opacity':'.4','display':'block','cursor':'default'})}else{a(".bx-next",h).css({'opacity':'1','cursor':'pointer'})}}}function U(c,e,f,g){p=a('<a href="" class="bx-start"></a>');if(c=="text"){r=e}else{r='<img src="'+e+'" />'}if(f=="text"){s=g}else{s='<img src="'+g+'" />'}if(b.autoControlsSelector){a(b.autoControlsSelector).append(p)}else{h.append('<div class="bx-auto"></div>');a(".bx-auto",h).html(p)}p.click(function(){if(b.ticker){if(a(this).hasClass("stop")){d.stopTicker()}else if(a(this).hasClass("start")){d.startTicker()}}else{if(a(this).hasClass("stop")){d.stopShow(true)}else if(a(this).hasClass("start")){d.startShow(true)}}return false})}function T(){var c=a("img",g.eq(x)).attr("title");if(c!=""){if(b.captionsSelector){a(b.captionsSelector).html(c)}else{a(".bx-captions",h).html(c)}}else{if(b.captionsSelector){a(b.captionsSelector).html(" ")}else{a(".bx-captions",h).html(" ")}}}function S(c){var e=g.length;if(b.moveSlideQty>1){if(g.length%b.moveSlideQty!=0){e=Math.ceil(g.length/b.moveSlideQty)}else{e=g.length/b.moveSlideQty}}var f="";if(b.buildPager){for(var i=0;i<e;i++){f+=b.buildPager(i,g.eq(i*b.moveSlideQty))}}else if(c=="full"){for(var i=1;i<=e;i++){f+='<a href="" class="pager-link pager-'+i+'">'+i+"</a>"}}else if(c=="short"){f='<span class="bx-pager-current">'+(b.startingSlide+1)+"</span> "+b.pagerShortSeparator+' <span class="bx-pager-total">'+g.length+"</span>"}if(b.pagerSelector){a(b.pagerSelector).append(f);n=a(b.pagerSelector)}else{var j=a('<div class="bx-pager"></div>');j.append(f);if(b.pagerLocation=="top"){h.prepend(j)}else if(b.pagerLocation=="bottom"){h.append(j)}n=a(".bx-pager",h)}n.children().click(function(){if(b.pagerType=="full"){var a=n.children().index(this);if(b.moveSlideQty>1){a*=b.moveSlideQty}d.goToSlide(a)}return false})}function R(c,e,f,g){var i=a('<a href="" class="bx-next"></a>');var j=a('<a href="" class="bx-prev"></a>');if(c=="text"){i.html(e)}else{i.html('<img src="'+e+'" />')}if(f=="text"){j.html(g)}else{j.html('<img src="'+g+'" />')}if(b.prevSelector){a(b.prevSelector).append(j)}else{h.append(j)}if(b.nextSelector){a(b.nextSelector).append(i)}else{h.append(i)}i.click(function(){d.goToNextSlide();return false});j.click(function(){d.goToPreviousSlide();return false})}function Q(c){if(b.pagerType=="full"&&b.pager){a("a",n).removeClass(b.pagerActiveClass);a("a",n).eq(c).addClass(b.pagerActiveClass)}else if(b.pagerType=="short"&&b.pager){a(".bx-pager-current",n).html(x+1)}}function P(){g.not(":eq("+x+")").fadeTo(b.speed,0).css("zIndex",98);g.eq(x).css("zIndex",99).fadeTo(b.speed,1,function(){E=false;if(jQuery.browser.msie){g.eq(x).get(0).style.removeAttribute("filter")}b.onAfterSlide(x,g.length,g.eq(x))})}function O(){e.hover(function(){if(t){d.stopTicker(false)}},function(){if(t){d.startTicker(false)}})}function N(){h.find(".bx-window").hover(function(){if(t){d.stopShow(false)}},function(){if(t){d.startShow(false)}})}function M(){if(b.startImage!=""){startContent=b.startImage;startType="image"}else{startContent=b.startText;startType="text"}if(b.stopImage!=""){stopContent=b.stopImage;stopType="image"}else{stopContent=b.stopText;stopType="text"}U(startType,startContent,stopType,stopContent)}function L(a,c,d){if(b.mode=="horizontal"){if(b.tickerDirection=="next"){e.animate({left:"-="+c+"px"},d,"linear",function(){e.css("left",a);L(a,A,b.tickerSpeed)})}else if(b.tickerDirection=="prev"){e.animate({left:"+="+c+"px"},d,"linear",function(){e.css("left",a);L(a,A,b.tickerSpeed)})}}else if(b.mode=="vertical"){if(b.tickerDirection=="next"){e.animate({top:"-="+c+"px"},d,"linear",function(){e.css("top",a);L(a,B,b.tickerSpeed)})}else if(b.tickerDirection=="prev"){e.animate({top:"+="+c+"px"},d,"linear",function(){e.css("top",a);L(a,B,b.tickerSpeed)})}}}function K(){if(b.auto){if(!b.infiniteLoop){if(b.autoDirection=="next"){o=setInterval(function(){x+=b.moveSlideQty;if(x>G){x=x%g.length}d.goToSlide(x,false)},b.pause)}else if(b.autoDirection=="prev"){o=setInterval(function(){x-=b.moveSlideQty;if(x<0){negativeOffset=x%g.length;if(negativeOffset==0){x=0}else{x=g.length+negativeOffset}}d.goToSlide(x,false)},b.pause)}}else{if(b.autoDirection=="next"){o=setInterval(function(){d.goToNextSlide(false)},b.pause)}else if(b.autoDirection=="prev"){o=setInterval(function(){d.goToPreviousSlide(false)},b.pause)}}}else if(b.ticker){b.tickerSpeed*=10;a(".pager",h).each(function(b){A+=a(this).width();B+=a(this).height()});if(b.tickerDirection=="prev"&&b.mode=="horizontal"){e.css("left","-"+(A+y)+"px")}else if(b.tickerDirection=="prev"&&b.mode=="vertical"){e.css("top","-"+(B+z)+"px")}if(b.mode=="horizontal"){C=parseInt(e.css("left"));L(C,A,b.tickerSpeed)}else if(b.mode=="vertical"){D=parseInt(e.css("top"));L(D,B,b.tickerSpeed)}if(b.tickerHover){O()}}}function J(){if(b.nextImage!=""){nextContent=b.nextImage;nextType="image"}else{nextContent=b.nextText;nextType="text"}if(b.prevImage!=""){prevContent=b.prevImage;prevType="image"}else{prevContent=b.prevText;prevType="text"}R(nextType,nextContent,prevType,prevContent)}function I(){if(b.mode=="horizontal"||b.mode=="vertical"){var c=Z(g,0,b.moveSlideQty,"backward");a.each(c,function(b){e.prepend(a(this))});var d=g.length+b.moveSlideQty-1;var f=g.length-b.displaySlideQty;var h=d-f;var i=Z(g,0,h,"forward");if(b.infiniteLoop){a.each(i,function(b){e.append(a(this))})}}}function H(){I(b.startingSlide);if(b.mode=="horizontal"){e.wrap('<div class="'+b.wrapperClass+'" style="width:'+l+'px; position:relative;"></div>').wrap('<div class="bx-window" style="position:relative; overflow:hidden; width:'+l+'px;"></div>').css({width:"999999px",position:"relative",left:"-"+y+"px"});e.children().css({width:j,"float":"left",listStyle:"none"});h=e.parent().parent();g.addClass("pager")}else if(b.mode=="vertical"){e.wrap('<div class="'+b.wrapperClass+'" style="width:'+v+'px; position:relative;"></div>').wrap('<div class="bx-window" style="width:'+v+"px; height:"+m+'px; position:relative; overflow:hidden;"></div>').css({height:"999999px",position:"relative",top:"-"+z+"px"});e.children().css({listStyle:"none",height:w});h=e.parent().parent();g.addClass("pager")}else if(b.mode=="fade"){e.wrap('<div class="'+b.wrapperClass+'" style="width:'+v+'px; position:relative;"></div>').wrap('<div class="bx-window" style="height:'+w+"px; width:"+v+'px; position:relative; overflow:hidden;"></div>');e.children().css({listStyle:"none",position:"absolute",top:0,left:0,zIndex:98});h=e.parent().parent();g.not(":eq("+x+")").fadeTo(0,0);g.eq(x).css("zIndex",99)}if(b.captions&&b.captionsSelector==null){h.append('<div class="bx-captions"></div>')}}var c={mode:"horizontal",infiniteLoop:true,hideControlOnEnd:true,controls:true,speed:500,easing:"swing",pager:false,pagerSelector:null,pagerType:"full",pagerLocation:"bottom",pagerShortSeparator:"/",pagerActiveClass:"pager-active",nextText:"",nextImage:"",nextSelector:null,prevText:"",prevImage:"",prevSelector:null,captions:false,captionsSelector:null,auto:false,autoDirection:"next",autoControls:false,autoControlsSelector:null,autoStart:true,autoHover:true,autoDelay:0,pause:3e3,startText:"start",startImage:"",stopText:"stop",stopImage:"",ticker:false,tickerSpeed:5e3,tickerDirection:"next",tickerHover:false,wrapperClass:"bx-wrapper",startingSlide:0,displaySlideQty:1,moveSlideQty:1,randomStart:false,onBeforeSlide:function(){},onAfterSlide:function(){},onLastSlide:function(){},onFirstSlide:function(){},onNextSlide:function(){},onPrevSlide:function(){},buildPager:null};var b=a.extend(c,b);var d=this;var e="";var f="";var g="";var h="";var i="";var j="";var k="";var l="";var m="";var n="";var o="";var p="";var q="";var r="";var s="";var t=true;var u=false;var v=0;var w=0;var x=0;var y=0;var z=0;var A=0;var B=0;var C=0;var D=0;var E=false;var F=0;var G=g.length-1;this.goToSlide=function(a,c){if(!E){E=true;x=a;b.onBeforeSlide(x,g.length,g.eq(x));if(typeof c=="undefined"){var c=true}if(c){if(b.auto){d.stopShow(true)}}slide=a;if(slide==F){b.onFirstSlide(x,g.length,g.eq(x))}if(slide==G){b.onLastSlide(x,g.length,g.eq(x))}if(b.mode=="horizontal"){e.animate({left:"-"+W(slide,"left")+"px"},b.speed,b.easing,function(){E=false;b.onAfterSlide(x,g.length,g.eq(x))})}else if(b.mode=="vertical"){e.animate({top:"-"+W(slide,"top")+"px"},b.speed,b.easing,function(){E=false;b.onAfterSlide(x,g.length,g.eq(x))})}else if(b.mode=="fade"){P()}V();if(b.moveSlideQty>1){a=Math.floor(a/b.moveSlideQty)}Q(a);T()}};this.goToNextSlide=function(a){if(typeof a=="undefined"){var a=true}if(a){if(b.auto){d.stopShow(true)}}if(!b.infiniteLoop){if(!E){var c=false;x=x+b.moveSlideQty;if(x<=G){V();b.onNextSlide(x,g.length,g.eq(x));d.goToSlide(x)}else{x-=b.moveSlideQty}}}else{if(!E){E=true;var c=false;x=x+b.moveSlideQty;if(x>G){x=x%g.length;c=true}b.onNextSlide(x,g.length,g.eq(x));b.onBeforeSlide(x,g.length,g.eq(x));if(b.mode=="horizontal"){var f=b.moveSlideQty*k;e.animate({left:"-="+f+"px"},b.speed,b.easing,function(){E=false;if(c){e.css("left","-"+W(x,"left")+"px")}b.onAfterSlide(x,g.length,g.eq(x))})}else if(b.mode=="vertical"){var h=b.moveSlideQty*w;e.animate({top:"-="+h+"px"},b.speed,b.easing,function(){E=false;if(c){e.css("top","-"+W(x,"top")+"px")}b.onAfterSlide(x,g.length,g.eq(x))})}else if(b.mode=="fade"){P()}if(b.moveSlideQty>1){Q(Math.ceil(x/b.moveSlideQty))}else{Q(x)}T()}}};this.goToPreviousSlide=function(c){if(typeof c=="undefined"){var c=true}if(c){if(b.auto){d.stopShow(true)}}if(!b.infiniteLoop){if(!E){var f=false;x=x-b.moveSlideQty;if(x<0){x=0;if(b.hideControlOnEnd){a(".bx-prev",h).hide()}}V();b.onPrevSlide(x,g.length,g.eq(x));d.goToSlide(x)}}else{if(!E){E=true;var f=false;x=x-b.moveSlideQty;if(x<0){negativeOffset=x%g.length;if(negativeOffset==0){x=0}else{x=g.length+negativeOffset}f=true}b.onPrevSlide(x,g.length,g.eq(x));b.onBeforeSlide(x,g.length,g.eq(x));if(b.mode=="horizontal"){var i=b.moveSlideQty*k;e.animate({left:"+="+i+"px"},b.speed,b.easing,function(){E=false;if(f){e.css("left","-"+W(x,"left")+"px")}b.onAfterSlide(x,g.length,g.eq(x))})}else if(b.mode=="vertical"){var j=b.moveSlideQty*w;e.animate({top:"+="+j+"px"},b.speed,b.easing,function(){E=false;if(f){e.css("top","-"+W(x,"top")+"px")}b.onAfterSlide(x,g.length,g.eq(x))})}else if(b.mode=="fade"){P()}if(b.moveSlideQty>1){Q(Math.ceil(x/b.moveSlideQty))}else{Q(x)}T()}}};this.goToFirstSlide=function(a){if(typeof a=="undefined"){var a=true}d.goToSlide(F,a)};this.goToLastSlide=function(){if(typeof a=="undefined"){var a=true}d.goToSlide(G,a)};this.getCurrentSlide=function(){return x};this.getSlideCount=function(){return g.length};this.stopShow=function(a){clearInterval(o);if(typeof a=="undefined"){var a=true}if(a&&b.autoControls){p.html(r).removeClass("stop").addClass("start");t=false}};this.startShow=function(a){if(typeof a=="undefined"){var a=true}K();if(a&&b.autoControls){p.html(s).removeClass("start").addClass("stop");t=true}};this.stopTicker=function(a){e.stop();if(typeof a=="undefined"){var a=true}if(a&&b.ticker){p.html(r).removeClass("stop").addClass("start");t=false}};this.startTicker=function(a){if(b.mode=="horizontal"){if(b.tickerDirection=="next"){var c=parseInt(e.css("left"));var d=A+c+g.eq(0).width()}else if(b.tickerDirection=="prev"){var c=-parseInt(e.css("left"));var d=c-g.eq(0).width()}var f=d*b.tickerSpeed/A;L(C,d,f)}else if(b.mode=="vertical"){if(b.tickerDirection=="next"){var h=parseInt(e.css("top"));var d=B+h+g.eq(0).height()}else if(b.tickerDirection=="prev"){var h=-parseInt(e.css("top"));var d=h-g.eq(0).height()}var f=d*b.tickerSpeed/B;L(D,d,f);if(typeof a=="undefined"){var a=true}if(a&&b.ticker){p.html(s).removeClass("start").addClass("stop");t=true}}};this.initShow=function(){e=a(this);f=e.clone();g=e.children();h="";i=e.children(":first");j=i.width();v=0;k=i.outerWidth();w=0;l=X();m=Y();E=false;n="";x=0;y=0;z=0;o="";p="";q="";r="";s="";t=true;u=false;A=0;B=0;C=0;D=0;F=0;G=g.length-1;g.each(function(b){if(a(this).outerHeight()>w){w=a(this).outerHeight()}if(a(this).outerWidth()>v){v=a(this).outerWidth()}});if(b.randomStart){var c=Math.floor(Math.random()*g.length);x=c;y=k*(b.moveSlideQty+c);z=w*(b.moveSlideQty+c)}else{x=b.startingSlide;y=k*(b.moveSlideQty+b.startingSlide);z=w*(b.moveSlideQty+b.startingSlide)}H();if(b.pager&&!b.ticker){if(b.pagerType=="full"){S("full")}else if(b.pagerType=="short"){S("short")}}if(b.controls&&!b.ticker){J()}if(b.auto||b.ticker){if(b.autoControls){M()}if(b.autoStart){setTimeout(function(){d.startShow(true)},b.autoDelay)}else{d.stopShow(true)}if(b.autoHover&&!b.ticker){N()}}if(b.moveSlideQty>1){Q(Math.ceil(x/b.moveSlideQty))}else{Q(x)}V();if(b.captions){T()}b.onAfterSlide(x,g.length,g.eq(x))};this.destroyShow=function(){clearInterval(o);a(".bx-next, .bx-prev, .bx-pager, .bx-auto",h).remove();e.unwrap().unwrap().removeAttr("style");e.children().removeAttr("style").not(".pager").remove();g.removeClass("pager")};this.reloadShow=function(){d.destroyShow();d.initShow()};this.each(function(){if(a(this).children().length>0){d.initShow()}});return this};jQuery.fx.prototype.cur=function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var a=parseFloat(jQuery.css(this.elem,this.prop));return a}})(jQuery)



/*****************************************************
 * Name: FancyBox
 * Desc: jQuery Modal Overlay
 * Author:  Janis Skarnellis 
            http://fancybox.net
            Copyright (c) 2008 - 2010
 * Version: 1.3.4 (11/11/2010)
 * Requires: jQuery v1.3+
 * License(s): MIT - http://www.opensource.org/licenses/mit-license.php
               GPL - http://www.gnu.org/licenses/gpl.html
*****************************************************/
;(function($){var tmp,loading,overlay,wrap,outer,content,close,title,nav_left,nav_right,selectedIndex=0,selectedOpts={},selectedArray=[],currentIndex=0,currentOpts={},currentArray=[],ajaxLoader=null,imgPreloader=new Image(),imgRegExp=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,swfRegExp=/[^\.]\.(swf)\s*$/i,loadingTimer,loadingFrame=1,titleHeight=0,titleStr='',start_pos,final_pos,busy=false,fx=$.extend($('<div/>')[0],{prop:0}),isIE6=$.browser.msie&&$.browser.version<7&&!window.XMLHttpRequest,_abort=function(){loading.hide();imgPreloader.onerror=imgPreloader.onload=null;if(ajaxLoader){ajaxLoader.abort()}tmp.empty()},_error=function(){if(false===selectedOpts.onError(selectedArray,selectedIndex,selectedOpts)){loading.hide();busy=false;return}selectedOpts.titleShow=false;selectedOpts.width='auto';selectedOpts.height='auto';tmp.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');_process_inline()},_start=function(){var obj=selectedArray[selectedIndex],href,type,title,str,emb,ret;_abort();selectedOpts=$.extend({},$.fn.fancybox.defaults,(typeof $(obj).data('fancybox')=='undefined'?selectedOpts:$(obj).data('fancybox')));ret=selectedOpts.onStart(selectedArray,selectedIndex,selectedOpts);if(ret===false){busy=false;return}else if(typeof ret=='object'){selectedOpts=$.extend(selectedOpts,ret)}title=selectedOpts.title||(obj.nodeName?$(obj).attr('title'):obj.title)||'';if(obj.nodeName&&!selectedOpts.orig){selectedOpts.orig=$(obj).children("img:first").length?$(obj).children("img:first"):$(obj)}if(title===''&&selectedOpts.orig&&selectedOpts.titleFromAlt){title=selectedOpts.orig.attr('alt')}href=selectedOpts.href||(obj.nodeName?$(obj).attr('href'):obj.href)||null;if((/^(?:javascript)/i).test(href)||href=='#'){href=null}if(selectedOpts.type){type=selectedOpts.type;if(!href){href=selectedOpts.content}}else if(selectedOpts.content){type='html'}else if(href){if(href.match(imgRegExp)){type='image'}else if(href.match(swfRegExp)){type='swf'}else if($(obj).hasClass("iframe")){type='iframe'}else if(href.indexOf("#")===0){type='inline'}else{type='ajax'}}if(!type){_error();return}if(type=='inline'){obj=href.substr(href.indexOf("#"));type=$(obj).length>0?'inline':'ajax'}selectedOpts.type=type;selectedOpts.href=href;selectedOpts.title=title;if(selectedOpts.autoDimensions){if(selectedOpts.type=='html'||selectedOpts.type=='inline'||selectedOpts.type=='ajax'){selectedOpts.width='auto';selectedOpts.height='auto'}else{selectedOpts.autoDimensions=false}}if(selectedOpts.modal){selectedOpts.overlayShow=true;selectedOpts.hideOnOverlayClick=false;selectedOpts.hideOnContentClick=false;selectedOpts.enableEscapeButton=false;selectedOpts.showCloseButton=false}selectedOpts.padding=parseInt(selectedOpts.padding,10);selectedOpts.margin=parseInt(selectedOpts.margin,10);tmp.css('padding',(selectedOpts.padding+selectedOpts.margin));$('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change',function(){$(this).replaceWith(content.children())});switch(type){case'html':tmp.html(selectedOpts.content);_process_inline();break;case'inline':if($(obj).parent().is('#fancybox-content')===true){busy=false;return}$('<div class="fancybox-inline-tmp" />').hide().insertBefore($(obj)).bind('fancybox-cleanup',function(){$(this).replaceWith(content.children())}).bind('fancybox-cancel',function(){$(this).replaceWith(tmp.children())});$(obj).appendTo(tmp);_process_inline();break;case'image':busy=false;$.fancybox.showActivity();imgPreloader=new Image();imgPreloader.onerror=function(){_error()};imgPreloader.onload=function(){busy=true;imgPreloader.onerror=imgPreloader.onload=null;_process_image()};imgPreloader.src=href;break;case'swf':selectedOpts.scrolling='no';str='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+selectedOpts.width+'" height="'+selectedOpts.height+'"><param name="movie" value="'+href+'"></param>';emb='';$.each(selectedOpts.swf,function(name,val){str+='<param name="'+name+'" value="'+val+'"></param>';emb+=' '+name+'="'+val+'"'});str+='<embed src="'+href+'" type="application/x-shockwave-flash" width="'+selectedOpts.width+'" height="'+selectedOpts.height+'"'+emb+'></embed></object>';tmp.html(str);_process_inline();break;case'ajax':busy=false;$.fancybox.showActivity();selectedOpts.ajax.win=selectedOpts.ajax.success;ajaxLoader=$.ajax($.extend({},selectedOpts.ajax,{url:href,data:selectedOpts.ajax.data||{},error:function(XMLHttpRequest,textStatus,errorThrown){if(XMLHttpRequest.status>0){_error()}},success:function(data,textStatus,XMLHttpRequest){var o=typeof XMLHttpRequest=='object'?XMLHttpRequest:ajaxLoader;if(o.status==200){if(typeof selectedOpts.ajax.win=='function'){ret=selectedOpts.ajax.win(href,data,textStatus,XMLHttpRequest);if(ret===false){loading.hide();return}else if(typeof ret=='string'||typeof ret=='object'){data=ret}}tmp.html(data);_process_inline()}}}));break;case'iframe':_show();break}},_process_inline=function(){var w=selectedOpts.width,h=selectedOpts.height;if(w.toString().indexOf('%')>-1){w=parseInt(($(window).width()-(selectedOpts.margin*2))*parseFloat(w)/100,10)+'px'}else{w=w=='auto'?'auto':w+'px'}if(h.toString().indexOf('%')>-1){h=parseInt(($(window).height()-(selectedOpts.margin*2))*parseFloat(h)/100,10)+'px'}else{h=h=='auto'?'auto':h+'px'}tmp.wrapInner('<div style="width:'+w+';height:'+h+';overflow: '+(selectedOpts.scrolling=='auto'?'auto':(selectedOpts.scrolling=='yes'?'scroll':'hidden'))+';position:relative;"></div>');selectedOpts.width=tmp.width();selectedOpts.height=tmp.height();_show()},_process_image=function(){selectedOpts.width=imgPreloader.width;selectedOpts.height=imgPreloader.height;$("<img />").attr({'id':'fancybox-img','src':imgPreloader.src,'alt':selectedOpts.title}).appendTo(tmp);_show()},_show=function(){var pos,equal;loading.hide();if(wrap.is(":visible")&&false===currentOpts.onCleanup(currentArray,currentIndex,currentOpts)){$.event.trigger('fancybox-cancel');busy=false;return}busy=true;$(content.add(overlay)).unbind();$(window).unbind("resize.fb scroll.fb");$(document).unbind('keydown.fb');if(wrap.is(":visible")&&currentOpts.titlePosition!=='outside'){wrap.css('height',wrap.height())}currentArray=selectedArray;currentIndex=selectedIndex;currentOpts=selectedOpts;if(currentOpts.overlayShow){overlay.css({'background-color':currentOpts.overlayColor,'opacity':currentOpts.overlayOpacity,'cursor':currentOpts.hideOnOverlayClick?'pointer':'auto','height':$(document).height()});if(!overlay.is(':visible')){if(isIE6){$('select:not(#fancybox-tmp select)').filter(function(){return this.style.visibility!=='hidden'}).css({'visibility':'hidden'}).one('fancybox-cleanup',function(){this.style.visibility='inherit'})}overlay.show()}}else{overlay.hide()}final_pos=_get_zoom_to();_process_title();if(wrap.is(":visible")){$(close.add(nav_left).add(nav_right)).hide();pos=wrap.position(),start_pos={top:pos.top,left:pos.left,width:wrap.width(),height:wrap.height()};equal=(start_pos.width==final_pos.width&&start_pos.height==final_pos.height);content.fadeTo(currentOpts.changeFade,0.3,function(){var finish_resizing=function(){content.html(tmp.contents()).fadeTo(currentOpts.changeFade,1,_finish)};$.event.trigger('fancybox-change');content.empty().removeAttr('filter').css({'border-width':currentOpts.padding,'width':final_pos.width-currentOpts.padding*2,'height':selectedOpts.autoDimensions?'auto':final_pos.height-titleHeight-currentOpts.padding*2});if(equal){finish_resizing()}else{fx.prop=0;$(fx).animate({prop:1},{duration:currentOpts.changeSpeed,easing:currentOpts.easingChange,step:_draw,complete:finish_resizing})}});return}wrap.removeAttr("style");content.css('border-width',currentOpts.padding);if(currentOpts.transitionIn=='elastic'){start_pos=_get_zoom_from();content.html(tmp.contents());wrap.show();if(currentOpts.opacity){final_pos.opacity=0}fx.prop=0;$(fx).animate({prop:1},{duration:currentOpts.speedIn,easing:currentOpts.easingIn,step:_draw,complete:_finish});return}if(currentOpts.titlePosition=='inside'&&titleHeight>0){title.show()}content.css({'width':final_pos.width-currentOpts.padding*2,'height':selectedOpts.autoDimensions?'auto':final_pos.height-titleHeight-currentOpts.padding*2}).html(tmp.contents());wrap.css(final_pos).fadeIn(currentOpts.transitionIn=='none'?0:currentOpts.speedIn,_finish)},_format_title=function(title){if(title&&title.length){if(currentOpts.titlePosition=='float'){return'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+title+'</td><td id="fancybox-title-float-right"></td></tr></table>'}return'<div id="fancybox-title-'+currentOpts.titlePosition+'">'+title+'</div>'}return false},_process_title=function(){titleStr=currentOpts.title||'';titleHeight=0;title.empty().removeAttr('style').removeClass();if(currentOpts.titleShow===false){title.hide();return}titleStr=$.isFunction(currentOpts.titleFormat)?currentOpts.titleFormat(titleStr,currentArray,currentIndex,currentOpts):_format_title(titleStr);if(!titleStr||titleStr===''){title.hide();return}title.addClass('fancybox-title-'+currentOpts.titlePosition).html(titleStr).appendTo('body').show();switch(currentOpts.titlePosition){case'inside':title.css({'width':final_pos.width-(currentOpts.padding*2),'marginLeft':currentOpts.padding,'marginRight':currentOpts.padding});titleHeight=title.outerHeight(true);title.appendTo(outer);final_pos.height+=titleHeight;break;case'over':title.css({'marginLeft':currentOpts.padding,'width':final_pos.width-(currentOpts.padding*2),'bottom':currentOpts.padding}).appendTo(outer);break;case'float':title.css('left',parseInt((title.width()-final_pos.width-40)/2,10)*-1).appendTo(wrap);break;default:title.css({'width':final_pos.width-(currentOpts.padding*2),'paddingLeft':currentOpts.padding,'paddingRight':currentOpts.padding}).appendTo(wrap);break}title.hide()},_set_navigation=function(){if(currentOpts.enableEscapeButton||currentOpts.enableKeyboardNav){$(document).bind('keydown.fb',function(e){if(e.keyCode==27&&currentOpts.enableEscapeButton){e.preventDefault();$.fancybox.close()}else if((e.keyCode==37||e.keyCode==39)&&currentOpts.enableKeyboardNav&&e.target.tagName!=='INPUT'&&e.target.tagName!=='TEXTAREA'&&e.target.tagName!=='SELECT'){e.preventDefault();$.fancybox[e.keyCode==37?'prev':'next']()}})}if(!currentOpts.showNavArrows){nav_left.hide();nav_right.hide();return}if((currentOpts.cyclic&&currentArray.length>1)||currentIndex!==0){nav_left.show()}if((currentOpts.cyclic&&currentArray.length>1)||currentIndex!=(currentArray.length-1)){nav_right.show()}},_finish=function(){if(!$.support.opacity){content.get(0).style.removeAttribute('filter');wrap.get(0).style.removeAttribute('filter')}if(selectedOpts.autoDimensions){content.css('height','auto')}wrap.css('height','auto');if(titleStr&&titleStr.length){title.show()}if(currentOpts.showCloseButton){close.show()}_set_navigation();if(currentOpts.hideOnContentClick){content.bind('click',$.fancybox.close)}if(currentOpts.hideOnOverlayClick){overlay.bind('click',$.fancybox.close)}$(window).bind("resize.fb",$.fancybox.resize);if(currentOpts.centerOnScroll){$(window).bind("scroll.fb",$.fancybox.center)}if(currentOpts.type=='iframe'){$('<iframe id="fancybox-frame" name="fancybox-frame'+new Date().getTime()+'" frameborder="0" hspace="0" '+($.browser.msie?'allowtransparency="true""':'')+' scrolling="'+selectedOpts.scrolling+'" src="'+currentOpts.href+'"></iframe>').appendTo(content)}wrap.show();busy=false;$.fancybox.center();currentOpts.onComplete(currentArray,currentIndex,currentOpts);_preload_images()},_preload_images=function(){var href,objNext;if((currentArray.length-1)>currentIndex){href=currentArray[currentIndex+1].href;if(typeof href!=='undefined'&&href.match(imgRegExp)){objNext=new Image();objNext.src=href}}if(currentIndex>0){href=currentArray[currentIndex-1].href;if(typeof href!=='undefined'&&href.match(imgRegExp)){objNext=new Image();objNext.src=href}}},_draw=function(pos){var dim={width:parseInt(start_pos.width+(final_pos.width-start_pos.width)*pos,10),height:parseInt(start_pos.height+(final_pos.height-start_pos.height)*pos,10),top:parseInt(start_pos.top+(final_pos.top-start_pos.top)*pos,10),left:parseInt(start_pos.left+(final_pos.left-start_pos.left)*pos,10)};if(typeof final_pos.opacity!=='undefined'){dim.opacity=pos<0.5?0.5:pos}wrap.css(dim);content.css({'width':dim.width-currentOpts.padding*2,'height':dim.height-(titleHeight*pos)-currentOpts.padding*2})},_get_viewport=function(){return[$(window).width()-(currentOpts.margin*2),$(window).height()-(currentOpts.margin*2),$(document).scrollLeft()+currentOpts.margin,$(document).scrollTop()+currentOpts.margin]},_get_zoom_to=function(){var view=_get_viewport(),to={},resize=currentOpts.autoScale,double_padding=currentOpts.padding*2,ratio;if(currentOpts.width.toString().indexOf('%')>-1){to.width=parseInt((view[0]*parseFloat(currentOpts.width))/100,10)}else{to.width=currentOpts.width+double_padding}if(currentOpts.height.toString().indexOf('%')>-1){to.height=parseInt((view[1]*parseFloat(currentOpts.height))/100,10)}else{to.height=currentOpts.height+double_padding}if(resize&&(to.width>view[0]||to.height>view[1])){if(selectedOpts.type=='image'||selectedOpts.type=='swf'){ratio=(currentOpts.width)/(currentOpts.height);if((to.width)>view[0]){to.width=view[0];to.height=parseInt(((to.width-double_padding)/ratio)+double_padding,10)}if((to.height)>view[1]){to.height=view[1];to.width=parseInt(((to.height-double_padding)*ratio)+double_padding,10)}}else{to.width=Math.min(to.width,view[0]);to.height=Math.min(to.height,view[1])}}to.top=parseInt(Math.max(view[3]-20,view[3]+((view[1]-to.height-40)*0.5)),10);to.left=parseInt(Math.max(view[2]-20,view[2]+((view[0]-to.width-40)*0.5)),10);return to},_get_obj_pos=function(obj){var pos=obj.offset();pos.top+=parseInt(obj.css('paddingTop'),10)||0;pos.left+=parseInt(obj.css('paddingLeft'),10)||0;pos.top+=parseInt(obj.css('border-top-width'),10)||0;pos.left+=parseInt(obj.css('border-left-width'),10)||0;pos.width=obj.width();pos.height=obj.height();return pos},_get_zoom_from=function(){var orig=selectedOpts.orig?$(selectedOpts.orig):false,from={},pos,view;if(orig&&orig.length){pos=_get_obj_pos(orig);from={width:pos.width+(currentOpts.padding*2),height:pos.height+(currentOpts.padding*2),top:pos.top-currentOpts.padding-20,left:pos.left-currentOpts.padding-20}}else{view=_get_viewport();from={width:currentOpts.padding*2,height:currentOpts.padding*2,top:parseInt(view[3]+view[1]*0.5,10),left:parseInt(view[2]+view[0]*0.5,10)}}return from},_animate_loading=function(){if(!loading.is(':visible')){clearInterval(loadingTimer);return}$('div',loading).css('top',(loadingFrame*-40)+'px');loadingFrame=(loadingFrame+1)%12};$.fn.fancybox=function(options){if(!$(this).length){return this}$(this).data('fancybox',$.extend({},options,($.metadata?$(this).metadata():{}))).unbind('click.fb').bind('click.fb',function(e){e.preventDefault();if(busy){return}busy=true;$(this).blur();selectedArray=[];selectedIndex=0;var rel=$(this).attr('rel')||'';if(!rel||rel==''||rel==='nofollow'){selectedArray.push(this)}else{selectedArray=$("a[rel="+rel+"], area[rel="+rel+"]");selectedIndex=selectedArray.index(this)}_start();return});return this};$.fancybox=function(obj){var opts;if(busy){return}busy=true;opts=typeof arguments[1]!=='undefined'?arguments[1]:{};selectedArray=[];selectedIndex=parseInt(opts.index,10)||0;if($.isArray(obj)){for(var i=0,j=obj.length;i<j;i++){if(typeof obj[i]=='object'){$(obj[i]).data('fancybox',$.extend({},opts,obj[i]))}else{obj[i]=$({}).data('fancybox',$.extend({content:obj[i]},opts))}}selectedArray=jQuery.merge(selectedArray,obj)}else{if(typeof obj=='object'){$(obj).data('fancybox',$.extend({},opts,obj))}else{obj=$({}).data('fancybox',$.extend({content:obj},opts))}selectedArray.push(obj)}if(selectedIndex>selectedArray.length||selectedIndex<0){selectedIndex=0}_start()};$.fancybox.showActivity=function(){clearInterval(loadingTimer);loading.show();loadingTimer=setInterval(_animate_loading,66)};$.fancybox.hideActivity=function(){loading.hide()};$.fancybox.next=function(){return $.fancybox.pos(currentIndex+1)};$.fancybox.prev=function(){return $.fancybox.pos(currentIndex-1)};$.fancybox.pos=function(pos){if(busy){return}pos=parseInt(pos);selectedArray=currentArray;if(pos>-1&&pos<currentArray.length){selectedIndex=pos;_start()}else if(currentOpts.cyclic&&currentArray.length>1){selectedIndex=pos>=currentArray.length?0:currentArray.length-1;_start()}return};$.fancybox.cancel=function(){if(busy){return}busy=true;$.event.trigger('fancybox-cancel');_abort();selectedOpts.onCancel(selectedArray,selectedIndex,selectedOpts);busy=false};$.fancybox.close=function(){if(busy||wrap.is(':hidden')){return}busy=true;if(currentOpts&&false===currentOpts.onCleanup(currentArray,currentIndex,currentOpts)){busy=false;return}_abort();$(close.add(nav_left).add(nav_right)).hide();$(content.add(overlay)).unbind();$(window).unbind("resize.fb scroll.fb");$(document).unbind('keydown.fb');content.find('iframe').attr('src',isIE6&&/^https/i.test(window.location.href||'')?'javascript:void(false)':'about:blank');if(currentOpts.titlePosition!=='inside'){title.empty()}wrap.stop();function _cleanup(){overlay.fadeOut('fast');title.empty().hide();wrap.hide();$.event.trigger('fancybox-cleanup');content.empty();currentOpts.onClosed(currentArray,currentIndex,currentOpts);currentArray=selectedOpts=[];currentIndex=selectedIndex=0;currentOpts=selectedOpts={};busy=false}if(currentOpts.transitionOut=='elastic'){start_pos=_get_zoom_from();var pos=wrap.position();final_pos={top:pos.top,left:pos.left,width:wrap.width(),height:wrap.height()};if(currentOpts.opacity){final_pos.opacity=1}title.empty().hide();fx.prop=1;$(fx).animate({prop:0},{duration:currentOpts.speedOut,easing:currentOpts.easingOut,step:_draw,complete:_cleanup})}else{wrap.fadeOut(currentOpts.transitionOut=='none'?0:currentOpts.speedOut,_cleanup)}};$.fancybox.resize=function(){if(overlay.is(':visible')){overlay.css('height',$(document).height())}$.fancybox.center(true)};$.fancybox.center=function(){var view,align;if(busy){return}align=arguments[0]===true?1:0;view=_get_viewport();if(!align&&(wrap.width()>view[0]||wrap.height()>view[1])){return}wrap.stop().animate({'top':parseInt(Math.max(view[3]-20,view[3]+((view[1]-content.height()-40)*0.5)-currentOpts.padding)),'left':parseInt(Math.max(view[2]-20,view[2]+((view[0]-content.width()-40)*0.5)-currentOpts.padding))},typeof arguments[0]=='number'?arguments[0]:200)};$.fancybox.init=function(){if($("#fancybox-wrap").length){return}$('body').append(tmp=$('<div id="fancybox-tmp"></div>'),loading=$('<div id="fancybox-loading"><div></div></div>'),overlay=$('<div id="fancybox-overlay"></div>'),wrap=$('<div id="fancybox-wrap"></div>'));outer=$('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(wrap);outer.append(content=$('<div id="fancybox-content"></div>'),close=$('<a id="fancybox-close"></a>'),title=$('<div id="fancybox-title"></div>'),nav_left=$('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),nav_right=$('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));close.click($.fancybox.close);loading.click($.fancybox.cancel);nav_left.click(function(e){e.preventDefault();$.fancybox.prev()});nav_right.click(function(e){e.preventDefault();$.fancybox.next()});if($.fn.mousewheel){wrap.bind('mousewheel.fb',function(e,delta){if(busy){e.preventDefault()}else if($(e.target).get(0).clientHeight==0||$(e.target).get(0).scrollHeight===$(e.target).get(0).clientHeight){e.preventDefault();$.fancybox[delta>0?'prev':'next']()}})}if(!$.support.opacity){wrap.addClass('fancybox-ie')}if(isIE6){loading.addClass('fancybox-ie6');wrap.addClass('fancybox-ie6');$('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||'')?'javascript:void(false)':'about:blank')+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(outer)}};$.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:'auto',width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:'transparent'},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:'#000',titleShow:true,titlePosition:'float',titleFormat:null,titleFromAlt:false,transitionIn:'fade',transitionOut:'fade',speedIn:300,speedOut:300,changeSpeed:300,changeFade:'fast',easingIn:'swing',easingOut:'swing',showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};$(document).ready(function(){$.fancybox.init()})})(jQuery);



/*****************************************************
 * Name: JS Loader
 * Desc: Loads javascript functions with windowOnload() then doWindowOnload()
*****************************************************/
var onloadList=new Array();function doWindowOnload(){for(var i=0;i<onloadList.length;i++){try{onloadList[i]()}catch(e){}}}function windowOnload(f){if(typeof window.onload=='function')onloadList.push(window.onload);window.onload=null;onloadList.push(f)}




