/*** 1. ***/
/* hoverIntent by Brian Cherne */

/*** 2. ***/
/*
 * Superfish v1.4.8 - jQuery menu widget
 * Copyright (c) 2008 Joel Birch
 *
 * Dual licensed under the MIT and GPL licenses:
 * 	http://www.opensource.org/licenses/mit-license.php
 * 	http://www.gnu.org/licenses/gpl.html
 *
 * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
 */

/*** 3. ***/
/*
 * jCarousel - Riding carousels with jQuery
 *   http://sorgalla.com/jcarousel/
 *
 * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * Built on top of the jQuery library
 *   http://jquery.com
 *
 * Inspired by the "Carousel Component" by Bill Scott
 *   http://billwscott.com/carousel/
 */

(function(b){b.fn.hoverIntent=function(o,p){var g={sensitivity:7,interval:100,timeout:0};g=b.extend(g,p?{over:o,out:p}:o);var a,f,r,t;var s=function(c){a=c.pageX;f=c.pageY};var u=function(c,d){d.hoverIntent_t=clearTimeout(d.hoverIntent_t);if((Math.abs(r-a)+Math.abs(t-f))<g.sensitivity){b(d).unbind("mousemove",s);d.hoverIntent_s=1;return g.over.apply(d,[c])}else{r=a;t=f;d.hoverIntent_t=setTimeout(function(){u(c,d)},g.interval)}};var q=function(c,d){d.hoverIntent_t=clearTimeout(d.hoverIntent_t);d.hoverIntent_s=0;return g.out.apply(d,[c])};var v=function(e){var h=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(h&&h!=this){try{h=h.parentNode}catch(e){h=this}}if(h==this){return false}var c=jQuery.extend({},e);var d=this;if(d.hoverIntent_t){d.hoverIntent_t=clearTimeout(d.hoverIntent_t)}if(e.type=="mouseover"){r=c.pageX;t=c.pageY;b(d).bind("mousemove",s);if(d.hoverIntent_s!=1){d.hoverIntent_t=setTimeout(function(){u(c,d)},g.interval)}}else{b(d).unbind("mousemove",s);if(d.hoverIntent_s==1){d.hoverIntent_t=setTimeout(function(){q(c,d)},g.timeout)}}};return this.mouseover(v).mouseout(v)}})(jQuery);(function(c){c.fn.superfish=function(a){var n=c.fn.superfish,b=n.c,o=c(['<span class="',b.arrowClass,'"> &#187;</span>'].join("")),l=function(){var f=c(this),e=q(f);clearTimeout(e.sfTimer);f.showSuperfishUl().siblings().hideSuperfishUl()},p=function(){var g=c(this),e=q(g),f=n.op;clearTimeout(e.sfTimer);e.sfTimer=setTimeout(function(){f.retainPath=(c.inArray(g[0],f.$path)>-1);g.hideSuperfishUl();if(f.$path.length&&g.parents(["li.",f.hoverClass].join("")).length<1){l.call(f.$path)}},f.delay)},q=function(f){var e=f.parents(["ul.",b.menuClass,":first"].join(""))[0];n.op=n.o[e.serial];return e},m=function(e){e.addClass(b.anchorClass).append(o.clone())};return this.each(function(){var g=this.serial=n.o.length;var e=c.extend({},n.defaults,a);e.$path=c("li."+e.pathClass,this).slice(0,e.pathLevels).each(function(){c(this).addClass([e.hoverClass,b.bcClass].join(" ")).filter("li:has(ul)").removeClass(e.pathClass)});n.o[g]=n.op=e;c("li:has(ul)",this)[(c.fn.hoverIntent&&!e.disableHI)?"hoverIntent":"hover"](l,p).each(function(){if(e.autoArrows){m(c(">a:first-child",this))}}).not("."+b.bcClass).hideSuperfishUl();var f=c("a",this);f.each(function(i){var h=f.eq(i).parents("li");f.eq(i).focus(function(){l.call(h)}).blur(function(){p.call(h)})});e.onInit.call(this)}).each(function(){var e=[b.menuClass];if(n.op.dropShadows&&!(c.browser.msie&&c.browser.version<7)){e.push(b.shadowClass)}c(this).addClass(e.join(" "))})};var d=c.fn.superfish;d.o=[];d.op={};d.IE7fix=function(){var a=d.op;if(c.browser.msie&&c.browser.version>6&&a.dropShadows&&a.animation.opacity!=undefined){this.toggleClass(d.c.shadowClass+"-off")}};d.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator",shadowClass:"sf-shadow"};d.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},speed:"normal",autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};c.fn.extend({hideSuperfishUl:function(){var a=d.op,b=(a.retainPath===true)?a.$path:"";a.retainPath=false;var f=c(["li.",a.hoverClass].join(""),this).add(this).not(b).removeClass(a.hoverClass).find(">ul").hide().css("visibility","hidden");a.onHide.call(f);return this},showSuperfishUl:function(){var a=d.op,b=d.c.shadowClass+"-off",f=this.addClass(a.hoverClass).find(">ul:hidden").css("visibility","visible");d.IE7fix.call(f);a.onBeforeShow.call(f);f.animate(a.animation,a.speed,function(){d.IE7fix.call(f);a.onShow.call(f)});return this}})})(jQuery);(function(f){var g={vertical:false,rtl: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,itemFallbackDimension:null},h=false;f(window).bind("load.jcarousel",function(){h=true});f.jcarousel=function(a,c){this.options=f.extend({},g,c||{});this.autoStopped=this.locked=false;this.buttonPrevState=this.buttonNextState=this.buttonPrev=this.buttonNext=this.list=this.clip=this.container=null;if(!c||c.rtl===undefined){this.options.rtl=(f(a).attr("dir")||f("html").attr("dir")||"").toLowerCase()=="rtl"}this.wh=!this.options.vertical?"width":"height";this.lt=!this.options.vertical?this.options.rtl?"right":"left":"top";for(var b="",d=a.className.split(" "),k=0;k<d.length;k++){if(d[k].indexOf("jcarousel-skin")!=-1){f(a).removeClass(d[k]);b=d[k];break}}if(a.nodeName.toUpperCase()=="UL"||a.nodeName.toUpperCase()=="OL"){this.list=f(a);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=f(a);this.list=this.container.find("ul,ol").eq(0)}b!==""&&this.container.parent()[0].className.indexOf("jcarousel-skin")==-1&&this.container.wrap('<div class=" '+b+'"></div>');this.clip=this.list.parent();if(!this.clip.length||!this.clip.hasClass("jcarousel-clip")){this.clip=this.list.wrap("<div></div>").parent()}this.buttonNext=f(".jcarousel-next",this.container);if(this.buttonNext.size()===0&&this.options.buttonNextHTML!==null){this.buttonNext=this.clip.after(this.options.buttonNextHTML).next()}this.buttonNext.addClass(this.className("jcarousel-next"));this.buttonPrev=f(".jcarousel-prev",this.container);if(this.buttonPrev.size()===0&&this.options.buttonPrevHTML!==null){this.buttonPrev=this.clip.after(this.options.buttonPrevHTML).next()}this.buttonPrev.addClass(this.className("jcarousel-prev"));this.clip.addClass(this.className("jcarousel-clip")).css({overflow:"hidden",position:"relative"});this.list.addClass(this.className("jcarousel-list")).css({overflow:"hidden",position:"relative",top:0,margin:0,padding:0}).css(this.options.rtl?"right":"left",0);this.container.addClass(this.className("jcarousel-container")).css({position:"relative"});!this.options.vertical&&this.options.rtl&&this.container.addClass("jcarousel-direction-rtl").attr("dir","rtl");var t=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null;b=this.list.children("li");var j=this;if(b.size()>0){var s=0,u=this.options.offset;b.each(function(){j.format(this,u++);s+=j.dimension(this,t)});this.list.css(this.wh,s+100+"px");if(!c||c.size===undefined){this.options.size=b.size()}}this.container.css("display","block");this.buttonNext.css("display","block");this.buttonPrev.css("display","block");this.funcNext=function(){j.next()};this.funcPrev=function(){j.prev()};this.funcResize=function(){j.reload()};this.options.initCallback!==null&&this.options.initCallback(this,"init");if(!h&&f.browser.safari){this.buttons(false,false);f(window).bind("load.jcarousel",function(){j.setup()})}else{this.setup()}};var e=f.jcarousel;e.fn=e.prototype={jcarousel:"0.2.7"};e.fn.extend=e.extend=f.extend;e.fn.extend({setup:function(){this.prevLast=this.prevFirst=this.last=this.first=null;this.animating=false;this.tail=this.timer=null;this.inTail=false;if(!this.locked){this.list.css(this.lt,this.pos(this.options.offset)+"px");var a=this.pos(this.options.start,true);this.prevFirst=this.prevLast=null;this.animate(a,false);f(window).unbind("resize.jcarousel",this.funcResize).bind("resize.jcarousel",this.funcResize)}},reset:function(){this.list.empty();this.list.css(this.lt,"0px");this.list.css(this.wh,"10px");this.options.initCallback!==null&&this.options.initCallback(this,"reset");this.setup()},reload:function(){this.tail!==null&&this.inTail&&this.list.css(this.lt,e.intval(this.list.css(this.lt))+this.tail);this.tail=null;this.inTail=false;this.options.reloadCallback!==null&&this.options.reloadCallback(this);if(this.options.visible!==null){var c=this,a=Math.ceil(this.clipping()/this.options.visible),d=0,b=0;this.list.children("li").each(function(j){d+=c.dimension(this,a);if(j+1<c.first){b=d}});this.list.css(this.wh,d+"px");this.list.css(this.lt,-b+"px")}this.scroll(this.first,false)},lock:function(){this.locked=true;this.buttons()},unlock:function(){this.locked=false;this.buttons()},size:function(a){if(a!==undefined){this.options.size=a;this.locked||this.buttons()}return this.options.size},has:function(c,a){if(a===undefined||!a){a=c}if(this.options.size!==null&&a>this.options.size){a=this.options.size}for(var d=c;d<=a;d++){var b=this.get(d);if(!b.length||b.hasClass("jcarousel-item-placeholder")){return false}}return true},get:function(a){return f(".jcarousel-item-"+a,this.list)},add:function(j,p){var o=this.get(j),a=0,c=f(p);if(o.length===0){var d,b=e.intval(j);for(o=this.create(j);;){d=this.get(--b);if(b<=0||d.length){b<=0?this.list.prepend(o):d.after(o);break}}}else{a=this.dimension(o)}if(c.get(0).nodeName.toUpperCase()=="LI"){o.replaceWith(c);o=c}else{o.empty().append(p)}this.format(o.removeClass(this.className("jcarousel-item-placeholder")),j);c=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null;a=this.dimension(o,c)-a;j>0&&j<this.first&&this.list.css(this.lt,e.intval(this.list.css(this.lt))-a+"px");this.list.css(this.wh,e.intval(this.list.css(this.wh))+a+"px");return o},remove:function(b){var a=this.get(b);if(!(!a.length||b>=this.first&&b<=this.last)){var c=this.dimension(a);b<this.first&&this.list.css(this.lt,e.intval(this.list.css(this.lt))+c+"px");a.remove();this.list.css(this.wh,e.intval(this.list.css(this.wh))-c+"px")}},next:function(){this.tail!==null&&!this.inTail?this.scrollTail(false):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.tail!==null&&this.inTail?this.scrollTail(true):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)){this.pauseAuto();var a=e.intval(this.list.css(this.lt));a=!b?a-this.tail:a+this.tail;this.inTail=!b;this.prevFirst=this.first;this.prevLast=this.last;this.animate(a)}},scroll:function(b,a){if(!(this.locked||this.animating)){this.pauseAuto();this.animate(this.pos(b),a)}},pos:function(c,l){var d=e.intval(this.list.css(this.lt));if(this.locked||this.animating){return d}if(this.options.wrap!="circular"){c=c<1?1:this.options.size&&c>this.options.size?this.options.size:c}for(var m=this.first>c,o=this.options.wrap!="circular"&&this.first<=1?1:this.first,C=m?this.get(o):this.get(this.last),n=m?o:o-1,p=null,D=0,E=false,a=0;m?--n>=c:++n<c;){p=this.get(n);E=!p.length;if(p.length===0){p=this.create(n).addClass(this.className("jcarousel-item-placeholder"));C[m?"before":"after"](p);if(this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(n<=0||n>this.options.size)){C=this.get(this.index(n));if(C.length){p=this.add(n,C.clone(true))}}}C=p;a=this.dimension(p);if(E){D+=a}if(this.first!==null&&(this.options.wrap=="circular"||n>=1&&(this.options.size===null||n<=this.options.size))){d=m?d+a:d-a}}o=this.clipping();var k=[],j=0,b=0;C=this.get(c-1);for(n=c;++j;){p=this.get(n);E=!p.length;if(p.length===0){p=this.create(n).addClass(this.className("jcarousel-item-placeholder"));C.length===0?this.list.prepend(p):C[m?"before":"after"](p);if(this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(n<=0||n>this.options.size)){C=this.get(this.index(n));if(C.length){p=this.add(n,C.clone(true))}}}C=p;a=this.dimension(p);if(a===0){throw Error("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...")}if(this.options.wrap!="circular"&&this.options.size!==null&&n>this.options.size){k.push(p)}else{if(E){D+=a}}b+=a;if(b>=o){break}n++}for(p=0;p<k.length;p++){k[p].remove()}if(D>0){this.list.css(this.wh,this.dimension(this.list)+D+"px");if(m){d-=D;this.list.css(this.lt,e.intval(this.list.css(this.lt))-D+"px")}}D=c+j-1;if(this.options.wrap!="circular"&&this.options.size&&D>this.options.size){D=this.options.size}if(n>D){j=0;n=D;for(b=0;++j;){p=this.get(n--);if(!p.length){break}b+=this.dimension(p);if(b>=o){break}}}n=D-j+1;if(this.options.wrap!="circular"&&n<1){n=1}if(this.inTail&&m){d+=this.tail;this.inTail=false}this.tail=null;if(this.options.wrap!="circular"&&D==this.options.size&&D-j+1>=1){m=e.margin(this.get(D),!this.options.vertical?"marginRight":"marginBottom");if(b-m>o){this.tail=b-o-m}}if(l&&c===this.options.size&&this.tail){d-=this.tail;this.inTail=true}for(;c-->n;){d+=this.dimension(this.get(c))}this.prevFirst=this.first;this.prevLast=this.last;this.first=n;this.last=D;return d},animate:function(c,a){if(!(this.locked||this.animating)){this.animating=true;var d=this,b=function(){d.animating=false;c===0&&d.list.css(d.lt,0);if(!d.autoStopped&&(d.options.wrap=="circular"||d.options.wrap=="both"||d.options.wrap=="last"||d.options.size===null||d.last<d.options.size||d.last==d.options.size&&d.tail!==null&&!d.inTail)){d.startAuto()}d.buttons();d.notify("onAfterAnimation");if(d.options.wrap=="circular"&&d.options.size!==null){for(var j=d.prevFirst;j<=d.prevLast;j++){if(j!==null&&!(j>=d.first&&j<=d.last)&&(j<1||j>d.options.size)){d.remove(j)}}}};this.notify("onBeforeAnimation");if(!this.options.animation||a===false){this.list.css(this.lt,c+"px");b()}else{this.list.animate(!this.options.vertical?this.options.rtl?{right:c}:{left:c}:{top:c},this.options.animation,this.options.easing,b)}}},startAuto:function(b){if(b!==undefined){this.options.auto=b}if(this.options.auto===0){return this.stopAuto()}if(this.timer===null){this.autoStopped=false;var a=this;this.timer=window.setTimeout(function(){a.next()},this.options.auto*1000)}},stopAuto:function(){this.pauseAuto();this.autoStopped=true},pauseAuto:function(){if(this.timer!==null){window.clearTimeout(this.timer);this.timer=null}},buttons:function(b,a){if(b==null){b=!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){b=this.tail!==null&&!this.inTail}}if(a==null){a=!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){a=this.tail!==null&&this.inTail}}var c=this;if(this.buttonNext.size()>0){this.buttonNext.unbind(this.options.buttonNextEvent+".jcarousel",this.funcNext);b&&this.buttonNext.bind(this.options.buttonNextEvent+".jcarousel",this.funcNext);this.buttonNext[b?"removeClass":"addClass"](this.className("jcarousel-next-disabled")).attr("disabled",b?false:true);this.options.buttonNextCallback!==null&&this.buttonNext.data("jcarouselstate")!=b&&this.buttonNext.each(function(){c.options.buttonNextCallback(c,this,b)}).data("jcarouselstate",b)}else{this.options.buttonNextCallback!==null&&this.buttonNextState!=b&&this.options.buttonNextCallback(c,null,b)}if(this.buttonPrev.size()>0){this.buttonPrev.unbind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev);a&&this.buttonPrev.bind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev);this.buttonPrev[a?"removeClass":"addClass"](this.className("jcarousel-prev-disabled")).attr("disabled",a?false:true);this.options.buttonPrevCallback!==null&&this.buttonPrev.data("jcarouselstate")!=a&&this.buttonPrev.each(function(){c.options.buttonPrevCallback(c,this,a)}).data("jcarouselstate",a)}else{this.options.buttonPrevCallback!==null&&this.buttonPrevState!=a&&this.options.buttonPrevCallback(c,null,a)}this.buttonNextState=b;this.buttonPrevState=a},notify:function(b){var a=this.prevFirst===null?"init":this.prevFirst<this.first?"next":"prev";this.callback("itemLoadCallback",b,a);if(this.prevFirst!==this.first){this.callback("itemFirstInCallback",b,a,this.first);this.callback("itemFirstOutCallback",b,a,this.prevFirst)}if(this.prevLast!==this.last){this.callback("itemLastInCallback",b,a,this.last);this.callback("itemLastOutCallback",b,a,this.prevLast)}this.callback("itemVisibleInCallback",b,a,this.first,this.last,this.prevFirst,this.prevLast);this.callback("itemVisibleOutCallback",b,a,this.prevFirst,this.prevLast,this.first,this.last)},callback:function(v,a,w,b,d,k,c){if(!(this.options[v]==null||typeof this.options[v]!="object"&&a!="onAfterAnimation")){var j=typeof this.options[v]=="object"?this.options[v][a]:this.options[v];if(f.isFunction(j)){var l=this;if(b===undefined){j(l,w,a)}else{if(d===undefined){this.get(b).each(function(){j(l,this,b,w,a)})}else{v=function(i){l.get(i).each(function(){j(l,this,i,w,a)})};for(var u=b;u<=d;u++){u!==null&&!(u>=k&&u<=c)&&v(u)}}}}}},create:function(a){return this.format("<li></li>",a)},format:function(c,a){c=f(c);for(var d=c.get(0).className.split(" "),b=0;b<d.length;b++){d[b].indexOf("jcarousel-")!=-1&&c.removeClass(d[b])}c.addClass(this.className("jcarousel-item")).addClass(this.className("jcarousel-item-"+a)).css({"float":this.options.rtl?"right":"left","list-style":"none"}).attr("jcarouselindex",a);return c},className:function(a){return a+" "+a+(!this.options.vertical?"-horizontal":"-vertical")},dimension:function(c,a){var d=c.jquery!==undefined?c[0]:c,b=!this.options.vertical?(d.offsetWidth||e.intval(this.options.itemFallbackDimension))+e.margin(d,"marginLeft")+e.margin(d,"marginRight"):(d.offsetHeight||e.intval(this.options.itemFallbackDimension))+e.margin(d,"marginTop")+e.margin(d,"marginBottom");if(a==null||b==a){return b}b=!this.options.vertical?a-e.margin(d,"marginLeft")-e.margin(d,"marginRight"):a-e.margin(d,"marginTop")-e.margin(d,"marginBottom");f(d).css(this.wh,b+"px");return this.dimension(d)},clipping:function(){return !this.options.vertical?this.clip[0].offsetWidth-e.intval(this.clip.css("borderLeftWidth"))-e.intval(this.clip.css("borderRightWidth")):this.clip[0].offsetHeight-e.intval(this.clip.css("borderTopWidth"))-e.intval(this.clip.css("borderBottomWidth"))},index:function(b,a){if(a==null){a=this.options.size}return Math.round(((b-1)/a-Math.floor((b-1)/a))*a)+1}});e.extend({defaults:function(a){return f.extend(g,a||{})},margin:function(j,a){if(!j){return 0}var m=j.jquery!==undefined?j[0]:j;if(a=="marginRight"&&f.browser.safari){var b={display:"block","float":"none",width:"auto"},c,d;f.swap(m,b,function(){c=m.offsetWidth});b.marginRight=0;f.swap(m,b,function(){d=m.offsetWidth});return d-c}return e.intval(f.css(m,a))},intval:function(a){a=parseInt(a,10);return isNaN(a)?0:a}});f.fn.jcarousel=function(b){if(typeof b=="string"){var a=f(this).data("jcarousel"),c=Array.prototype.slice.call(arguments,1);return a[b].apply(a,c)}else{return this.each(function(){f(this).data("jcarousel",new e(this,b))})}}})(jQuery);

/*
 * jQuery Tooltip plugin 1.3
 *
 * http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/
 * http://docs.jquery.com/Plugins/Tooltip
 *
 * Copyright (c) 2006 - 2008 Jšrn Zaefferer
 *
 * $Id: jquery.tooltip.js 5741 2008-06-21 15:22:16Z joern.zaefferer $
 * 
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */;(function($){var helper={},current,title,tID,IE=$.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),track=false;$.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){$.tooltip.blocked=!$.tooltip.blocked;}};$.fn.extend({tooltip:function(settings){settings=$.extend({},$.tooltip.defaults,settings);createHelper(settings);return this.each(function(){$.data(this,"tooltip",settings);this.tOpacity=helper.parent.css("opacity");this.tooltipText=this.title;$(this).removeAttr("title");this.alt="";}).mouseover(save).mouseout(hide).click(hide);},fixPNG:IE?function(){return this.each(function(){var image=$(this).css('backgroundImage');if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({'backgroundImage':'none','filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"}).each(function(){var position=$(this).css('position');if(position!='absolute'&&position!='relative')$(this).css('position','relative');});}});}:function(){return this;},unfixPNG:IE?function(){return this.each(function(){$(this).css({'filter':'',backgroundImage:''});});}:function(){return this;},hideWhenEmpty:function(){return this.each(function(){$(this)[$(this).html()?"show":"hide"]();});},url:function(){return this.attr('href')||this.attr('src');}});function createHelper(settings){if(helper.parent)return;helper.parent=$('<div id="'+settings.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();if($.fn.bgiframe)helper.parent.bgiframe();helper.title=$('h3',helper.parent);helper.body=$('div.body',helper.parent);helper.url=$('div.url',helper.parent);}function settings(element){return $.data(element,"tooltip");}function handle(event){if(settings(this).delay)tID=setTimeout(show,settings(this).delay);else
show();track=!!settings(this).track;$(document.body).bind('mousemove',update);update(event);}function save(){if($.tooltip.blocked||this==current||(!this.tooltipText&&!settings(this).bodyHandler))return;current=this;title=this.tooltipText;if(settings(this).bodyHandler){helper.title.hide();var bodyContent=settings(this).bodyHandler.call(this);if(bodyContent.nodeType||bodyContent.jquery){helper.body.empty().append(bodyContent)}else{helper.body.html(bodyContent);}helper.body.show();}else if(settings(this).showBody){var parts=title.split(settings(this).showBody);helper.title.html(parts.shift()).show();helper.body.empty();for(var i=0,part;(part=parts[i]);i++){if(i>0)helper.body.append("<br/>");helper.body.append(part);}helper.body.hideWhenEmpty();}else{helper.title.html(title).show();helper.body.hide();}if(settings(this).showURL&&$(this).url())helper.url.html($(this).url().replace('http://','')).show();else
helper.url.hide();helper.parent.addClass(settings(this).extraClass);if(settings(this).fixPNG)helper.parent.fixPNG();handle.apply(this,arguments);}function show(){tID=null;if((!IE||!$.fn.bgiframe)&&settings(current).fade){if(helper.parent.is(":animated"))helper.parent.stop().show().fadeTo(settings(current).fade,current.tOpacity);else
helper.parent.is(':visible')?helper.parent.fadeTo(settings(current).fade,current.tOpacity):helper.parent.fadeIn(settings(current).fade);}else{helper.parent.show();}update();}function update(event){if($.tooltip.blocked)return;if(event&&event.target.tagName=="OPTION"){return;}if(!track&&helper.parent.is(":visible")){$(document.body).unbind('mousemove',update)}if(current==null){$(document.body).unbind('mousemove',update);return;}helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");var left=helper.parent[0].offsetLeft;var top=helper.parent[0].offsetTop;if(event){left=event.pageX+settings(current).left;top=event.pageY+settings(current).top;var right='auto';if(settings(current).positionLeft){right=$(window).width()-left;left='auto';}helper.parent.css({left:left,right:right,top:top});}var v=viewport(),h=helper.parent[0];if(v.x+v.cx<h.offsetLeft+h.offsetWidth){left-=h.offsetWidth+20+settings(current).left;helper.parent.css({left:left+'px'}).addClass("viewport-right");}if(v.y+v.cy<h.offsetTop+h.offsetHeight){top-=h.offsetHeight+20+settings(current).top;helper.parent.css({top:top+'px'}).addClass("viewport-bottom");}}function viewport(){return{x:$(window).scrollLeft(),y:$(window).scrollTop(),cx:$(window).width(),cy:$(window).height()};}function hide(event){if($.tooltip.blocked)return;if(tID)clearTimeout(tID);current=null;var tsettings=settings(this);function complete(){helper.parent.removeClass(tsettings.extraClass).hide().css("opacity","");}if((!IE||!$.fn.bgiframe)&&tsettings.fade){if(helper.parent.is(':animated'))helper.parent.stop().fadeTo(tsettings.fade,0,complete);else
helper.parent.stop().fadeOut(tsettings.fade,complete);}else
complete();if(settings(this).fixPNG)helper.parent.unfixPNG();}})(jQuery);


/* Usage: $('#mySelect').pseudoSelect(); */

(function($) {

	$.fn.pseudoSelect = function(settings) {
		
		var config = {};
		if (settings) {
			$.extend(config, settings);
		}
		
		this.each(function() {
		
			var HTMLSelect = $(this);
				className = 'pseudoSelect';
			
			if (config.psClass) {
				className = className + ' ' + config.psClass;
			}
			
			// Wrap select box so it is contained
			HTMLSelect.wrap('<div class="' + className + '" />').hide();
					
			var	parent = HTMLSelect.parents('.pseudoSelect'); // Get the new parent
				html = '';
				
			// Build HTML for options
			HTMLSelect.find('option').each(function(idx) {
				
				var option = $(this),
					liClass = 'ps_option';
				
				// The value of each option is stored in the ids of the new list items. This value is prefixed with the select boxes name attribute.
				if (HTMLSelect.val() == option.val()) {
				
					if (idx === 0) {
						liClass += ' first ps_selected';
					}
					else {
						liClass += ' ps_selected';
					}
				}
				
				html += '<li class="' + liClass + '" id="' + HTMLSelect.attr('name') + '_' + option.attr('value') + '">' + option.text() + '</li>';
				
			});
			
			// Wrap HTML
			html = '<div class="ps_select"><div class="ps_current"><span>' + HTMLSelect.find(':selected').text() + '</span></div><ul>' + html + '</ul></div>';
			// Append HTML
			$(html).appendTo(parent);
			
			var psSelectInput = $('.ps_select .ps_current');
				psSelectList = $('.ps_select ul');
			
			// Hide options (shown on click)
			psSelectList.hide();
			
			// Bind events
			parent.find('.ps_select').bind('click', showOptions);
			parent.find('li').bind('click', { select : HTMLSelect }, selectOption);
		});
		
		return this;
	};
	
	function showOptions() {
	
		var select = $(this);		
			current = select.find('.ps_current');
			options = select.find('ul');
			otherSelects = $('.ps_select').not(select);
		
		// Stop more than one select being visible at a time	
		if (otherSelects.length > 0) {
			otherSelects.find('ul:visible').hide();
			otherSelects.find('.ps_active').removeClass('ps_active');
		}
		
		options.toggle();
		current.toggleClass('ps_active');
		
		$(document).click(function(e) {
			if ($(e.target).is(current) || $(e.target).parents('.ps_select').length > 0) {
				return;
			} 
			else {
				options.hide();
				$(current).removeClass('ps_active');
			}		
		});
	}
	
	function selectOption(event) {
				
		var HTMLSelect = event.data.select;
			option = $(this);		
			list = option.parents('ul');
			select = option.parents('.ps_select');
			current = select.find('.ps_current span');
			prefixLength = HTMLSelect.attr('name').length + 1;
		
		// Update current option
		current.text(option.text());
		list.find('li').removeClass('ps_selected');
		option.addClass('ps_selected');
		
		// Update the value of the real select box. Now the form submission will be correct.
		HTMLSelect.val(option.attr('id').substr(prefixLength));
		// Trigger change
		HTMLSelect.trigger('change');
	}
	
	function autoWidth(parent) {
		var width = parent.find('ul').outerWidth();
		return false;		
	}

})(jQuery);
