﻿$.fn.addPrintButton=function(){return this.each(function(){$('<a href="#" class="printButton">Print</a>').click(function(){window.print()}).insertBefore(this)})};$.fn.positionCenter=function(){$(this).css("top",($(window).height()-$(this).height())/2+$(window).scrollTop()+"px");$(this).css("left",($(window).width()-$(this).width())/2+$(window).scrollLeft()+"px")};$.fn.popupWindow=function(){$.each($(".popUpMask, .close"),function(){$(this).click(function(){$(".popup-window, .popUpMask").hide();return false})});return this.each(function(){$(this).click(function(){$(this).showModal();$(".popup-window").positionCenter();return false});$(window).scroll(function(){$(".popup-window").positionCenter()}).resize(function(){$(".popup-window").positionCenter()})})};$.fn.showModal=function(){var a=$(this).attr("rel");showSpecificModal(a)};function getCookie(e){for(var c,d,b=document.cookie.split(";"),a=0;a<b.length;a++){c=b[a].substr(0,b[a].indexOf("="));d=b[a].substr(b[a].indexOf("=")+1);c=c.replace(/^\s+|\s+$/g,"");if(c==e)return unescape(d)}}function showSpecificModal(b){if(getCookie("_mkto_trk"))typeof mktoMunchkinFunction=="function"&&mktoMunchkinFunction("clickLink",{href:"/"+b+"/popup"});var a=$(".popup-window");a.find(".popup-content").html($("#"+b).html());a.find(".hider").click(function(){$(".popup-window, .popUpMask").hide();return false});a.show();a.positionCenter();$(".popUpMask").css("height",$(document).height()+"px");$(".popUpMask").show();return false}$(function(){$("body").hasClass("member_expired")&&$.each($(".exclusive"),function(){$(this).attr("href","#").after('<span class="expired">members</span>').click(function(){$(this).attr("rel","expired-popup");$(this).showModal();return false});var a;$("#renew_now a").click(function(){if($(this).hasClass("purchase"))a="yes";else a="no";pageTracker._trackEvent("renew_now",a)})})});$(function(){$("body").hasClass("bronze")&&$.each($("a.bronze"),function(){$(this).attr("href","#").after('<span class="expired">members</span>').click(function(){$(this).attr("rel","upgrade-now-popup");$(this).showModal();return false})})});$(function(){$("a[target=_blank]").each(function(){$(this).addClass("external");$(this).click(function(){window.open(this.href);return false})});$("a[target=_blank]").not(".short-externals a").each(function(){$(this).after('<span class="externalText">&nbsp;(opens in a new window)</span>')})});$(function(){$.postJSON=function(c,b,a){$.post(c,b,a,"json")}});$.fn.toggleText=function(a,b){return this.each(function(){$(this).text($(this).text()==a?b:a)})};$(function(){$(".sidebar ul li:has(p.sidebarHeader a)").each(function(){$(this).addClass("sidebarListItem");$(this).click(function(){var a=$(this).find("p.sidebarHeader a").attr("href");window.location=a})})});$(function(){$(".sidebar ul li:has(p.sidebarExtraHeader a)").each(function(){$(this).addClass("sidebarExtraItem");$(this).click(function(){var a=$(this).find("p.sidebarExtraHeader a").attr("href");window.location=a})})});$(function(){$(".imagePanel").each(function(){$(this).find("span.externalText").remove()})});$(function(){$(".sessionContentContainer").hide();$("ul.sessionTabs").each(function(){var a=$(this).find("li:first");$("#"+a.attr("id")+"Panel").show()})});$(function(){$("ul.sessionTabs li").click(function(){var a=$(this).parent().find("li.sessionTabSelected");a.removeClass("sessionTabSelected");a.addClass("sessionTab");$(this).parent().find("li.sessionTabSelected").removeClass("sessionTabSelected");$(this).removeClass("sessionTab");$(this).addClass("sessionTabSelected");var b=$("#"+$(this).attr("id")+"Panel");b.parent().find(".sessionContentContainer").hide();b.show()})});gwoTracker=null;pageTracker=null;doneCallback=null;function GAEvent(a){doneCallback=a}function getCookie(a){if(document.cookie.length>0){c_start=document.cookie.indexOf(a+"=");if(c_start!=-1){c_start=c_start+a.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1)c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end))}}return""}$(document).ready(function(){var a="https:"==document.location.protocol?"https://ssl.":"http://www.";$.getScript(a+"google-analytics.com/ga.js",function(){try{pageTracker=_gat._getTracker(lesGTC);pageTracker._setDomainName(lesGTD);lesUserDefined!==""&&pageTracker._setVar(lesUserDefined);pageTracker._trackPageview()}catch(b){}try{if(lesGWOTC!=null&&lesGWOTC!="")gwoTracker=_gat._getTracker(lesGWOTC)}catch(b){}var a=/\.(zip|exe|pdf|doc*|xls*|ppt*|mp3)$/i;$("a").each(function(){var b=$(this).attr("href");if(b!=null)if(b.match(/^https?\:/i)&&!b.match(document.domain))$(this).click(function(){var a=b.replace(/^https?\:\/\//i,"");pageTracker._trackEvent("External","Click",a)});else if(b.match(/^mailto\:/i))$(this).click(function(){var a=b.replace(/^mailto\:/i,"");pageTracker._trackEvent("Email","Click",a)});else b.match(a)&&$(this).click(function(){var c=/[.]/.exec(b)?/[^.]+$/.exec(b):undefined,a=b.replace(/^https?\:\/\/(www.)mydomain\.com\//i,"");pageTracker._trackPageview(a)})});doneCallback!=null&&doneCallback()})});var listName="ul",listKeyPressEvents=function(a,b){$(a).bind("keyup",setListKeyEvents);$(a).trigger("keyup",[{preventDefault:function(){},keyCode:38}]);$(a).trigger("keyup",[{preventDefault:function(){},keyCode:40}]);listName="ul#"+b},selectCompany=function(){if($(listName).find("li.selected a").length!=0)window.location.href=$(listName).find("li.selected a").attr("href")},moveUp=function(){if($(listName).find("li.selected").prev().length!=0)$(listName).find("li.selected").removeClass("selected").prev().addClass("selected");else $(listName).find("li.selected").removeClass("selected")},moveDown=function(){if($(listName).find("li.selected").next().length!=0)$(listName).find("li.selected").removeClass("selected").next().addClass("selected");else $(listName).find("li.selected").length==0&&$(listName+" li").first().addClass("selected")},setListKeyEvents=function(a,b){a&&a.preventDefault();switch(e2key(b||a)){case"up":moveUp();break;case"down":moveDown();break;case"enter":selectCompany()}},e2key=function(a){if(!a)return"";var b={"96":"0","97":"1","98":"2","99":"3","100":"4","101":"5","102":"6","103":"7","104":"8","105":"9","48":"m0","49":"m1","50":"m2","51":"m3","52":"m4","53":"m5","54":"m6","55":"m7","56":"m8","57":"m9","65":"a","66":"b","67":"c","68":"d","69":"e","70":"f","71":"g","72":"h","73":"i","74":"j","75":"k","76":"l","77":"m","78":"n","79":"o","80":"p","81":"q","82":"r","83":"s","84":"t","85":"u","86":"v","87":"w","88":"x","89":"y","90":"z","37":"left","39":"right","38":"up","40":"down","13":"enter","27":"esc","32":"space","107":"+","109":"-","33":"pageUp","34":"pageDown"};return b[a.which||a.keyCode]};function setDefaultValues(a){$(".tabPanel").hide();$("div").filter("#tabEmpty").hide();$("li").removeClass("tabSelected");$("div").filter("#tabEmpty").show();$("div").filter("#"+a+"Panel").length>0&&$("div").filter("#tabEmpty").hide()}$(document).ready(function(){$('a[rel="external"]').click(function(){this.target="_blank"});setDefaultValues("");$("ul.tab").each(function(){var a,b=$(this).attr("defaultTab");if(b!=null)a=$(this).find("li[id="+b+"]");else a=$(this).find("li:first");$("#"+a.attr("id")+"Panel").show();a.addClass("tabSelected");$("div").filter("#"+a.attr("id")+"Panel").length>0&&$("div").filter("#tabEmpty").hide()});$("li.tab").click(function(){$(this).addClass("tabSelected");var a=$(this).attr("id");setDefaultValues(a);$("#"+a+"Panel").show();$(this).addClass("tabSelected")});$("input.checkedOptional").click(function(){var a="#"+this.id,b="#"+$(a).attr("textid");if($(a).attr("checked"))$(b).html("(Selected)");else $(b).html("(Optional)")});$("#client_links li, #settings li").hover(function(){$(this).addClass("active");return false},function(){$(this).removeClass("active")})});var _vis_opt_account_id=14561,_vis_opt_protocol="https:"==document.location.protocol?"https://":"http://";document.write('<script src="'+_vis_opt_protocol+"dev.visualwebsiteoptimizer.com/deploy/js_visitor_settings.php?v=1&a="+_vis_opt_account_id+"&url="+encodeURIComponent(document.URL)+"&random="+Math.random()+'" type="text/javascript"><\/script>');typeof _vis_opt_settings_loaded=="boolean"&&document.write('<script src="'+_vis_opt_protocol+'d5phz18u4wuww.cloudfront.net/vis_opt_no_jquery.js" type="text/javascript"><\/script>');if(typeof _vis_opt_settings_loaded=="boolean"&&typeof _vis_opt_top_initialize=="function"){_vis_opt_top_initialize();vwo_$(document).ready(function(){_vis_opt_bottom_initialize()})}/*
 * jQuery Tools v1.2.6 - The missing UI library for the Web
 * 
 * overlay/overlay.js
 * scrollable/scrollable.js
 * tabs/tabs.js
 * tooltip/tooltip.js
 * 
 * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
 * 
 * http://flowplayer.org/tools/
 * 
 */
(function(a){a.tools=a.tools||{version:"v1.2.6"},a.tools.overlay={addEffect:function(a,c,d){b[a]=[c,d]},conf:{close:null,closeOnClick:!0,closeOnEsc:!0,closeSpeed:"fast",effect:"default",fixed:!a.browser.msie||a.browser.version>6,left:"center",load:!1,mask:null,oneInstance:!0,speed:"normal",target:null,top:"10%"}};var c=[],b={};a.tools.overlay.addEffect("default",function(b,e){var c=this.getConf(),d=a(window);c.fixed||(b.top+=d.scrollTop(),b.left+=d.scrollLeft()),b.position=c.fixed?"fixed":"absolute",this.getOverlay().css(b).fadeIn(c.speed,e)},function(a){this.getOverlay().fadeOut(this.getConf().closeSpeed,a)});function d(h,e){var d=this,j=h.add(d),m=a(window),i,f,k,g=a.tools.expose&&(e.mask||e.expose),l=Math.random().toString().slice(10);g&&(typeof g=="string"&&(g={color:g}),g.closeOnClick=g.closeOnEsc=!1);var n=e.target||h.attr("rel");f=n?a(n):null||h;if(!f.length)throw"Could not find Overlay: "+n;h&&h.index(f)==-1&&h.click(function(a){d.load(a);return a.preventDefault()}),a.extend(d,{load:function(h){if(d.isOpened())return d;var o=b[e.effect];if(!o)throw'Overlay: cannot find effect : "'+e.effect+'"';e.oneInstance&&a.each(c,function(){this.close(h)}),h=h||a.Event(),h.type="onBeforeLoad",j.trigger(h);if(h.isDefaultPrevented())return d;k=!0,g&&a(f).expose(g);var i=e.top,n=e.left,p=f.outerWidth({margin:!0}),q=f.outerHeight({margin:!0});typeof i=="string"&&(i=i=="center"?Math.max((m.height()-q)/2,0):parseInt(i,10)/100*m.height()),n=="center"&&(n=Math.max((m.width()-p)/2,0)),o[0].call(d,{top:i,left:n},function(){k&&(h.type="onLoad",j.trigger(h))}),g&&e.closeOnClick&&a.mask.getMask().one("click",d.close),e.closeOnClick&&a(document).bind("click."+l,function(b){a(b.target).parents(f).length||d.close(b)}),e.closeOnEsc&&a(document).bind("keydown."+l,function(a){a.keyCode==27&&d.close(a)});return d},close:function(c){if(!d.isOpened())return d;c=c||a.Event(),c.type="onBeforeClose",j.trigger(c);if(!c.isDefaultPrevented()){k=!1,b[e.effect][1].call(d,function(){c.type="onClose",j.trigger(c)}),a(document).unbind("click."+l).unbind("keydown."+l),g&&a.mask.close();return d}},getOverlay:function(){return f},getTrigger:function(){return h},getClosers:function(){return i},isOpened:function(){return k},getConf:function(){return e}}),a.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(c,b){a.isFunction(e[b])&&a(d).bind(b,e[b]),d[b]=function(c){c&&a(d).bind(b,c);return d}}),i=f.find(e.close||".close"),!i.length&&!e.close&&(i=a('<a class="close"></a>'),f.prepend(i)),i.click(function(a){d.close(a)}),e.load&&d.load()}a.fn.overlay=function(b){var e=this.data("overlay");if(e)return e;a.isFunction(b)&&(b={onBeforeLoad:b}),b=a.extend(!0,{},a.tools.overlay.conf,b),this.each(function(){e=new d(a(this),b),c.push(e),a(this).data("overlay",e)});return b.api?e:this}})(jQuery);(function(a){a.tools=a.tools||{version:"v1.2.6"},a.tools.scrollable={conf:{activeClass:"active",circular:!1,clonedClass:"cloned",disabledClass:"disabled",easing:"swing",initialIndex:0,item:"> *",items:".items",keyboard:!0,mousewheel:!1,next:".next",prev:".prev",size:1,speed:400,vertical:!1,touch:!0,wheelSpeed:0}};function c(d,b){var c=a(b);return c.length<2?c:d.parent().find(b)}var b;function d(g,e){var d=this,m=g.add(d),f=g.children(),i=0,h=e.vertical;b||(b=d),f.length>1&&(f=a(e.items,g)),e.size>1&&(e.circular=!1),a.extend(d,{getConf:function(){return e},getIndex:function(){return i},getSize:function(){return d.getItems().size()},getNaviButtons:function(){return j.add(k)},getRoot:function(){return g},getItemWrap:function(){return f},getItems:function(){return f.find(e.item).not("."+e.clonedClass)},move:function(a,b){return d.seekTo(i+a,b)},next:function(a){return d.move(e.size,a)},prev:function(a){return d.move(-e.size,a)},begin:function(a){return d.seekTo(0,a)},end:function(a){return d.seekTo(d.getSize()-1,a)},focus:function(){b=d;return d},addItem:function(b){b=a(b),e.circular?(f.children().last().before(b),f.children().first().replaceWith(b.clone().addClass(e.clonedClass))):(f.append(b),k.removeClass("disabled")),m.trigger("onAddItem",[b]);return d},seekTo:function(c,g,k){c.jquery||(c*=1);if(e.circular&&c===0&&i==-1&&g!==0)return d;if(!e.circular&&c<0||c>d.getSize()||c<-1)return d;var j=c;c.jquery?c=d.getItems().index(c):j=d.getItems().eq(c);var l=a.Event("onBeforeSeek");if(!k){m.trigger(l,[c,g]);if(l.isDefaultPrevented()||!j.length)return d}var n=h?{top:-j.position().top}:{left:-j.position().left};i=c,b=d,g===undefined&&(g=e.speed),f.animate(n,g,e.easing,k||function(){m.trigger("onSeek",[c])});return d}}),a.each(["onBeforeSeek","onSeek","onAddItem"],function(c,b){a.isFunction(e[b])&&a(d).bind(b,e[b]),d[b]=function(c){c&&a(d).bind(b,c);return d}});if(e.circular){var o=d.getItems().slice(-1).clone().prependTo(f),p=d.getItems().eq(1).clone().appendTo(f);o.add(p).addClass(e.clonedClass),d.onBeforeSeek(function(a,b,c){if(!a.isDefaultPrevented()){if(b==-1){d.seekTo(o,c,function(){d.end(0)});return a.preventDefault()}b==d.getSize()&&d.seekTo(p,c,function(){d.begin(0)})}});var n=g.parents().add(g).filter(function(){if(a(this).css("display")==="none")return!0});n.length?(n.show(),d.seekTo(0,0,function(){}),n.hide()):d.seekTo(0,0,function(){})}var j=c(g,e.prev).click(function(a){a.stopPropagation(),d.prev()}),k=c(g,e.next).click(function(a){a.stopPropagation(),d.next()});e.circular||(d.onBeforeSeek(function(b,a){setTimeout(function(){b.isDefaultPrevented()||(j.toggleClass(e.disabledClass,a<=0),k.toggleClass(e.disabledClass,a>=d.getSize()-1))},1)}),e.initialIndex||j.addClass(e.disabledClass)),d.getSize()<2&&j.add(k).addClass(e.disabledClass),e.mousewheel&&a.fn.mousewheel&&g.mousewheel(function(b,a){if(e.mousewheel){d.move(a<0?1:-1,e.wheelSpeed||50);return!1}});if(e.touch){var l={};f[0].ontouchstart=function(b){var a=b.touches[0];l.x=a.clientX,l.y=a.clientY},f[0].ontouchmove=function(a){if(a.touches.length==1&&!f.is(":animated")){var b=a.touches[0],c=l.x-b.clientX,e=l.y-b.clientY;d[h&&e>0||!h&&c>0?"next":"prev"](),a.preventDefault()}}}e.keyboard&&a(document).bind("keydown.scrollable",function(c){if(!(!e.keyboard||c.altKey||c.ctrlKey||c.metaKey||a(c.target).is(":input"))){if(e.keyboard!="static"&&b!=d)return;var f=c.keyCode;if(h&&(f==38||f==40)){d.move(f==38?-1:1);return c.preventDefault()}if(!h&&(f==37||f==39)){d.move(f==37?-1:1);return c.preventDefault()}}}),e.initialIndex&&d.seekTo(e.initialIndex,0,function(){})}a.fn.scrollable=function(c){var b=this.data("scrollable");if(b)return b;c=a.extend({},a.tools.scrollable.conf,c),this.each(function(){b=new d(a(this),c),a(this).data("scrollable",b)});return c.api?b:this}})(jQuery);(function(a){a.tools=a.tools||{version:"v1.2.6"},a.tools.tabs={conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialIndex:0,event:"click",rotate:!1,slideUpSpeed:400,slideDownSpeed:400,history:!1},addEffect:function(a,b){d[a]=b}};var d={"default":function(a,b){this.getPanes().hide().eq(a).show(),b.call()},fade:function(d,e){var b=this.getConf(),c=b.fadeOutSpeed,a=this.getPanes();c?a.fadeOut(c):a.hide(),a.eq(d).fadeIn(b.fadeInSpeed,e)},slide:function(b,c){var a=this.getConf();this.getPanes().slideUp(a.slideUpSpeed),this.getPanes().eq(b).slideDown(a.slideDownSpeed,c)},ajax:function(a,b){this.getPanes().eq(0).load(this.getTabs().eq(a).attr("href"),b)}},b,c;a.tools.tabs.addEffect("horizontal",function(g,d){if(!b){var e=this.getPanes().eq(g),f=this.getCurrentPane();c||(c=this.getPanes().eq(0).width()),b=!0,e.show(),f.animate({width:0},{step:function(a){e.css("width",c-a)},complete:function(){a(this).hide(),d.call(),b=!1}}),f.length||(d.call(),b=!1)}});function e(h,i,b){var c=this,j=h.add(this),e=h.find(b.tabs),f=i.jquery?i:h.children(i),g;e.length||(e=h.children()),f.length||(f=h.parent().find(i)),f.length||(f=a(i)),a.extend(this,{click:function(f,h){var i=e.eq(f);typeof f=="string"&&f.replace("#","")&&(i=e.filter("[href*="+f.replace("#","")+"]"),f=Math.max(e.index(i),0));if(b.rotate){var k=e.length-1;if(f<0)return c.click(k,h);if(f>k)return c.click(0,h)}if(!i.length){if(g>=0)return c;f=b.initialIndex,i=e.eq(f)}if(f===g)return c;h=h||a.Event(),h.type="onBeforeClick",j.trigger(h,[f]);if(!h.isDefaultPrevented()){d[b.effect].call(c,f,function(){g=f,h.type="onClick",j.trigger(h,[f])}),e.removeClass(b.current),i.addClass(b.current);return c}},getConf:function(){return b},getTabs:function(){return e},getPanes:function(){return f},getCurrentPane:function(){return f.eq(g)},getCurrentTab:function(){return e.eq(g)},getIndex:function(){return g},next:function(){return c.click(g+1)},prev:function(){return c.click(g-1)},destroy:function(){e.unbind(b.event).removeClass(b.current),f.find("a[href^=#]").unbind("click.T");return c}}),a.each("onBeforeClick,onClick".split(","),function(e,d){a.isFunction(b[d])&&a(c).bind(d,b[d]),c[d]=function(b){b&&a(c).bind(d,b);return c}}),b.history&&a.fn.history&&(a.tools.history.init(e),b.event="history"),e.each(function(d){a(this).bind(b.event,function(a){c.click(d,a);return a.preventDefault()})}),f.find("a[href^=#]").bind("click.T",function(b){c.click(a(this).attr("href"),b)}),location.hash&&b.tabs=="a"&&h.find("[href="+location.hash+"]").length?c.click(location.hash):(b.initialIndex===0||b.initialIndex>0)&&c.click(b.initialIndex)}a.fn.tabs=function(d,b){var c=this.data("tabs");c&&(c.destroy(),this.removeData("tabs")),a.isFunction(b)&&(b={onBeforeClick:b}),b=a.extend({},a.tools.tabs.conf,b),this.each(function(){c=new e(a(this),d,b),a(this).data("tabs",c)});return b.api?c:this}})(jQuery);(function(a){a.tools=a.tools||{version:"v1.2.6"},a.tools.tooltip={conf:{effect:"toggle",fadeOutSpeed:"fast",predelay:0,delay:30,opacity:1,tip:0,fadeIE:!1,position:["top","center"],offset:[0,0],relative:!1,cancelDefault:!0,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"<div/>",tipClass:"tooltip"},addEffect:function(a,c,d){b[a]=[c,d]}};var b={toggle:[function(c){var d=this.getConf(),a=this.getTip(),b=d.opacity;b<1&&a.css({opacity:b}),a.show(),c.call()},function(a){this.getTip().hide(),a.call()}],fade:[function(c){var b=this.getConf();!a.browser.msie||b.fadeIE?this.getTip().fadeTo(b.fadeInSpeed,b.opacity,c):(this.getTip().show(),c())},function(b){var c=this.getConf();!a.browser.msie||c.fadeIE?this.getTip().fadeOut(c.fadeOutSpeed,b):(this.getTip().hide(),b())}]};function c(b,g,c){var d=c.relative?b.position().top:b.offset().top,f=c.relative?b.position().left:b.offset().left,e=c.position[0];d-=g.outerHeight()-c.offset[0],f+=b.outerWidth()+c.offset[1],/iPad/i.test(navigator.userAgent)&&(d-=a(window).scrollTop());var h=g.outerHeight()+b.outerHeight();e=="center"&&(d+=h/2),e=="bottom"&&(d+=h),e=c.position[1];var i=g.outerWidth()+b.outerWidth();e=="center"&&(f-=i/2),e=="left"&&(f-=i);return{top:d,left:f}}function d(e,d){var f=this,j=e.add(f),g,l=0,m=0,k=e.attr("title"),n=e.attr("data-tooltip"),o=b[d.effect],i,p=e.is(":input"),r=p&&e.is(":checkbox, :radio, select, :button, :submit"),q=e.attr("type"),h=d.events[q]||d.events[p?r?"widget":"input":"def"];if(!o)throw'Nonexistent effect "'+d.effect+'"';h=h.split(/,\s*/);if(h.length!=2)throw"Tooltip: bad events configuration for "+q;e.bind(h[0],function(a){clearTimeout(l),d.predelay?m=setTimeout(function(){f.show(a)},d.predelay):f.show(a)}).bind(h[1],function(a){clearTimeout(m),d.delay?l=setTimeout(function(){f.hide(a)},d.delay):f.hide(a)}),k&&d.cancelDefault&&(e.removeAttr("title"),e.data("title",k)),a.extend(f,{show:function(b){if(!g){n?g=a(n):d.tip?g=a(d.tip).eq(0):k?g=a(d.layout).addClass(d.tipClass).appendTo(document.body).hide().append(k):(g=e.next(),g.length||(g=e.parent().next()));if(!g.length)throw"Cannot find tooltip for "+e;}if(f.isShown())return f;g.stop(!0,!0);var q=c(e,g,d);d.tip&&g.html(e.data("title")),b=a.Event(),b.type="onBeforeShow",j.trigger(b,[q]);if(b.isDefaultPrevented())return f;q=c(e,g,d),g.css({position:"absolute",top:q.top,left:q.left}),i=!0,o[0].call(f,function(){b.type="onShow",i="full",j.trigger(b)});var p=d.events.tooltip.split(/,\s*/);g.data("__set")||(g.unbind(p[0]).bind(p[0],function(){clearTimeout(l),clearTimeout(m)}),p[1]&&!e.is("input:not(:checkbox, :radio), textarea")&&g.unbind(p[1]).bind(p[1],function(a){a.relatedTarget!=e[0]&&e.trigger(h[1].split(" ")[0])}),d.tip||g.data("__set",!0));return f},hide:function(c){if(!g||!f.isShown())return f;c=a.Event(),c.type="onBeforeHide",j.trigger(c);if(!c.isDefaultPrevented()){i=!1,b[d.effect][1].call(f,function(){c.type="onHide",j.trigger(c)});return f}},isShown:function(a){return a?i=="full":i},getConf:function(){return d},getTip:function(){return g},getTrigger:function(){return e}}),a.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(c,b){a.isFunction(d[b])&&a(f).bind(b,d[b]),f[b]=function(c){c&&a(f).bind(b,c);return f}})}a.fn.tooltip=function(b){var c=this.data("tooltip");if(c)return c;b=a.extend(!0,{},a.tools.tooltip.conf,b),typeof b.position=="string"&&(b.position=b.position.split(/,?\s/)),this.each(function(){c=new d(a(this),b),a(this).data("tooltip",c)});return b.api?c:this}})(jQuery)
