/* SWFObject v2.1 <http://code.google.com/p/swfobject/>
	Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();
/*
* jCarousel - Riding carousels with jQuery
* http://sorgalla.com/jcarousel/
* Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
* Inspired by the "Carousel Component" by Bill Scott
* http://billwscott.com/carousel/
*/
(function($) {
$.fn.jcarousel = function(o) {
return this.each(function() {
new $jc(this, o);
});
};
var defaults = {
vertical: false,
start: 1,
offset: 1,
size: null,
scroll: 3,
visible: null,
animation: 'normal',
easing: 'swing',
auto: 0,
wrap: null,
initCallback: null,
reloadCallback: null,
itemLoadCallback: null,
itemFirstInCallback: null,
itemFirstOutCallback: null,
itemLastInCallback: null,
itemLastOutCallback: null,
itemVisibleInCallback: null,
itemVisibleOutCallback: null,
buttonNextHTML: '<div></div>',
buttonPrevHTML: '<div></div>',
buttonNextEvent: 'click',
buttonPrevEvent: 'click',
buttonNextCallback: null,
buttonPrevCallback: null
};
$.jcarousel = function(e, o) {
this.options = $.extend({}, defaults, o || {});
this.locked = false;
this.container = null;
this.clip = null;
this.list = null;
this.buttonNext = null;
this.buttonPrev = null;
this.wh = !this.options.vertical ? 'width' : 'height';
this.lt = !this.options.vertical ? 'left' : 'top';
var skin = '', split = e.className.split(' ');
for (var i = 0; i < split.length; i++) {
if (split[i].indexOf('jcarousel-skin') != -1) {
$(e).removeClass(split[i]);
var skin = split[i];
break;
}
}
if (e.nodeName == 'UL' || e.nodeName == 'OL') {
this.list = $(e);
this.container = this.list.parent();
if (this.container.hasClass('jcarousel-clip')) {
if (!this.container.parent().hasClass('jcarousel-container'))
this.container = this.container.wrap('<div></div>');
this.container = this.container.parent();
} else if (!this.container.hasClass('jcarousel-container'))
this.container = this.list.wrap('<div></div>').parent();
} else {
this.container = $(e);
this.list = $(e).find('>ul,>ol,div>ul,div>ol');
}
if (skin != '' && this.container.parent()[0].className.indexOf('jcarousel-skin') == -1)
this.container.wrap('<div class=" '+ skin + '"></div>');
this.clip = this.list.parent();
if (!this.clip.length || !this.clip.hasClass('jcarousel-clip'))
this.clip = this.list.wrap('<div></div>').parent();
this.buttonPrev = $('.jcarousel-prev', this.container);
if (this.buttonPrev.size() == 0 && this.options.buttonPrevHTML != null)
this.buttonPrev = this.clip.before(this.options.buttonPrevHTML).prev();
this.buttonPrev.addClass(this.className('jcarousel-prev'));
this.buttonNext = $('.jcarousel-next', this.container);
if (this.buttonNext.size() == 0 && this.options.buttonNextHTML != null)
this.buttonNext = this.clip.before(this.options.buttonNextHTML).prev();
this.buttonNext.addClass(this.className('jcarousel-next'));
this.clip.addClass(this.className('jcarousel-clip'));
this.list.addClass(this.className('jcarousel-list'));
this.container.addClass(this.className('jcarousel-container'));
var di = this.options.visible != null ? Math.ceil(this.clipping() / this.options.visible) : null;
var li = this.list.children('li');
var self = this;
if (li.size() > 0) {
var wh = 0, i = this.options.offset;
li.each(function() {
self.format(this, i++);
wh += self.dimension(this, di);
});
this.list.css(this.wh, wh + 'px');
if (!o || o.size === undefined)
this.options.size = li.size();
}
this.container.css('display', 'block');
this.buttonNext.css('display', 'block');
this.buttonPrev.css('display', 'block');
this.funcNext = function() { self.next(); };
this.funcPrev = function() { self.prev(); };
this.funcResize = function() { self.reload(); };
if (this.options.initCallback != null)
this.options.initCallback(this, 'init');
if ($.browser.safari) {
this.buttons(false, false);
$(window).bind('load', function() { self.setup(); });
} else
this.setup();
};
var $jc = $.jcarousel;
$jc.fn = $jc.prototype = {
jcarousel: '0.2.3'
};
$jc.fn.extend = $jc.extend = $.extend;
$jc.fn.extend({
setup: function() {
this.first = null;
this.last = null;
this.prevFirst = null;
this.prevLast = null;
this.animating = false;
this.timer = null;
this.tail = null;
this.inTail = false;
if (this.locked)
return;
this.list.css(this.lt, this.pos(this.options.offset) + 'px');
var p = this.pos(this.options.start);
this.prevFirst = this.prevLast = null;
this.animate(p, false);
$(window).unbind('resize', this.funcResize).bind('resize', this.funcResize);
},
reset: function() {
this.list.empty();
this.list.css(this.lt, '0px');
this.list.css(this.wh, '10px');
if (this.options.initCallback != null)
this.options.initCallback(this, 'reset');
this.setup();
},
reload: function() {
if (this.tail != null && this.inTail)
this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) + this.tail);
this.tail = null;
this.inTail = false;
if (this.options.reloadCallback != null)
this.options.reloadCallback(this);
if (this.options.visible != null) {
var self = this;
var di = Math.ceil(this.clipping() / this.options.visible), wh = 0, lt = 0;
$('li', this.list).each(function(i) {
wh += self.dimension(this, di);
if (i + 1 < self.first)
lt = wh;
});
this.list.css(this.wh, wh + 'px');
this.list.css(this.lt, -lt + 'px');
}
this.scroll(this.first, false);
},
lock: function() {
this.locked = true;
this.buttons();
},
unlock: function() {
this.locked = false;
this.buttons();
},
size: function(s) {
if (s != undefined) {
this.options.size = s;
if (!this.locked)
this.buttons();
}
return this.options.size;
},
has: function(i, i2) {
if (i2 == undefined || !i2)
i2 = i;
if (this.options.size !== null && i2 > this.options.size)
i2 = this.options.size;
for (var j = i; j <= i2; j++) {
var e = this.get(j);
if (!e.length || e.hasClass('jcarousel-item-placeholder'))
return false;
}
return true;
},
get: function(i) {
return $('.jcarousel-item-' + i, this.list);
},
add: function(i, s) {
var e = this.get(i), old = 0, add = 0;
if (e.length == 0) {
var c, e = this.create(i), j = $jc.intval(i);
while (c = this.get(--j)) {
if (j <= 0 || c.length) {
j <= 0 ? this.list.prepend(e) : c.after(e);
break;
}
}
} else
old = this.dimension(e);
e.removeClass(this.className('jcarousel-item-placeholder'));
typeof s == 'string' ? e.html(s) : e.empty().append(s);
var di = this.options.visible != null ? Math.ceil(this.clipping() / this.options.visible) : null;
var wh = this.dimension(e, di) - old;
if (i > 0 && i < this.first)
this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) - wh + 'px');
this.list.css(this.wh, $jc.intval(this.list.css(this.wh)) + wh + 'px');
return e;
},
remove: function(i) {
var e = this.get(i);
if (!e.length || (i >= this.first && i <= this.last))
return;
var d = this.dimension(e);
if (i < this.first)
this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) + d + 'px');
e.remove();
this.list.css(this.wh, $jc.intval(this.list.css(this.wh)) - d + 'px');
},
next: function() {
this.stopAuto();
if (this.tail != null && !this.inTail)
this.scrollTail(false);
else
this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'last') && this.options.size != null && this.last == this.options.size) ? 1 : this.first + this.options.scroll);
},
prev: function() {
this.stopAuto();
if (this.tail != null && this.inTail)
this.scrollTail(true);
else
this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'first') && this.options.size != null && this.first == 1) ? this.options.size : this.first - this.options.scroll);
},
scrollTail: function(b) {
if (this.locked || this.animating || !this.tail)
return;
var pos = $jc.intval(this.list.css(this.lt));
!b ? pos -= this.tail : pos += this.tail;
this.inTail = !b;
this.prevFirst = this.first;
this.prevLast = this.last;
this.animate(pos);
},
scroll: function(i, a) {
if (this.locked || this.animating)
return;
this.animate(this.pos(i), a);
},
pos: function(i) {
if (this.locked || this.animating)
return;
if (this.options.wrap != 'circular')
i = i < 1 ? 1 : (this.options.size && i > this.options.size ? this.options.size : i);
var back = this.first > i;
var pos = $jc.intval(this.list.css(this.lt));
var f = this.options.wrap != 'circular' && this.first <= 1 ? 1 : this.first;
var c = back ? this.get(f) : this.get(this.last);
var j = back ? f : f - 1;
var e = null, l = 0, p = false, d = 0;
while (back ? --j >= i : ++j < i) {
e = this.get(j);
p = !e.length;
if (e.length == 0) {
e = this.create(j).addClass(this.className('jcarousel-item-placeholder'));
c[back ? 'before' : 'after' ](e);
}
c = e;
d = this.dimension(e);
if (p)
l += d;
if (this.first != null && (this.options.wrap == 'circular' || (j >= 1 && (this.options.size == null || j <= this.options.size))))
pos = back ? pos + d : pos - d;
}
var clipping = this.clipping();
var cache = [];
var visible = 0, j = i, v = 0;
var c = this.get(i - 1);
while (++visible) {
e = this.get(j);
p = !e.length;
if (e.length == 0) {
e = this.create(j).addClass(this.className('jcarousel-item-placeholder'));
c.length == 0 ? this.list.prepend(e) : c[back ? 'before' : 'after' ](e);
}
c = e;
var d = this.dimension(e);
if (d == 0) {
alert('jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...');
return 0;
}
if (this.options.wrap != 'circular' && this.options.size !== null && j > this.options.size)
cache.push(e);
else if (p)
l += d;
v += d;
if (v >= clipping)
break;
j++;
}
for (var x = 0; x < cache.length; x++)
cache[x].remove();
if (l > 0) {
this.list.css(this.wh, this.dimension(this.list) + l + 'px');
if (back) {
pos -= l;
this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) - l + 'px');
}
}
var last = i + visible - 1;
if (this.options.wrap != 'circular' && this.options.size && last > this.options.size)
last = this.options.size;
if (j > last) {
visible = 0, j = last, v = 0;
while (++visible) {
var e = this.get(j--);
if (!e.length)
break;
v += this.dimension(e);
if (v >= clipping)
break;
}
}
var first = last - visible + 1;
if (this.options.wrap != 'circular' && first < 1)
first = 1;
if (this.inTail && back) {
pos += this.tail;
this.inTail = false;
}
this.tail = null;
if (this.options.wrap != 'circular' && last == this.options.size && (last - visible + 1) >= 1) {
var m = $jc.margin(this.get(last), !this.options.vertical ? 'marginRight' : 'marginBottom');
if ((v - m) > clipping)
this.tail = v - clipping - m;
}
while (i-- > first)
pos += this.dimension(this.get(i));
this.prevFirst = this.first;
this.prevLast = this.last;
this.first = first;
this.last = last;
return pos;
},
animate: function(p, a) {
if (this.locked || this.animating)
return;
this.animating = true;
var self = this;
var scrolled = function() {
self.animating = false;
if (p == 0)
self.list.css(self.lt, 0);
if (self.options.wrap == 'both' || self.options.wrap == 'last' || self.options.size == null || self.last < self.options.size)
self.startAuto();
self.buttons();
self.notify('onAfterAnimation');
};
this.notify('onBeforeAnimation');
if (!this.options.animation || a == false) {
this.list.css(this.lt, p + 'px');
scrolled();
} else {
var o = !this.options.vertical ? {'left': p} : {'top': p};
this.list.animate(o, this.options.animation, this.options.easing, scrolled);
}
},
startAuto: function(s) {
if (s != undefined)
this.options.auto = s;
if (this.options.auto == 0)
return this.stopAuto();
if (this.timer != null)
return;
var self = this;
this.timer = setTimeout(function() { self.next(); }, this.options.auto * 1000);
},
stopAuto: function() {
if (this.timer == null)
return;
clearTimeout(this.timer);
this.timer = null;
},
buttons: function(n, p) {
if (n == undefined || n == null) {
var n = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != 'first') || this.options.size == null || this.last < this.options.size);
if (!this.locked && (!this.options.wrap || this.options.wrap == 'first') && this.options.size != null && this.last >= this.options.size)
n = this.tail != null && !this.inTail;
}
if (p == undefined || p == null) {
var p = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != 'last') || this.first > 1);
if (!this.locked && (!this.options.wrap || this.options.wrap == 'last') && this.options.size != null && this.first == 1)
p = this.tail != null && this.inTail;
}
var self = this;
this.buttonNext[n ? 'bind' : 'unbind'](this.options.buttonNextEvent, this.funcNext)[n ? 'removeClass' : 'addClass'](this.className('jcarousel-next-disabled')).attr('disabled', n ? false : true);
this.buttonPrev[p ? 'bind' : 'unbind'](this.options.buttonPrevEvent, this.funcPrev)[p ? 'removeClass' : 'addClass'](this.className('jcarousel-prev-disabled')).attr('disabled', p ? false : true);
if (this.buttonNext.length > 0 && (this.buttonNext[0].jcarouselstate == undefined || this.buttonNext[0].jcarouselstate != n) && this.options.buttonNextCallback != null) {
this.buttonNext.each(function() { self.options.buttonNextCallback(self, this, n); });
this.buttonNext[0].jcarouselstate = n;
}
if (this.buttonPrev.length > 0 && (this.buttonPrev[0].jcarouselstate == undefined || this.buttonPrev[0].jcarouselstate != p) && this.options.buttonPrevCallback != null) {
this.buttonPrev.each(function() { self.options.buttonPrevCallback(self, this, p); });
this.buttonPrev[0].jcarouselstate = p;
}
},
notify: function(evt) {
var state = this.prevFirst == null ? 'init' : (this.prevFirst < this.first ? 'next' : 'prev');
this.callback('itemLoadCallback', evt, state);
if (this.prevFirst !== this.first) {
this.callback('itemFirstInCallback', evt, state, this.first);
this.callback('itemFirstOutCallback', evt, state, this.prevFirst);
}
if (this.prevLast !== this.last) {
this.callback('itemLastInCallback', evt, state, this.last);
this.callback('itemLastOutCallback', evt, state, this.prevLast);
}
this.callback('itemVisibleInCallback', evt, state, this.first, this.last, this.prevFirst, this.prevLast);
this.callback('itemVisibleOutCallback', evt, state, this.prevFirst, this.prevLast, this.first, this.last);
},
callback: function(cb, evt, state, i1, i2, i3, i4) {
if (this.options[cb] == undefined || (typeof this.options[cb] != 'object' && evt != 'onAfterAnimation'))
return;
var callback = typeof this.options[cb] == 'object' ? this.options[cb][evt] : this.options[cb];
if (!$.isFunction(callback))
return;
var self = this;
if (i1 === undefined)
callback(self, state, evt);
else if (i2 === undefined)
this.get(i1).each(function() { callback(self, this, i1, state, evt); });
else {
for (var i = i1; i <= i2; i++)
if (i !== null && !(i >= i3 && i <= i4))
this.get(i).each(function() { callback(self, this, i, state, evt); });
}
},
create: function(i) {
return this.format('<li></li>', i);
},
format: function(e, i) {
var $e = $(e).addClass(this.className('jcarousel-item')).addClass(this.className('jcarousel-item-' + i));
$e.attr('jcarouselindex', i);
return $e;
},
className: function(c) {
return c + ' ' + c + (!this.options.vertical ? '-horizontal' : '-vertical');
},
dimension: function(e, d) {
var el = e.jquery != undefined ? e[0] : e;
var old = !this.options.vertical ?
el.offsetWidth + $jc.margin(el, 'marginLeft') + $jc.margin(el, 'marginRight') :
el.offsetHeight + $jc.margin(el, 'marginTop') + $jc.margin(el, 'marginBottom');
if (d == undefined || old == d)
return old;
var w = !this.options.vertical ?
d - $jc.margin(el, 'marginLeft') - $jc.margin(el, 'marginRight') :
d - $jc.margin(el, 'marginTop') - $jc.margin(el, 'marginBottom');
$(el).css(this.wh, w + 'px');
return this.dimension(el);
},
clipping: function() {
return !this.options.vertical ?
this.clip[0].offsetWidth - $jc.intval(this.clip.css('borderLeftWidth')) - $jc.intval(this.clip.css('borderRightWidth')) :
this.clip[0].offsetHeight - $jc.intval(this.clip.css('borderTopWidth')) - $jc.intval(this.clip.css('borderBottomWidth'));
},
index: function(i, s) {
if (s == undefined)
s = this.options.size;
return Math.round((((i-1) / s) - Math.floor((i-1) / s)) * s) + 1;
}
});
$jc.extend({
defaults: function(d) {
return $.extend(defaults, d || {});
},
margin: function(e, p) {
if (!e)
return 0;
var el = e.jquery != undefined ? e[0] : e;
if (p == 'marginRight' && $.browser.safari) {
var old = {'display': 'block', 'float': 'none', 'width': 'auto'}, oWidth, oWidth2;
$.swap(el, old, function() { oWidth = el.offsetWidth; });
old['marginRight'] = 0;
$.swap(el, old, function() { oWidth2 = el.offsetWidth; });
return oWidth2 - oWidth;
}
return $jc.intval($.css(el, p));
},
intval: function(v) {
v = parseInt(v);
return isNaN(v) ? 0 : v;
}
});
})(jQuery);
/** * jQuery Lightbox Version 0.5 - 11/29/2007 author Warren Krewenki **/
(function($){
var opts;
$.fn.lightbox = function(options){
opts = $.extend({}, $.fn.lightbox.defaults, options);
$.fn.lightbox.initialize();
return this.each(function(){
$(this).click(function(){
$(this).lightbox.start(this);
return false;
});
});
};
$.fn.lightbox.initialize = function(){
$('#overlay').remove();
$('#lightbox').remove();
opts.inprogress = false;
var outerImage = '<div id="outerImageContainer"><div id="imageContainer"><img id="lightboxImage"><div id="hoverNav"><a href="javascript://" title="' + opts.strings.prevLinkTitle + '" id="prevLink"></a><a href="javascript://" id="nextLink" title="' + opts.strings.nextLinkTitle + '"></a></div><div id="loading"><a href="javascript://" id="loadingLink"><img src="'+opts.fileLoadingImage+'"></a></div></div></div>';
var imageData = '<div id="imageDataContainer" class="clearfix"><div id="imageData"><div id="imageDetails"><span id="caption"></span><span id="numberDisplay"></span></div><div id="bottomNav">'
if (opts.displayHelp)
imageData += '<span id="helpDisplay">' + opts.strings.help + '</span>';
imageData += '<a href="javascript://" id="bottomNavClose" title="' + opts.strings.closeTitle + '"><img src="'+opts.fileBottomNavCloseImage+'"></a></div></div></div>';
var string;
if (opts.navbarOnTop) {
string = '<div id="overlay"></div><div id="lightbox">' + imageData + outerImage + '</div>';
$("body").append(string);
$("#imageDataContainer").addClass('ontop');
} else {
string = '<div id="overlay"></div><div id="lightbox">' + outerImage + imageData + '</div>';
$("body").append(string);
}
$("#overlay").click(function(){ $.fn.lightbox.end(); }).hide();
$("#lightbox").click(function(){ $.fn.lightbox.end();}).hide();
$("#loadingLink").click(function(){ $.fn.lightbox.end(); return false;});
$("#bottomNavClose").click(function(){ $.fn.lightbox.end(); return false; });
$('#outerImageContainer').width(opts.widthCurrent).height(opts.heightCurrent);
$('#imageDataContainer').width(opts.widthCurrent);
};
$.fn.lightbox.getPageSize = function(){
var xScroll, yScroll;
if (window.innerHeight && window.scrollMaxY) {
xScroll = window.innerWidth + window.scrollMaxX;
yScroll = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight){
xScroll = document.body.scrollWidth;
yScroll = document.body.scrollHeight;
} else {
xScroll = document.body.offsetWidth;
yScroll = document.body.offsetHeight;
}
var windowWidth, windowHeight;
if (self.innerHeight) {
if(document.documentElement.clientWidth){
windowWidth = document.documentElement.clientWidth;
} else {
windowWidth = self.innerWidth;
}
windowHeight = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) {
windowWidth = document.documentElement.clientWidth;
windowHeight = document.documentElement.clientHeight;
} else if (document.body) {
windowWidth = document.body.clientWidth;
windowHeight = document.body.clientHeight;
}
if(yScroll < windowHeight){
pageHeight = windowHeight;
} else {
pageHeight = yScroll;
}
if(xScroll < windowWidth){
pageWidth = xScroll;
} else {
pageWidth = windowWidth;
}
var arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);
return arrayPageSize;
};
$.fn.lightbox.getPageScroll = function(){
var xScroll, yScroll;
if (self.pageYOffset) {
yScroll = self.pageYOffset;
xScroll = self.pageXOffset;
} else if (document.documentElement && document.documentElement.scrollTop){
yScroll = document.documentElement.scrollTop;
xScroll = document.documentElement.scrollLeft;
} else if (document.body) {
yScroll = document.body.scrollTop;
xScroll = document.body.scrollLeft;
}
var arrayPageScroll = new Array(xScroll,yScroll);
return arrayPageScroll;
};
$.fn.lightbox.pause = function(ms){
var date = new Date();
var curDate = null;
do{curDate = new Date();}
while( curDate - date < ms);
};
$.fn.lightbox.start = function(imageLink){
$("select, embed, object").hide();
var arrayPageSize = $.fn.lightbox.getPageSize();
$("#overlay").hide().css({width: '100%', height: arrayPageSize[1]+'px', opacity : opts.overlayOpacity}).fadeIn();
opts.imageArray = [];
imageNum = 0;
var anchors = document.getElementsByTagName( imageLink.tagName);
if(!imageLink.rel || (imageLink.rel == '')){
opts.imageArray.push(new Array(imageLink.href, opts.displayTitle ? imageLink.title : ''));
} else {
$("a").each(function(){
if(this.href && (this.rel == imageLink.rel)){
opts.imageArray.push(new Array(this.href, opts.displayTitle ? this.title : ''));
}
})
for(i = 0; i < opts.imageArray.length; i++){
for(j = opts.imageArray.length-1; j>i; j--){
if(opts.imageArray[i][0] == opts.imageArray[j][0]){
opts.imageArray.splice(j,1);
}
}
}
while(opts.imageArray[imageNum][0] != imageLink.href) { imageNum++;}
}
var arrayPageScroll = $.fn.lightbox.getPageScroll();
var lightboxTop = arrayPageScroll[1] + (arrayPageSize[3] / 10);
var lightboxLeft = arrayPageScroll[0];
$('#lightbox').css({top: lightboxTop+'px', left: lightboxLeft+'px'}).show();
if (!opts.slideNavBar)
$('#imageData').hide();
$.fn.lightbox.changeImage(imageNum);
};
$.fn.lightbox.changeImage = function(imageNum){
if(opts.inprogress == false){
opts.inprogress = true;
opts.activeImage = imageNum;
$('#loading').show();
$('#lightboxImage').hide();
$('#hoverNav').hide();
$('#prevLink').hide();
$('#nextLink').hide();
if (opts.slideNavBar) {;
$('#imageDataContainer').hide();
$('#imageData').hide();
$.fn.doChangeImage();
} else {
$.fn.doChangeImage();
}
}
};
$.fn.doChangeImage = function(){
imgPreloader = new Image();
imgPreloader.onload=function(){
var newWidth = imgPreloader.width;
var newHeight = imgPreloader.height;
if (opts.fitToScreen) {
var arrayPageSize = $.fn.lightbox.getPageSize();
var ratio;
var initialPageWidth = arrayPageSize[2] - 2 * opts.borderSize;
var initialPageHeight = arrayPageSize[3] - 200;
if (imgPreloader.height > initialPageHeight)
{
newWidth = parseInt((initialPageHeight/imgPreloader.height) * imgPreloader.width);
newHeight = initialPageHeight;
}
else if (imgPreloader.width > initialPageWidth)
{
newHeight = parseInt((initialPageWidth/imgPreloader.width) * imgPreloader.height);
newWidth = initialPageWidth;
}
}
$('#lightboxImage').attr('src', opts.imageArray[opts.activeImage][0])
.width(newWidth).height(newHeight);
$.fn.lightbox.resizeImageContainer(newWidth, newHeight);
}
imgPreloader.src = opts.imageArray[opts.activeImage][0];
}
$.fn.lightbox.end = function(){
$.fn.lightbox.disableKeyboardNav();
$('#lightbox').hide();
$('#overlay').fadeOut();
$('select, object, embed').show();
};
$.fn.lightbox.preloadNeighborImages = function(){
if((opts.imageArray.length - 1) > opts.activeImage){
preloadNextImage = new Image();
preloadNextImage.src = opts.imageArray[opts.activeImage + 1][0];
}
if(opts.activeImage > 0){
preloadPrevImage = new Image();
preloadPrevImage.src = opts.imageArray[opts.activeImage - 1][0];
}
};
$.fn.lightbox.keyboardAction = function(e){
if (e == null) {
var keycode = event.keyCode;
var escapeKey = 27;
} else {
var keycode = e.keyCode;
var escapeKey = e.DOM_VK_ESCAPE;
}
var key = String.fromCharCode(keycode).toLowerCase();
if((key == 'x') || (key == 'o') || (key == 'c') || (keycode == escapeKey)){
$.fn.lightbox.end();
} else if((key == 'p') || (keycode == 37)){
if(opts.activeImage != 0){
$.fn.lightbox.disableKeyboardNav();
$.fn.lightbox.changeImage(opts.activeImage - 1);
}
} else if((key == 'n') || (keycode == 39)){
if(opts.activeImage != (opts.imageArray.length - 1)){
$.fn.lightbox.disableKeyboardNav();
$.fn.lightbox.changeImage(opts.activeImage + 1);
}
}
};
$.fn.lightbox.resizeImageContainer = function(imgWidth, imgHeight){
opts.widthCurrent = document.getElementById('outerImageContainer').offsetWidth;
opts.heightCurrent = document.getElementById('outerImageContainer').offsetHeight;
var widthNew = (imgWidth + (opts.borderSize * 2));
var heightNew = (imgHeight + (opts.borderSize * 2));
opts.xScale = ( widthNew / opts.widthCurrent) * 100;
opts.yScale = ( heightNew / opts.heightCurrent) * 100;
wDiff = opts.widthCurrent - widthNew;
hDiff = opts.heightCurrent - heightNew;
$('#imageDataContainer').animate({width: widthNew},opts.resizeSpeed,'linear');
$('#outerImageContainer').animate({width: widthNew},opts.resizeSpeed,'linear',function(){
$('#outerImageContainer').animate({height: heightNew},opts.resizeSpeed,'linear',function(){
$.fn.lightbox.showImage();
});
});
if((hDiff == 0) && (wDiff == 0)){
if (jQuery.browser.msie){ $.fn.lightbox.pause(250); } else { $.fn.lightbox.pause(100);}
}
$('#prevLink').height(imgHeight);
$('#nextLink').height(imgHeight);
};
$.fn.lightbox.showImage = function(){
$('#loading').hide();
$('#lightboxImage').fadeIn("fast");
$.fn.lightbox.updateDetails();
$.fn.lightbox.preloadNeighborImages();
opts.inprogress = false;
};
$.fn.lightbox.updateDetails = function(){
if(opts.imageArray[opts.activeImage][1]){
$('#caption').html(opts.imageArray[opts.activeImage][1]).show();
}
if(opts.imageArray.length > 1){
var nav_html;
nav_html = opts.strings.image + (opts.activeImage + 1) + opts.strings.of + opts.imageArray.length;
if ((opts.activeImage) > 0) {
nav_html = '<a title="' + opts.strings.prevLinkTitle + '" href="#" id="prevLinkText">' + opts.strings.prevLinkText + "</a>" + nav_html;
}
if ((opts.activeImage + 1) < opts.imageArray.length) {
nav_html += '<a title="' + opts.strings.nextLinkTitle + '" href="#" id="nextLinkText">' + opts.strings.nextLinkText + "</a>";
}
$('#numberDisplay').html(nav_html).show();
}
if (opts.slideNavBar) {
$("#imageData").slideDown(opts.navBarSlideSpeed);
} else {
$("#imageData").show();
}
var arrayPageSize = $.fn.lightbox.getPageSize();
$('#overlay').height(arrayPageSize[1]);
$.fn.lightbox.updateNav();
};
$.fn.lightbox.updateNav = function(){
$('#hoverNav').show();
if(opts.activeImage != 0){
$('#prevLink,#prevLinkText').show().click(function(){
$.fn.lightbox.changeImage(opts.activeImage - 1); return false;
});
}
if(opts.activeImage != (opts.imageArray.length - 1)){
$('#nextLink,#nextLinkText').show().click(function(){
$.fn.lightbox.changeImage(opts.activeImage +1); return false;
});
}
$.fn.lightbox.enableKeyboardNav();
};
$.fn.lightbox.enableKeyboardNav = function(){
document.onkeydown = $.fn.lightbox.keyboardAction;
};
$.fn.lightbox.disableKeyboardNav = function(){
document.onkeydown = '';
};
$.fn.lightbox.defaults = {
fileLoadingImage : '../../gallery/js/lightbox/images/loading-bar-black.gif',
fileBottomNavCloseImage : '../../gallery/js/lightbox/images/delete.png',
overlayOpacity : 0.8,
borderSize : 10,
imageArray : new Array,
activeImage : null,
inprogress : false,
resizeSpeed : 350,
widthCurrent: 350,
heightCurrent: 350,
xScale : 1,
yScale : 1,
displayTitle: true,
navbarOnTop: true,
slideNavBar: false,
navBarSlideSpeed: 350,
displayHelp: false,
strings : {
prevLinkTitle: 'previous image',
nextLinkTitle: 'next image',
prevLinkText: '&laquo; Previous',
nextLinkText: 'Next &raquo;',
closeTitle: 'Close',
image: 'Image ',
of: ' of '
},
fitToScreen: true
};
})(jQuery);
/**
*ajaxContent - jQuery plugin for accessible, unobtrusive and easy ajax behaviour.
* @Version 2.1 Beta
* @requires jQuery v 1.2+
* http://www.andreacfm.com/index.cfm/jquery-plugins
* Copyright (c) 2007 Andrea Campolonghi (andreacfm.com)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
(function($) {
$.fn.ajaxContent = function(options) {
var defaults = $.extend({}, $.fn.ajaxContent.defaults, options);
if(defaults.debug == 'true'){
debug(this);
};
return this.each(function(){
var $obj = $(this);
var href = $obj.attr('href');
var o = $.metadata ? $.extend({}, defaults, $obj.metadata()) : defaults;
if(o.bind != ''){
var binds = o.bind.split(',');
for(var i=0; i < binds.length ; i++){
var queryString = setQueryString(binds);
var url = href + queryString;
$obj.attr({href:url});
if ($(binds[i]).attr('type') == "radio" || $(binds[i]).attr('type') == "checkbox"){
$('input[name=' + $(binds[i]).attr("name") + ']').change(function(){
var queryString = setQueryString(binds);
var url = href + queryString;
$obj.attr({href:url});
});
}else{
$(binds[i]).change(function(){
var queryString = setQueryString(binds);
var url = href + queryString;
$obj.attr({href:url});
});
}
}
}
var $target = $(o.target);
$obj.bind(o.event, function(ev){
if(o.loader == 'true'){
if(o.loaderType == 'img'){
$target.html('<img src="' + o.loadingMsg + '"/>');
}else{
$target.html(o.loadingMsg);
}
}
$('a.' + o.currentClass).removeClass(o.currentClass);
$obj.addClass(o.currentClass);
$.ajax({
type: o.type,
url: $obj.attr('href'),
cache:'false',
beforeSend:function(){
if(typeof o.beforeSend == 'function'){
o.beforeSend($obj,$target,ev);
}
},
success: function(msg){
$target.html(msg);
if(o.extend == 'true'){
$(o.filter,$target).ajaxContent({
target:o.ex_target,
type:o.ex_type,
event:o.ex_event,
loader:o.ex_loader,
loaderType:o.ex_loaderType,
loadingMsg:o.ex_loadingMsg,
errorMsg:o.ex_errorMsg,
currentClass:o.ex_currentClass,
success:o.ex_success,
beforeSend:o.ex_beforeSend,
error:o.ex_error,
bind:o.ex_bind
});
}
if(typeof o.success == 'function'){
o.success($obj,$target,msg);
}
},
error: function(){
$target.html("<p>" + o.errorMsg + "</p>");
if(typeof o.error == 'function'){
o.error($target);
}
}
});
return false;
});
});
};
function debug($obj) {
if (window.console && window.console.log)
window.console.log('selection count: ' + $obj.size() + ' with class:' + $obj.attr('class'));
};
function setQueryString(binds){
var queryString = '?';
for(var i=0; i < binds.length; i++){
if ($(binds[i]).attr('type') == "radio"){
queryString += $('input[name=' + $(binds[i]).attr("name") + ']').fieldSerialize();
}else if($(binds[i]).attr('type') == "checkbox"){
queryString += $(binds[i]).attr("name") + '=' + $('input[name=' + $(binds[i]).attr("name") + ']').fieldValue();
}
else{
queryString += $(binds[i]).fieldSerialize();
}
if(i != binds.length - 1){
queryString += '&';
}
}
return queryString;
};
})(jQuery);
$.fn.ajaxContent.defaults = {
target: '#ajaxContent',
type:'get',
event:'click',
loader:'true',
loaderType:'text',
loadingMsg:'Loading...',
errorMsg:'An error occured durign the page requesting process!',
currentClass:'selected',
success:'',
beforeSend:'',
error:'',
bind:'',
debug:'false',
extend:'false',
filter:'',
ex_target:'',
ex_type:'get',
ex_event:'click',
ex_loader:'true',
ex_loaderType:'text',
ex_loadingMsg:'Loading...',
ex_errorMsg:'An error occured durign the page requesting process!',
ex_currentClass:'selected',
ex_success:'',
ex_beforeSend:'',
ex_error:'',
ex_bind:''
};
/*
originally written by paul sowden <paul@idontsmoke.co.uk> | http:
modified and localized by alexander shurkayev <alshur@narod.ru> | http:
*/
window.onerror = null;
tooltip = {
/* settings */
attr_name: "tooltip",
blank_text: "new window",
newline_entity: "",
max_width: 200,
delay: 500,
/* end settings */
t: document.createElement("DIV"),
c: null,
g: false,
m: function(e){
if (tooltip.g){
oCanvas = document.getElementsByTagName(
(document.compatMode && document.compatMode == "CSS1Compat") ? "HTML" : "BODY"
)[0];
x = window.event ? event.clientX + oCanvas.scrollLeft : e.pageX;
y = window.event ? event.clientY + oCanvas.scrollTop : e.pageY;
tooltip.a(x, y);
}
},
d: function(){
tooltip.t.setAttribute("id", "tooltip");
document.body.appendChild(tooltip.t);
a = document.all && !window.opera ? document.all : document.getElementsByTagName("*");
aLength = a.length;
for (var i = 0; i < aLength; i++){
if (!a[i]) continue;
tooltip_title = a[i].getAttribute("title");
if (tooltip_title && typeof tooltip_title != "string") tooltip_title = "";
tooltip_alt = a[i].getAttribute("alt");
tooltip_blank = a[i].getAttribute("target") && a[i].getAttribute("target") == "_blank" && tooltip.blank_text;
if (tooltip_title || tooltip_blank){
a[i].setAttribute(tooltip.attr_name, tooltip_blank ? (tooltip_title ? tooltip_title + " " + tooltip.blank_text : tooltip.blank_text) : tooltip_title);
if (a[i].getAttribute(tooltip.attr_name)){
a[i].removeAttribute("title");
if (tooltip_alt && a[i].complete) a[i].removeAttribute("alt");
tooltip.l(a[i], "mouseover", tooltip.s);
tooltip.l(a[i], "mouseout", tooltip.h);
}
}else if (tooltip_alt && a[i].complete){
a[i].setAttribute(tooltip.attr_name, tooltip_alt);
if (a[i].getAttribute(tooltip.attr_name)){
a[i].removeAttribute("alt");
tooltip.l(a[i], "mouseover", tooltip.s);
tooltip.l(a[i], "mouseout", tooltip.h);
}
}
if (!a[i].getAttribute(tooltip.attr_name) && tooltip_blank){
}
}
document.onmousemove = tooltip.m;
window.onscroll = tooltip.h;
tooltip.a(-99, -99);
},
s: function(e){
d = window.event ? window.event.srcElement : e.target;
if (!d.getAttribute(tooltip.attr_name)) return;
s = d.getAttribute(tooltip.attr_name);
if (tooltip.newline_entity){
s = s.replace(/\&/g,"&amp;");
s = s.replace(/\</g,"&lt;");
s = s.replace(/\>/g,"&gt;");
s = s.replace(eval("/" + tooltip.newline_entity + "/g"), "<br />");
tooltip.t.innerHTML = s;
}else{
if (tooltip.t.firstChild) tooltip.t.removeChild(tooltip.t.firstChild);
tooltip.t.appendChild(document.createTextNode(s));
}
tooltip.c = setTimeout("tooltip.t.style.visibility = 'visible';", tooltip.delay);
tooltip.g = true;
},
h: function(e){
tooltip.t.style.visibility = "hidden";
if (!tooltip.newline_entity && tooltip.t.firstChild) tooltip.t.removeChild(tooltip.t.firstChild);
clearTimeout(tooltip.c);
tooltip.g = false;
tooltip.a(-99, -99);
},
l: function(o, e, a){
if (o.addEventListener) o.addEventListener(e, a, false);
else if (o.attachEvent) o.attachEvent("on" + e, a);
else return null;
},
a: function(x, y){
oCanvas = document.getElementsByTagName(
(document.compatMode && document.compatMode == "CSS1Compat") ? "HTML" : "BODY"
)[0];
w_width = oCanvas.clientWidth ? oCanvas.clientWidth + oCanvas.scrollLeft : window.innerWidth + window.pageXOffset;
w_height = window.innerHeight ? window.innerHeight + window.pageYOffset : oCanvas.clientHeight + oCanvas.scrollTop;
tooltip.t.style.width = ((tooltip.max_width) && (tooltip.t.offsetWidth > tooltip.max_width)) ? tooltip.max_width + "px" : "auto";
t_width = tooltip.t.offsetWidth;
t_height = tooltip.t.offsetHeight;
tooltip.t.style.left = x + 8 + "px";
tooltip.t.style.top = y + 8 + "px";
if (x + t_width > w_width) tooltip.t.style.left = w_width - t_width + "px";
if (y + t_height > w_height) tooltip.t.style.top = w_height - t_height + "px";
}
}
var root = window.addEventListener || window.attachEvent ? window : document.addEventListener ? document : null;
if (root){
if (root.addEventListener) root.addEventListener("load", tooltip.d, false);
else if (root.attachEvent) root.attachEvent("onload", tooltip.d);
}
sfHover = function() {
var sfEls = document.getElementById("dropdown").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
	this.className+=" sfhover";
}
sfEls[i].onmouseout=function() {
	this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);