jQuery.fn.extend({addSelectUI:function(){$droplist_Manager=function(){var B=this;B.els=new Array();B.activeName=null};$droplist_UI=function(B,C){var D=this;this.setupDropListUI=function(){var F=0;D.select.find("> *").each(function(P){var Q=jQuery(this);var R=P;if(this.tagName.toLowerCase()=="optgroup"){Q.each(function(){var T=jQuery(this);var V=T.attr("label");var U=jQuery("<li></li>");U.prepend('<span class="OptgroupLabel">'+V+"</span>");var S=jQuery("<ul></ul>");D.elUL.append(U);U.append(S);T.find("option").each(function(X){var W=jQuery(this);if(W.attr("value")==""){S.append('<li class="SelectUITitle" value="'+parseInt(R+X+F+1)+'"><a href="#" title="'+W.text()+'" rel="'+W.attr("label")+'">'+W.text()+"</a></li>")}else{if(W.attr("selected")){S.append('<li class="Active" value="'+parseInt(R+X+F+1)+'"><a href="#" title="'+W.text()+'" rel="'+W.attr("label")+'">'+W.text()+"</a></li>")}else{S.append('<li value="'+parseInt(R+X+F+1)+'"><a href="#" title="'+W.text()+'" rel="'+W.attr("label")+'">'+W.text()+"</a></li>")}}});F+=T.find("option").length-1})}else{if(Q.attr("value")==""){D.elUL.append('<li class="SelectUITitle" value="'+parseInt(P+F+1)+'"><a href="#" title="'+Q.text()+'" rel="'+Q.attr("label")+'">'+Q.text()+"</a></li>")}else{if(Q.attr("selected")){D.elUL.append('<li class="Active" value="'+parseInt(P+F+1)+'"><a href="#" title="'+Q.text()+'" rel="'+Q.attr("label")+'">'+Q.text()+"</a></li>")}else{D.elUL.append('<li value="'+parseInt(P+F+1)+'"><a href="#" title="'+Q.text()+'" rel="'+Q.attr("label")+'">'+Q.text()+"</a></li>")}}}});D.el=jQuery('<div class="DropListUIContainer"></div>');D.elUL.before(D.el);D.el.html(D.elUL);D.elWrapper=jQuery('<div class="DropListUI"></div>');D.el.before(D.elWrapper);var E=D.elUL.attr("class").split(" ");var N=true;for(var G=0;G<E.length;G++){if(E[G].match(/^Theme/)){D.elWrapper.addClass(E[G]);N=false}}if(N){D.elWrapper.addClass("Theme_Default");D.elUL.addClass("Theme_Default")}D.elWrapper.html(D.el);if(!D.select.attr("multiple")){D.maxDropListHeight=C!=undefined&&C.maxDropListHeight!=undefined?parseInt(C.maxDropListHeight):300;D.config={maxDropListHeight:D.maxDropListHeight};var J="";var L=false;D.select.find("option").each(function(){var P=jQuery(this);if(P.attr("selected")){J=P.text();L=true}});if(!L){J=D.select.attr("title")!=""?D.select.attr("title"):D.select.find("option:first-child").text()}if(!D.select.attr("disabled")){D.droplistTITLE=jQuery('<p title="'+J+'"><span>'+J+"</span></p>")}else{D.droplistTITLE=jQuery('<p title="'+J+'"><span>'+J+"</span></p>");D.elWrapper.addClass("Disabled")}D.el.before(D.droplistTITLE);D.el.css({position:"absolute",left:0,display:"none",overflow:"hidden",width:D.elUL.width()});D.el.find("ul > li").each(function(Q){var P=jQuery(this);P.bind("click",function(){if(P.find("span.OptgroupLabel:first-child").length>0){return false}else{if(!D.select.attr("disabled")){D.el.find("ul > li").removeClass("Active");P.addClass("Active");D.droplistTITLE.html("<span>"+P.text()+"</span>");D.droplistTITLE.attr("title",P.text());D.hideList();D.select.val(D.select.find("option").eq(P.attr("value")-1).val());callExternalFunction(D,droplistManager.els,P.find("a:first").attr("rel"));P.removeClass("Hover");return false}}})});D.droplistTITLE.bind("click",function(P){D.eventFire=true;if(!D.select.attr("disabled")){if(D.el.hasClass("DropListUIShow")){D.hideList()}else{if(droplistManager.activeName!=null){droplistManager.els[droplistManager.activeName].hideList()}D.showList();droplistManager.activeName=D.select.attr("id")}}return false});jQuery(document).bind("click",function(P){if(droplistManager.activeName!=null){droplistManager.els[droplistManager.activeName].hideList()}P.stopPropagation()});jQuery(document).bind("mouseover",function(P){if(droplistManager.activeName!=null){droplistManager.els[droplistManager.activeName].hideList()}});D.elWrapper.bind("mouseover",function(P){P.stopPropagation()});D.el.bind("click",function(P){return false})}else{var O=D.select.attr("size");D.elUL.css({height:D.elUL.find("li").eq(0).outerHeight(true)*O,overflow:"hidden"});if(!D.elUL.parent().hasClass("jScrollPaneContainer")){D.elUL.jScrollPane({scrollbarWidth:D.options.scrollbarWidth,scrollbarOnLeft:D.options.scrollbarSide=="left"?true:false})}var K=null;var M=null;var H=null;function I(){D.select.find("option").removeAttr("selected");D.elUL.find("li").removeClass("Active")}D.el.find("ul > li").each(function(Q){var P=jQuery(this);P.bind("click",function(R){if(P.find("span.OptgroupLabel:first-child").length>0){return false}else{if(!D.select.attr("disabled")){if(R.ctrlKey&&!R.shiftKey){M=Q;D.select.find("option").eq(Q).attr("selected","selected")}else{if((!R.ctrlKey&&R.shiftKey)||(R.ctrlKey&&R.shiftKey)){if(!R.ctrlKey){I()}if(M==null){M=Q}else{H=Q;if(M!=null&&H!=null){D.el.find("ul > li").each(function(T){var S=jQuery(this);if((M<=H&&T>=M&&T<=H)||(M>=H&&T<=M&&T>=H)){D.select.find("option").eq(T).attr("selected","selected");S.addClass("Active")}});H=null}}}else{I();D.select.find("option").eq(Q).attr("selected","selected");M=Q}}P.addClass("Active");P.removeClass("Hover");return false}}})})}D.el.find("ul > li").each(function(Q){var P=jQuery(this);P.bind("mouseover",function(){P.addClass("Hover");return false});P.bind("mouseout",function(){P.removeClass("Hover");return false})})};this.reset=function(){D.elUL.empty();D.elUL.removeAttr("class");D.elUL.attr("title",D.select.attr("title"));D.elUL.addClass(D.select.attr("class"));this.setupDropListUI()};this.showList=function(){D.elWrapper.addClass("TopLevel");D.el.addClass("DropListUIShow");D.reservedHolder=D.elWrapper.clone(true).empty();D.reservedHolder.css({visibility:"hidden",height:D.elWrapper.outerHeight()});D.elWrapper.hide();D.elWrapper.before(D.reservedHolder);var E=0;var F=0;var G={left:0,top:0};D.elWrapper.appendTo("body");G.top=D.reservedHolder.offset().top;G.left=D.reservedHolder.offset().left;D.elWrapper.css({position:"absolute",top:G.top+F,left:G.left+E,margin:0});D.elWrapper.show();D.el.show();if(D.el.height()>D.maxDropListHeight){D.elUL.height(D.maxDropListHeight);if(!D.elUL.parent().hasClass("jScrollPaneContainer")){D.elUL.jScrollPane({scrollbarWidth:D.options.scrollbarWidth,scrollbarOnLeft:D.options.scrollbarSide=="left"?true:false})}}D.eventFire=false};this.hideList=function(){D.el.prepend(D.elUL);D.elUL.removeAttr("style");D.elUL.next().remove();D.elWrapper.removeClass("TopLevel");D.el.removeClass("DropListUIShow");D.select.after(D.elWrapper.removeAttr("style"));D.el.hide();D.reservedHolder.remove()};this.setDirection=function(){var K=jQuery(window).height();var E=D.elWrapper.offset().top-jQuery(window).scrollTop();var H=D.elWrapper.offset().top+D.elWrapper.height()-jQuery(window).scrollTop();var F=D.elUL.outerHeight();var I="";if(D.config.maxDropListHeight>D.maxDropListHeight){D.maxDropListHeight=D.config.maxDropListHeight}if(F<=K-H){I="down"}else{if(K-H>D.maxDropListHeight){I="down"}else{if(F<E){I="up"}else{if(E>D.maxDropListHeight){I="up"}else{if(K-H>=E){I="down";D.maxDropListHeight=K-H}else{I="up";D.maxDropListHeight=E}}}}}var J=(/[0-9]+/).test(D.el.css("borderTopWidth"))?parseInt(D.el.css("borderTopWidth")):0;var G=(/[0-9]+/).test(D.el.css("borderBottomWidth"))?parseInt(D.el.css("borderBottomWidth")):0;D.maxDropListHeight-=(J+G);if(I=="up"){D.el.css({bottom:D.elWrapper.height()+"px",top:"auto"})}else{D.el.css({top:"100%",bottom:"auto"})}};D.options={scrollbarWidth:C!=undefined&&C.scrollbarWidth!=undefined?parseInt(C.scrollbarWidth):10,scrollbarSide:C!=undefined&&C.scrollbarSide!=undefined?C.scrollbarSide:"right"};D.select=B;D.select.addClass("HasSelectUI");D.select.css({opacity:0,position:"absolute",left:"-1000em",top:"-1000em"});D.reservedHolder=null;D.elUL=jQuery('<ul title="'+D.select.attr("title")+'"></ul>');D.elUL.addClass(D.select.attr("class"));D.select.after(D.elUL);this.setupDropListUI()};if(window.droplistManager==undefined){window.droplistManager=new $droplist_Manager()}if(window.droplistManager!=undefined){jQuery(window).bind("resize",function(B){if(droplistManager.activeName!=null&&window.droplistManager.els[droplistManager.activeName]!=undefined&&!droplistManager.els[droplistManager.activeName].eventFire){window.droplistManager.els[droplistManager.activeName].hideList()}});jQuery(window).bind("scroll",function(B){if(droplistManager.activeName!=null&&window.droplistManager.els[droplistManager.activeName]!=undefined&&!droplistManager.els[droplistManager.activeName].eventFire){window.droplistManager.els[droplistManager.activeName].hideList();B.stopPropagation()}})}var A=arguments[0];this.each(function(){if(!jQuery(this).hasClass("HasSelectUI")){jQuery(this).addClass("HasSelectUI");droplistManager.els[jQuery(this).attr("id")]=new $droplist_UI(jQuery(this),A)}})}});function callExternalFunction(C,A,B){}jQuery(document).ready(function(){var A=jQuery("#menu > ul > li");A.each(function(B){jQuery(this).bind("mouseover",function(){jQuery(this).addClass("NavOver")});jQuery(this).bind("mouseout",function(){jQuery(this).removeClass("NavOver")})});jQuery(".GuideMe > a").bind("click",function(){var B=jQuery("#menu > ul > li");B.each(function(C){jQuery(this).removeClass("NavOver")});showAdvisorTool("player","GuideMe")});jQuery(".InspireMe > a").bind("click",function(){var B=jQuery("#menu > ul > li");B.each(function(C){jQuery(this).removeClass("NavOver")});showAdvisorTool("player","InspireMe")})});function windowPop(C,B,E,A,H){var D=(screen.width)?(screen.width-E)/2:0;var F=(screen.height)?(screen.height-A)/2:0;var G;if(H!=""){G="scrollbars="+H}else{G="scrollbars=0"}G=G+",location=0,menubar=0,status=0,toolbar=0,resizable=1,top="+F+",left="+D+",";G=G+"width="+E+",height="+A}function ShowLoginPopup(){jQuery(".LoginForm1").show();jQuery(".LoginForm1 input.TextBox").val("");return false}jQuery.jScrollPane={active:[]};jQuery.fn.jScrollPane=function(A){A=jQuery.extend({scrollbarWidth:10,scrollbarMargin:0,wheelSpeed:18,showArrows:false,arrowSize:0,animateTo:false,dragMinHeight:1,dragMaxHeight:99999,animateInterval:100,animateStep:3,maintainPosition:true,scrollbarOnLeft:false},A);return this.each(function(){var K=jQuery(this);if(jQuery(this).parent().is(".jScrollPaneContainer")){var AA=A.maintainPosition?K.offset({relativeTo:jQuery(this).parent()[0]}).top:0;var I=jQuery(this).parent();var Y=I.innerWidth();var AB=I.outerHeight();var J=AB;if(I.unmousewheel){I.unmousewheel()}jQuery(">.jScrollPaneTrack, >.jScrollArrowUp, >.jScrollArrowDown",I).remove();K.css({top:0})}else{var AA=0;this.originalPadding=K.css("paddingTop")+" "+K.css("paddingRight")+" "+K.css("paddingBottom")+" "+K.css("paddingLeft");this.originalSidePaddingTotal=(parseInt(K.css("paddingLeft"))||0)+(parseInt(K.css("paddingRight"))||0);var f=(/[0-9]+/).test(K.parent().css("borderLeftWidth"))?parseInt(K.parent().css("borderLeftWidth")):0;var r=(/[0-9]+/).test(K.parent().css("borderRightWidth"))?parseInt(K.parent().css("borderRightWidth")):0;var h=A.scrollbarOnLeft?f:r;var Y=K.parent().innerWidth()+h;var AB=K.innerHeight();var J=AB;K.wrap(jQuery("<div></div>").attr({className:"jScrollPaneContainer"}).css({height:AB+"px",width:Y+"px"}));jQuery(document).bind("emchange",function(AC,AD,p){K.jScrollPane(A)})}var l=this.originalSidePaddingTotal;var i={height:"auto",width:Y-A.scrollbarWidth-A.scrollbarMargin-l+"px"};if(A.scrollbarOnLeft){i.paddingLeft=A.scrollbarMargin+A.scrollbarWidth+"px"}else{i.paddingRight=A.scrollbarMargin+"px"}K.css(i);var j=K.outerHeight();var d=AB/j;if(d<0.99){var E=K.parent();var f=(/[0-9]+/).test(jQuery(".jScrollPaneDrag").css("borderLeftWidth"))?parseInt(jQuery(".jScrollPaneDrag").css("borderLeftWidth")):0;var r=(/[0-9]+/).test(jQuery(".jScrollPaneDrag").css("borderRightWidth"))?parseInt(jQuery(".jScrollPaneDrag").css("borderRightWidth")):0;E.append(jQuery("<div></div>").attr({className:"jScrollPaneTrack"}).css({width:A.scrollbarWidth+"px"}).append(jQuery("<div></div>").attr({className:"jScrollPaneDrag"}).css({width:A.scrollbarWidth-f-r+"px"}).append(jQuery("<div></div>").attr({className:"jScrollPaneDragTop"}).css({width:A.scrollbarWidth+"px"}),jQuery("<div></div>").attr({className:"jScrollPaneDragBottom"}).css({width:A.scrollbarWidth+"px"}))));var x=jQuery(">.jScrollPaneTrack",E);var L=jQuery(">.jScrollPaneTrack .jScrollPaneDrag",E);if(A.showArrows){var b;var z;var O;var n;var e=function(){if(n>4||n%4==0){w(s+z*W)}n++};var H=function(p){jQuery("html").unbind("mouseup",H);b.removeClass("jScrollActiveArrowButton");clearInterval(O)};var U=function(){jQuery("html").bind("mouseup",H);b.addClass("jScrollActiveArrowButton");n=0;e();O=setInterval(e,100)};E.append(jQuery("<a></a>").attr({href:"javascript:;",className:"jScrollArrowUp"}).css({width:A.scrollbarWidth+"px"}).html("Scroll up").bind("mousedown",function(){b=jQuery(this);z=-1;U();this.blur();return false}),jQuery("<a></a>").attr({href:"javascript:;",className:"jScrollArrowDown"}).css({width:A.scrollbarWidth+"px"}).html("Scroll down").bind("mousedown",function(){b=jQuery(this);z=1;U();this.blur();return false}));var M=jQuery(">.jScrollArrowUp",E);var G=jQuery(">.jScrollArrowDown",E);if(A.arrowSize){J=AB-A.arrowSize-A.arrowSize;x.css({height:J+"px",top:A.arrowSize+"px"})}else{var o=M.height();A.arrowSize=o;J=AB-o-G.height();x.css({height:J+"px",top:o+"px"})}}var u=jQuery(this).css({position:"absolute",overflow:"visible"});var B;var T;var W;var s=0;var R=d*AB/2;var V=function(AC,AE){var AD=AE=="X"?"Left":"Top";return AC["page"+AE]||(AC["client"+AE]+(document.documentElement["scroll"+AD]||document.body["scroll"+AD]))||0};var a=function(){return false};var t=function(){k();B=L.offset(false);B.top-=s;T=J-L[0].offsetHeight;W=2*A.wheelSpeed*T/j};var C=function(p){t();R=V(p,"Y")-s-B.top;jQuery("html").bind("mouseup",P).bind("mousemove",c);if(jQuery.browser.msie){jQuery("html").bind("dragstart",a).bind("selectstart",a)}return false};var P=function(){jQuery("html").unbind("mouseup",P).unbind("mousemove",c);R=d*AB/2;if(jQuery.browser.msie){jQuery("html").unbind("dragstart",a).unbind("selectstart",a)}};var w=function(AC){AC=AC<0?0:(AC>T?T:AC);s=AC;L.css({top:AC+"px"});var AD=AC/T;u.css({top:((AB-j)*AD)+"px"});K.trigger("scroll");if(A.showArrows){M[AC==0?"addClass":"removeClass"]("disabled");G[AC==T?"addClass":"removeClass"]("disabled")}};var c=function(p){w(V(p,"Y")-B.top-R)};var m=Math.max(Math.min(d*(AB-A.arrowSize*2),A.dragMaxHeight),A.dragMinHeight);L.css({height:m+"px"}).bind("mousedown",C);var g;var N;var F;var q=function(){if(N>8||N%4==0){w((s-((s-F)/2)))}N++};var y=function(){clearInterval(g);jQuery("html").unbind("mouseup",y).unbind("mousemove",Z)};var Z=function(p){F=V(p,"Y")-B.top-R};var Q=function(p){t();Z(p);N=0;jQuery("html").bind("mouseup",y).bind("mousemove",Z);g=setInterval(q,100);q()};x.bind("mousedown",Q);if(E.mousewheel){E.mousewheel(function(AC,AE){t();k();var AD=s;w(s-AE*W);var p=AD!=s;return !p},false)}var D;var S;function X(){var p=(D-s)/A.animateStep;if(p>1||p<-1){w(s+p)}else{w(D);k()}}var k=function(){if(S){clearInterval(S);delete D}};var v=function(AD,p){if(typeof AD=="string"){$e=jQuery(AD,this);if(!$e.length){return }AD=$e.offset().top-K.offset().top}k();var AC=-AD/(AB-j)*T;if(!p||A.animateTo){D=AC;S=setInterval(X,A.animateInterval)}else{w(AC)}};K[0].scrollTo=v;K[0].scrollBy=function(AC){var p=-parseInt(u.css("top"))||0;v(p+AC)};t();v(-AA,true);jQuery.jScrollPane.active.push(K[0])}else{K.css({height:AB+"px",width:Y-this.originalSidePaddingTotal+"px",padding:this.originalPadding})}})};jQuery(window).bind("unload",function(){var B=jQuery.jScrollPane.active;for(var A=0;A<B.length;A++){B[A].scrollTo=B[A].scrollBy=null}});(function(A){A.fn.extend({mousewheel:function(B){if(!B.guid){B.guid=A.event.guid++}if(!A.event._mwCache){A.event._mwCache=[]}return this.each(function(){if(this._mwHandlers){return this._mwHandlers.push(B)}else{this._mwHandlers=[]}this._mwHandlers.push(B);var C=this;this._mwHandler=function(F){F=A.event.fix(F||window.event);A.extend(F,this._mwCursorPos||{});var G=0,E=true;if(F.wheelDelta){G=F.wheelDelta/120}if(F.detail){G=-F.detail/3}if(window.opera){G=-F.wheelDelta}for(var D=0;D<C._mwHandlers.length;D++){if(C._mwHandlers[D]){if(C._mwHandlers[D].call(C,F,G)===false){E=false;F.preventDefault();F.stopPropagation()}}}return E};if(A.browser.mozilla&&!this._mwFixCursorPos){this._mwFixCursorPos=function(D){this._mwCursorPos={pageX:D.pageX,pageY:D.pageY,clientX:D.clientX,clientY:D.clientY}};A(this).bind("mousemove",this._mwFixCursorPos)}if(this.addEventListener){if(A.browser.mozilla){this.addEventListener("DOMMouseScroll",this._mwHandler,false)}else{this.addEventListener("mousewheel",this._mwHandler,false)}}else{this.onmousewheel=this._mwHandler}A.event._mwCache.push(A(this))})},unmousewheel:function(B){return this.each(function(){if(B&&this._mwHandlers){for(var C=0;C<this._mwHandlers.length;C++){if(this._mwHandlers[C]&&this._mwHandlers[C].guid==B.guid){delete this._mwHandlers[C]}}}else{if(A.browser.mozilla&&!this._mwFixCursorPos){A(this).unbind("mousemove",this._mwFixCursorPos)}if(this.addEventListener){if(A.browser.mozilla){this.removeEventListener("DOMMouseScroll",this._mwHandler,false)}else{this.removeEventListener("mousewheel",this._mwHandler,false)}}else{this.onmousewheel=null}this._mwHandlers=this._mwHandler=this._mwFixCursorPos=this._mwCursorPos=null}})}});A(window).one("unload",function(){var C=A.event._mwCache||[];for(var B=0;B<C.length;B++){C[B].unmousewheel()}})})(jQuery);(function(B){B.dimensions={version:"1.2"};B.each(["Height","Width"],function(D,C){B.fn["inner"+C]=function(){if(!this[0]){return }var F=C=="Height"?"Top":"Left",E=C=="Height"?"Bottom":"Right";return this.is(":visible")?this[0]["client"+C]:A(this,C.toLowerCase())+A(this,"padding"+F)+A(this,"padding"+E)};B.fn["outer"+C]=function(F){if(!this[0]){return }var H=C=="Height"?"Top":"Left",E=C=="Height"?"Bottom":"Right";F=B.extend({margin:false},F||{});var G=this.is(":visible")?this[0]["offset"+C]:A(this,C.toLowerCase())+A(this,"border"+H+"Width")+A(this,"border"+E+"Width")+A(this,"padding"+H)+A(this,"padding"+E);return G+(F.margin?(A(this,"margin"+H)+A(this,"margin"+E)):0)}});B.each(["Left","Top"],function(D,C){B.fn["scroll"+C]=function(E){if(!this[0]){return }return E!=undefined?this.each(function(){this==window||this==document?window.scrollTo(C=="Left"?E:B(window)["scrollLeft"](),C=="Top"?E:B(window)["scrollTop"]()):this["scroll"+C]=E}):this[0]==window||this[0]==document?self[(C=="Left"?"pageXOffset":"pageYOffset")]||B.boxModel&&document.documentElement["scroll"+C]||document.body["scroll"+C]:this[0]["scroll"+C]}});B.fn.extend({position:function(){var H=0,G=0,F=this[0],I,C,E,D;if(F){E=this.offsetParent();I=this.offset();C=E.offset();I.top-=A(F,"marginTop");I.left-=A(F,"marginLeft");C.top+=A(E,"borderTopWidth");C.left+=A(E,"borderLeftWidth");D={top:I.top-C.top,left:I.left-C.left}}return D},offsetParent:function(){var C=this[0].offsetParent;while(C&&(!/^body|html$/i.test(C.tagName)&&B.css(C,"position")=="static")){C=C.offsetParent}return B(C)}});function A(C,D){return parseInt(B.curCSS(C.jquery?C[0]:C,D,true))||0}})(jQuery);