(function(){function a(k){var f=jq("div.followersStat"),g=f.find("span.count"),j=parseInt(g.data("count"),10),c,l=jq("#followersModule"),m,n,d,i,h,b;if(k.type==="followStart"||k.type==="unfollowStart"||!k.success){if(k.type==="followStart"||k.type==="unfollowComplete"){j++}else{j--}if(j>=1000){if(j>9999){j=9999}c=Math.floor(j/1000)+"K";if(j%1000>0){c+="+"}}else{c=j}g.data("count",j);g.text(c);if(j===0){f.addClass("empty");if(f.parent().prop("tagName").toLowerCase()==="a"){f.parent().replaceWith(f)}}else{if(j===1){f.removeClass("empty");if(f.parent().prop("tagName").toLowerCase()!=="a"){m=jq("<a />").prop("href","#");n=f.replaceWith(m);m.append(n)}}}f.closest("a").attr("title",j+" followers")}if(l.length>0&&k.success&&(k.type==="unfollowComplete"||k.type==="followComplete")){i=jq("#headerProfilePic");b=i.attr("title");if(k.type==="unfollowComplete"){if(j===0){l.next().remove();l.remove()}else{l.find("div.userType[data-name="+b+"]").remove()}}else{if(k.type==="followComplete"){d=l.find("div.subscription");if(d.length>=5){d.last().remove()}h='<div data-name="'+b+'" class="subscription userType"><img src="'+i.attr("src")+'" title="'+b+'" width="15" height="15" class="profilePic loaded" /><a href="/profile/'+b+'" class="title">'+b+"</a></div>";d.first().before(h)}}}}jq(document).ready(function(){jq("a.followButton").live("followStart followComplete unfollowStart unfollowComplete",a)})}());jq(document).ready(function(){jq("div.stat.empty").mouseenter(function(a){var b=jq(a.target);if(!b.hasClass("stat")){b=b.closest(".stat")}if(!PB_isMobile){b.find(".mouseOver").show()}}).mouseleave(function(a){var b=jq(a.target);if(!b.hasClass("stat")){b=b.closest(".stat")}if(!PB_isMobile){b.find(".mouseOver").hide()}});if(PB_isMobile){jQuery(".userStats a").css("cursor","default")}});var FeaturedMedia=(function(){function c(){jq(this).find("div.detailsContainer").animate({height:"toggle"})}function a(f){var h=f.find("div.detailsContainer"),g;if(h&&h.length>0){f.hoverIntent(c,c)}f.click(function(){location.href=jq(this).data("href")});g=f.find("img");if(g.length>0){new PB.Util.ScaleImage({image:g[0],maxHeight:189,maxWidth:189})}}function b(){jq("div.featuredMedia div.mediaContainer").each(function(){a(jq(this))})}function e(h){var g=h.response,f=jq("#"+g.type+"FeaturedMedia");if(g.stat==="ok"){f.replaceWith(g.featuredBoxHTML);f=jq("#"+g.type+"FeaturedMedia");a(f.find("div.mediaContainer"))}else{f.find("div.innerContent").removeClass("loading").text("There was an error retrieving the most "+g.type+" media.")}}function d(g,f){var h={type:f};jq.ajax({url:"/profile/"+g+"/loadFeaturedMedia",data:h,dataType:"json",success:e})}Event.observe(document,PB.EVENT.PAGE_LOADED,b);return{load:d}}());var MediaStatsController=(function(){function c(){if(typeof LikeButtonController!=="undefined"){jq(document).bind(LikeButtonController.EVENT.CHANGED,b)}if(typeof CommentsController!=="undefined"){jq(document).bind(CommentsController.EVENT.CHANGED,a)}if(typeof CommentController!=="undefined"){jq(document).bind(CommentController.EVENT.CHANGED,a)}}function b(e){var d=jq('ul.mediaStats[data-mediaurl="'+e.mediaurl+'"] li.likeCount');d.each(function(){var f=parseInt(jq(this).html())+e.diff;if(jq.browser.msie&&jq.browser.version<9){jq(this).text(f)}else{jq(this).fadeOut("slow",function(){jq(this).text(f).fadeIn("slow")})}})}function a(e){var d=jq("ul.mediaStats .commentCount");jq(d).each(function(f,j){var k=jq(j);if(k.parent().data("mediaurl")==e.mediaurl){var h=e.count;var g=h==1?" comment":" comments";k.attr("title",h+g);if(jq.browser.msie&&jq.browser.version<9){k.text(e.count)}else{k.fadeOut("slow",function(){k.text(e.count).fadeIn("slow")})}}})}jq(document).ready(function(){c()});return{}}());var LikersTooltipController=(function(){var f=false;var a="<div class ='likerstooltip'><div class='loading'></div></div>";function e(){jq(".likerslink").live("mouseenter click",function(h){var g=jq(this);if(typeof g.qtip("api")==="undefined"){g.qtip({content:{title:{text:g.attr("title")},text:a},suppress:false,style:{width:400},show:{event:"click",solo:true},hide:{event:"click",fixed:true,leave:false},position:{my:"top left",at:"bottom center",adjust:{x:-(g.outerWidth()/2)}},events:{show:function(j,i){if(typeof ProfilePicture!=="undefined"){ProfilePicture.loadProfilePics()}qtipId=g.qtip("option","id");if(jq("#fancyclose-"+qtipId).length==0){jq("#ui-tooltip-"+qtipId).append('<a href="javascript:void(0)" id="fancyclose-'+qtipId+'" title="close" class="icon fancyclose"></a>');jq("#fancyclose-"+qtipId).click(function(){g.qtip("hide")})}jq("#ui-tooltip-"+qtipId).css("cursor","pointer");jq("#widthPage").one("click",function(){g.qtip("hide")});jq(g.data("tracking")).each(function(l,k){tr(k)})}}});if(!f){b(g)}}else{if(g.qtip("api").rendered&&g.data("dirty")&&!f){g.qtip("api").set("content.text",a);b(g)}}});jq(".likerstooltip .isliked a.likebutton").live("click",function(){jq(this).closest("div.isliked").fadeOut("slow");jq(this).closest("div.qtip").css("cursor","progress")});jq(".likerstooltip .isliked a.likebutton.liked").live({mouseover:function(){var g=jq(this).closest(".isliked");jq(".likedtext",g).hide();jq(".unliketext",g).show()},mouseout:function(){var g=jq(this).closest(".isliked");jq(".unliketext",g).hide();jq(".likedtext",g).show()}});if(typeof LikeButtonController!=="undefined"){jq(document).bind(LikeButtonController.EVENT.CHANGED,d)}if(typeof FollowController!="undefined"){jq(document).bind("followComplete unfollowComplete ",c)}}function b(i){f=true;var h=i.data("mediaurl");var g=i.data("exclude");jq.ajax({url:"/like/getLikers",dataType:"jsonp",type:"post",data:{mediaurl:h,exclude:g},success:function(j){if(j.response.stat=="ok"&&j.response.count>0){i.data("dirty",false);i.qtip("api").set("content.text",j.response.content);if(i.qtip("api").rendered){if(typeof ProfilePicture!=="undefined"){ProfilePicture.loadProfilePics()}}}f=false},error:function(l,j,k){}})}function d(h){var g=jq('a.likerslink[data-mediaurl="'+h.mediaurl+'"]');g.each(function(){var i=jq(this);var j=parseInt(i.attr("title").split(" ")[0]);if(j>0){var k=j+h.diff;if(k==0){i.qtip("destroy");i.attr("title","0 likes")}else{i.qtip("hide");i.data("dirty",true);if(k==1){i.attr("title","1 person likes this")}else{i.attr("title",k+" people like this")}if(typeof i.qtip("api")!=="undefined"&&i.qtip("api").rendered){i.qtip("api").set("content.title.text",i.attr("title"))}}}})}function c(h){var i=jq('a.likerslink[aria-describedby="'+jq(h.target).closest("div.qtip").attr("id")+'"]');i.data("dirty",true);var g=jq("a.likerslink").not(i);g.each(function(){var j=jq(this);j.data("dirty",true)})}jq(document).ready(function(){e()});return{}}());(function(f,j,g){var i=true,r=false,y=null,q,p,b,x={},k="ui-tooltip",d="ui-widget",e="ui-state-disabled",s="div.qtip."+k,l=k+"-default",z=k+"-focus",c=k+"-hover",u=k+"-fluid",o="-31000px",w="_replacedByqTip",n="oldtitle",m;function h(){h.history=h.history||[];h.history.push(arguments);if("object"===typeof console){var C=console[console.warn?"warn":"log"],B=Array.prototype.slice.call(arguments),A;if(typeof arguments[0]==="string"){B[0]="qTip2: "+B[0]}A=C.apply?C.apply(console,B):C(B)}}function a(B){var A;if(!B||"object"!==typeof B){return r}if("object"!==typeof B.metadata){B.metadata={type:B.metadata}}if("content" in B){if("object"!==typeof B.content||B.content.jquery){B.content={text:B.content}}A=B.content.text||r;if(!f.isFunction(A)&&((!A&&!A.attr)||A.length<1||("object"===typeof A&&!A.jquery))){B.content.text=r}if("title" in B.content){if("object"!==typeof B.content.title){B.content.title={text:B.content.title}}A=B.content.title.text||r;if(!f.isFunction(A)&&((!A&&!A.attr)||A.length<1||("object"===typeof A&&!A.jquery))){B.content.title.text=r}}}if("position" in B){if("object"!==typeof B.position){B.position={my:B.position,at:B.position}}}if("show" in B){if("object"!==typeof B.show){if(B.show.jquery){B.show={target:B.show}}else{B.show={event:B.show}}}}if("hide" in B){if("object"!==typeof B.hide){if(B.hide.jquery){B.hide={target:B.hide}}else{B.hide={event:B.hide}}}}if("style" in B){if("object"!==typeof B.style){B.style={classes:B.style}}}f.each(p,function(){if(this.sanitize){this.sanitize(B)}});return B}function v(W,C,Q,R){var P=this,L=document.body,I=k+"-"+Q,D=0,V=0,E=f(),M=".qtip-"+Q,N,O;P.id=Q;P.rendered=r;P.elements=N={target:W};P.timers={img:{}};P.options=C;P.checks={};P.plugins={};P.cache=O={event:{},target:f(),disabled:r,attr:R};function F(Z){var X=0,ab,Y=C,aa=Z.split(".");while(Y=Y[aa[X++]]){if(X<aa.length){ab=Y}}return[ab||C,aa.pop()]}function U(){var X=C.style.widget;E.toggleClass(d,X).toggleClass(l,!X);N.content.toggleClass(d+"-content",X);if(N.titlebar){N.titlebar.toggleClass(d+"-header",X)}if(N.button){N.button.toggleClass(k+"-icon",!X)}}function A(X){if(N.title){N.titlebar.remove();N.titlebar=N.title=N.button=y;if(X!==r){P.reposition()}}}function S(){var Y=C.content.title.button,X=typeof Y==="string",Z=X?Y:"Close tooltip";if(N.button){N.button.remove()}if(Y.jquery){N.button=Y}else{N.button=f("<a />",{"class":"ui-state-default "+(C.style.widget?"":k+"-icon"),title:Z,"aria-label":Z}).prepend(f("<span />",{"class":"ui-icon ui-icon-close",html:"&times;"}))}N.button.appendTo(N.titlebar).attr("role","button").hover(function(aa){f(this).toggleClass("ui-state-hover",aa.type==="mouseenter")}).click(function(aa){if(!E.hasClass(e)){P.hide(aa)}return r}).bind("mousedown keydown mouseup keyup mouseout",function(aa){f(this).toggleClass("ui-state-active ui-state-focus",aa.type.substr(-4)==="down")});P.redraw()}function H(){var X=I+"-title";if(N.titlebar){A()}N.titlebar=f("<div />",{"class":k+"-titlebar "+(C.style.widget?"ui-widget-header":"")}).append(N.title=f("<div />",{id:X,"class":k+"-title","aria-atomic":i})).insertBefore(N.content);if(C.content.title.button){S()}else{if(P.rendered){P.redraw()}}}function K(X){var Y=N.button,Z=N.title;if(!P.rendered){return r}if(!X){Y.remove()}else{if(!Z){H()}S()}}function T(Z,X){var Y=N.title;if(!P.rendered||!Z){return r}if(f.isFunction(Z)){Z=Z.call(W,O.event,P)}if(Z===r){return A(r)}else{if(Z.jquery&&Z.length>0){Y.empty().append(Z.css({display:"block"}))}else{Y.html(Z)}}P.redraw();if(X!==r&&P.rendered&&E.is(":visible")){P.reposition(O.event)}}function J(Z,X){var Y=N.content;if(!P.rendered||!Z){return r}if(f.isFunction(Z)){Z=Z.call(W,O.event,P)||""}if(Z.jquery&&Z.length>0){Y.empty().append(Z.css({display:"block"}))}else{Y.html(Z)}function aa(ac){var ab,ad={};function ae(af){if(af){delete ad[af.src];clearTimeout(P.timers.img[af.src]);f(af).unbind(M)}if(f.isEmptyObject(ad)){P.redraw();if(X!==r){P.reposition(O.event)}ac()}}if((ab=Y.find("img:not([height]):not([width])")).length===0){return ae()}ab.each(function(af,ag){if(ad[ag.src]!==g){return}(function ah(){if(ag.height||ag.width){return ae(ag)}P.timers.img[ag.src]=setTimeout(ah,700)}());f(ag).bind("error"+M+" load"+M,function(){ae(this)});ad[ag.src]=ag})}if(P.rendered<0){E.queue("fx",aa)}else{V=0;aa(f.noop)}return P}function B(){var aa=C.position,Y={show:C.show.target,hide:C.hide.target,viewport:f(aa.viewport),document:f(document),window:f(j)},Z={show:f.trim(""+C.show.event).split(" "),hide:f.trim(""+C.hide.event).split(" ")},X=f.browser.msie&&parseInt(f.browser.version,10)===6;function ac(af){if(E.hasClass(e)){return r}Y.show.trigger("qtip-"+Q+"-inactive");clearTimeout(P.timers.show);clearTimeout(P.timers.hide);var ag=function(){P.toggle(i,af)};if(C.show.delay>0){P.timers.show=setTimeout(ag,C.show.delay)}else{ag()}}function ab(ai){if(E.hasClass(e)||D||V){return r}var ag=f(ai.relatedTarget||ai.target),af=ag.closest(s)[0]===E[0],ah=ag[0]===Y.show[0];clearTimeout(P.timers.show);clearTimeout(P.timers.hide);if((aa.target==="mouse"&&af)||(C.hide.fixed&&((/mouse(out|leave|move)/).test(ai.type)&&(af||ah)))){ai.preventDefault();ai.stopImmediatePropagation();return}if(C.hide.delay>0){P.timers.hide=setTimeout(function(){P.hide(ai)},C.hide.delay)}else{P.hide(ai)}}function ad(af){if(E.hasClass(e)){return r}clearTimeout(P.timers.inactive);P.timers.inactive=setTimeout(function(){P.hide(af)},C.hide.inactive)}function ae(af){if(E.is(":visible")){P.reposition(af)}}E.bind("mouseenter"+M+" mouseleave"+M,function(af){var ag=af.type==="mouseenter";if(ag){P.focus(af)}E.toggleClass(c,ag)});if(C.hide.fixed){Y.hide=Y.hide.add(E);E.bind("mouseover"+M,function(){if(!E.hasClass(e)){clearTimeout(P.timers.hide)}})}if(/mouse(out|leave)/i.test(C.hide.event)){if(C.hide.leave==="window"){Y.window.bind("mouseout"+M,function(af){if(/select|option/.test(af.target)&&!af.relatedTarget){P.hide(af)}})}}else{if(/mouse(over|enter)/i.test(C.show.event)){Y.hide.bind("mouseleave"+M,function(af){clearTimeout(P.timers.show)})}}if((""+C.hide.event).indexOf("unfocus")>-1){Y.document.bind("mousedown"+M,function(ah){var af=f(ah.target),ag=!E.hasClass(e)&&E.is(":visible");if(af[0]!==E[0]&&af.parents(s).length===0&&af.add(W).length>1){P.hide(ah)}})}if("number"===typeof C.hide.inactive){Y.show.bind("qtip-"+Q+"-inactive",ad);f.each(q.inactiveEvents,function(af,ag){Y.hide.add(N.tooltip).bind(ag+M+"-inactive",ad)})}f.each(Z.hide,function(ag,ah){var af=f.inArray(ah,Z.show),ai=f(Y.hide);if((af>-1&&ai.add(Y.show).length===ai.length)||ah==="unfocus"){Y.show.bind(ah+M,function(aj){if(E.is(":visible")){ab(aj)}else{ac(aj)}});delete Z.show[af]}else{Y.hide.bind(ah+M,ab)}});f.each(Z.show,function(af,ag){Y.show.bind(ag+M,ac)});if("number"===typeof C.hide.distance){Y.show.add(E).bind("mousemove"+M,function(ai){var ah=O.origin||{},ag=C.hide.distance,af=Math.abs;if(af(ai.pageX-ah.pageX)>=ag||af(ai.pageY-ah.pageY)>=ag){P.hide(ai)}})}if(aa.target==="mouse"){Y.show.bind("mousemove"+M,function(af){b={pageX:af.pageX,pageY:af.pageY,type:"mousemove"}});if(aa.adjust.mouse){if(C.hide.event){E.bind("mouseleave"+M,function(af){if((af.relatedTarget||af.target)!==Y.show[0]){P.hide(af)}})}Y.document.bind("mousemove"+M,function(af){if(!E.hasClass(e)&&E.is(":visible")){P.reposition(af||b)}})}}if(aa.adjust.resize||Y.viewport.length){(f.event.special.resize?Y.viewport:Y.window).bind("resize"+M,ae)}if(Y.viewport.length||(X&&E.css("position")==="fixed")){Y.viewport.bind("scroll"+M,ae)}}function G(){var X=[C.show.target[0],C.hide.target[0],P.rendered&&N.tooltip[0],C.position.container[0],C.position.viewport[0],j,document];if(P.rendered){f([]).pushStack(f.grep(X,function(Y){return typeof Y==="object"})).unbind(M)}else{C.show.target.unbind(M+"-create")}}P.checks.builtin={"^id$":function(Z,aa,X){var ab=X===i?q.nextid:X,Y=k+"-"+ab;if(ab!==r&&ab.length>0&&!f("#"+Y).length){E[0].id=Y;N.content[0].id=Y+"-content";N.title[0].id=Y+"-title"}},"^content.text$":function(Y,Z,X){J(X)},"^content.title.text$":function(Y,Z,X){if(!X){return A()}if(!N.title&&X){H()}T(X)},"^content.title.button$":function(Y,Z,X){K(X)},"^position.(my|at)$":function(Y,Z,X){if("string"===typeof X){Y[Z]=new p.Corner(X)}},"^position.container$":function(Y,Z,X){if(P.rendered){E.appendTo(X)}},"^show.ready$":function(){if(!P.rendered){P.render(1)}else{P.toggle(i)}},"^style.classes$":function(Y,Z,X){E.attr("class",k+" qtip ui-helper-reset "+X)},"^style.widget|content.title":U,"^events.(render|show|move|hide|focus|blur)$":function(Y,Z,X){E[(f.isFunction(X)?"":"un")+"bind"]("tooltip"+Z,X)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){var X=C.position;E.attr("tracking",X.target==="mouse"&&X.adjust.mouse);G();B()}};f.extend(P,{render:function(X){if(P.rendered){return P}var Z=C.content.title.text,Y=C.position,aa=f.Event("tooltiprender");f.attr(W[0],"aria-describedby",I);E=N.tooltip=f("<div/>",{id:I,"class":k+" qtip ui-helper-reset "+l+" "+C.style.classes+" "+k+"-pos-"+C.position.my.abbreviation(),width:C.style.width||"",height:C.style.height||"",tracking:Y.target==="mouse"&&Y.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":r,"aria-describedby":I+"-content","aria-hidden":i}).toggleClass(e,O.disabled).data("qtip",P).appendTo(C.position.container).append(N.content=f("<div />",{"class":k+"-content",id:I+"-content","aria-atomic":i}));N.tip=f("<div />",{"class":"ui-tooltip-tip"}).appendTo(E);P.rendered=-1;V=1;D=1;if(Z){H();T(Z,r)}J(C.content.text,r);P.rendered=i;U();f.each(C.events,function(ab,ac){if(f.isFunction(ac)){E.bind(ab==="toggle"?"tooltipshow tooltiphide":"tooltip"+ab,ac)}});f.each(p,function(){if(this.initialize==="render"){this(P)}});B();E.queue("fx",function(ab){aa.originalEvent=O.event;E.trigger(aa,[P]);V=0;D=0;P.redraw();if(C.show.ready||X){P.toggle(i,O.event)}ab()});return P},get:function(Y){var X,Z;switch(Y.toLowerCase()){case"dimensions":X={height:E.outerHeight(),width:E.outerWidth()};break;case"offset":X=p.offset(E,C.position.container);break;default:Z=F(Y.toLowerCase());X=Z[0][Z[1]];X=X.precedance?X.string():X;break}return X},set:function(aa,ab){var Z=/^position\.(my|at|adjust|target|container)|style|content|show\.ready/i,ac=/^content\.(title|attr)|style/i,ad=r,af=r,Y=P.checks,X;function ae(aj,ah){var ai,ak,ag;for(ai in Y){for(ak in Y[ai]){if(ag=(new RegExp(ak,"i")).exec(aj)){ah.push(ag);Y[ai][ak].apply(P,ah)}}}}if("string"===typeof aa){X=aa;aa={};aa[X]=ab}else{aa=f.extend(i,{},aa)}f.each(aa,function(ah,ai){var aj=F(ah.toLowerCase()),ag;ag=aj[0][aj[1]];aj[0][aj[1]]="object"===typeof ai&&ai.nodeType?f(ai):ai;aa[ah]=[aj[0],aj[1],ai,ag];ad=Z.test(ah)||ad;af=ac.test(ah)||af});a(C);D=V=1;f.each(aa,ae);D=V=0;if(E.is(":visible")&&P.rendered){if(ad){P.reposition(C.position.target==="mouse"?y:O.event)}if(af){P.redraw()}}return P},toggle:function(Z,aa){if(!P.rendered){if(Z){P.render(1)}else{return P}}var af=Z?"show":"hide",X=C[af],ab=E.is(":visible"),ac=!aa||C[af].target.length<2||O.target[0]===aa.target,ah=C.position,ad=C.content,ae,ag;if((typeof Z).search("boolean|number")){Z=!ab}if(!E.is(":animated")&&ab===Z&&ac){return P}if(aa){if((/over|enter/).test(aa.type)&&(/out|leave/).test(O.event.type)&&aa.target===C.show.target[0]&&E.has(aa.relatedTarget).length){return P}O.event=f.extend({},aa)}ag=f.Event("tooltip"+af);ag.originalEvent=aa?O.event:y;E.trigger(ag,[P,90]);if(ag.isDefaultPrevented()){return P}f.attr(E[0],"aria-hidden",!!!Z);if(Z){O.origin=f.extend({},b);P.focus(aa);if(f.isFunction(ad.text)){J(ad.text,r)}if(f.isFunction(ad.title.text)){T(ad.title.text,r)}if(!m&&ah.target==="mouse"&&ah.adjust.mouse){f(document).bind("mousemove.qtip",function(ai){b={pageX:ai.pageX,pageY:ai.pageY,type:"mousemove"}});m=i}P.reposition(aa);if(X.solo){f(s,X.solo).not(E).qtip("hide",ag)}}else{clearTimeout(P.timers.show);delete O.origin;if(m&&!f(s+'[tracking="true"]:visible',X.solo).not(E).length){f(document).unbind("mousemove.qtip");m=r}P.blur(aa)}function Y(){if(Z){if(f.browser.msie){E[0].style.removeAttribute("filter")}E.css("overflow","");if("string"===typeof X.autofocus){f(X.autofocus,E).focus()}ag=f.Event("tooltipvisible");ag.originalEvent=aa?O.event:y;E.trigger(ag,[P])}else{E.css({display:"",visibility:"",opacity:"",left:"",top:""})}}if(ac){E.stop(0,1)}if(X.effect===r){E[af]();Y.call(E)}else{if(f.isFunction(X.effect)){X.effect.call(E,P);E.queue("fx",function(ai){Y();ai()})}else{E.fadeTo(90,Z?1:0,Y)}}if(Z){X.target.trigger("qtip-"+Q+"-inactive")}return P},show:function(X){return P.toggle(i,X)},hide:function(X){return P.toggle(r,X)},focus:function(ab){if(!P.rendered){return P}var ac=f(s),Z=parseInt(E[0].style.zIndex,10),Y=q.zindex+ac.length,aa=f.extend({},ab),X,ad;if(!E.hasClass(z)){ad=f.Event("tooltipfocus");ad.originalEvent=aa;E.trigger(ad,[P,Y]);if(!ad.isDefaultPrevented()){if(Z!==Y){ac.each(function(){if(this.style.zIndex>Z){this.style.zIndex=this.style.zIndex-1}});ac.filter("."+z).qtip("blur",aa)}E.addClass(z)[0].style.zIndex=Y}}return P},blur:function(Y){var X=f.extend({},Y),Z;E.removeClass(z);Z=f.Event("tooltipblur");Z.originalEvent=X;E.trigger(Z,[P]);return P},reposition:function(ak,ah){if(!P.rendered||D){return P}D=1;var ao=C.position.target,an=C.position,af=an.my,ag=an.at,ai=an.adjust,Y=ai.method.split(" "),al=E.outerWidth(),aj=E.outerHeight(),ac=0,ad=0,ab=f.Event("tooltipmove"),aa=E.css("position")==="fixed",am=an.viewport,ap={left:0,top:0},Z=r,ae=P.plugins.tip,X={horizontal:Y[0],vertical:(Y[1]=Y[1]||Y[0]),enabled:am.jquery&&ao[0]!==j&&ao[0]!==L&&ai.method!=="none",left:function(aw){var ar=X.horizontal==="shift",av=am.offset.left+am.scrollLeft,at=af.x==="left"?al:af.x==="right"?-al:-al/2,aq=ag.x==="left"?ac:ag.x==="right"?-ac:-ac/2,ay=ae&&ae.size?ae.size.width||0:0,aB=ae&&ae.corner&&ae.corner.precedance==="x"&&!ar?ay:0,aA=av-aw+aB,au=aw+al-am.width-av+aB,ax=at-(af.precedance==="x"||af.x===af.y?aq:0),az=af.x==="center";if(ar){aB=ae&&ae.corner&&ae.corner.precedance==="y"?ay:0;ax=(af.x==="left"?1:-1)*at-aB;ap.left+=aA>0?aA:au>0?-au:0;ap.left=Math.max(am.offset.left+(aB&&ae.corner.x==="center"?ae.offset:0),aw-ax,Math.min(Math.max(am.offset.left+am.width,aw+ax),ap.left))}else{if(aA>0&&(af.x!=="left"||au>0)){ap.left-=ax}else{if(au>0&&(af.x!=="right"||aA>0)){ap.left-=az?-ax:ax}}if(ap.left!==aw&&az){ap.left-=ai.x}if(ap.left<av&&-ap.left>au){ap.left=aw}}return ap.left-aw},top:function(ay){var ar=X.vertical==="shift",aw=am.offset.top+am.scrollTop,at=af.y==="top"?aj:af.y==="bottom"?-aj:-aj/2,az=ag.y==="top"?ad:ag.y==="bottom"?-ad:-ad/2,aq=ae&&ae.size?ae.size.height||0:0,aB=ae&&ae.corner&&ae.corner.precedance==="y"&&!ar?aq:0,au=aw-ay+aB,av=ay+aj-am.height-aw+aB,ax=at-(af.precedance==="y"||af.x===af.y?az:0),aA=af.y==="center";if(ar){aB=ae&&ae.corner&&ae.corner.precedance==="x"?aq:0;ax=(af.y==="top"?1:-1)*at-aB;ap.top+=au>0?au:av>0?-av:0;ap.top=Math.max(am.offset.top+(aB&&ae.corner.x==="center"?ae.offset:0),ay-ax,Math.min(Math.max(am.offset.top+am.height,ay+ax),ap.top))}else{if(au>0&&(af.y!=="top"||av>0)){ap.top-=ax}else{if(av>0&&(af.y!=="bottom"||au>0)){ap.top-=aA?-ax:ax}}if(ap.top!==ay&&aA){ap.top-=ai.y}if(ap.top<0&&-ap.top>av){ap.top=ay}}return ap.top-ay}};if(f.isArray(ao)&&ao.length===2){ag={x:"left",y:"top"};ap={left:ao[0],top:ao[1]}}else{if(ao==="mouse"&&((ak&&ak.pageX)||O.event.pageX)){ag={x:"left",y:"top"};ak=(ak&&(ak.type==="resize"||ak.type==="scroll")?O.event:ak&&ak.pageX&&ak.type==="mousemove"?ak:b&&b.pageX&&(ai.mouse||!ak||!ak.pageX)?{pageX:b.pageX,pageY:b.pageY}:!ai.mouse&&O.origin&&O.origin.pageX?O.origin:ak)||ak||O.event||b||{};ap={top:ak.pageY,left:ak.pageX}}else{if(ao==="event"){if(ak&&ak.target&&ak.type!=="scroll"&&ak.type!=="resize"){ao=O.target=f(ak.target)}else{ao=O.target}}else{O.target=f(ao)}ao=f(ao).eq(0);if(ao.length===0){return P}else{if(ao[0]===document||ao[0]===j){ac=p.iOS?j.innerWidth:ao.width();ad=p.iOS?j.innerHeight:ao.height();if(ao[0]===j){ap={top:!aa||p.iOS?(am||ao).scrollTop():0,left:!aa||p.iOS?(am||ao).scrollLeft():0}}}else{if(ao.is("area")&&p.imagemap){ap=p.imagemap(ao,ag,X.enabled?Y:r)}else{if(ao[0].namespaceURI==="http://www.w3.org/2000/svg"&&p.svg){ap=p.svg(ao,ag)}else{ac=ao.outerWidth();ad=ao.outerHeight();ap=p.offset(ao,an.container,aa)}}}}if(ap.offset){ac=ap.width;ad=ap.height;Z=ap.flipoffset;ap=ap.offset}else{ap.left+=ag.x==="right"?ac:ag.x==="center"?ac/2:0;ap.top+=ag.y==="bottom"?ad:ag.y==="center"?ad/2:0}}}ap.left+=ai.x+(af.x==="right"?-al:af.x==="center"?-al/2:0);ap.top+=ai.y+(af.y==="bottom"?-aj:af.y==="center"?-aj/2:0);if(X.enabled){am={elem:am,height:am[(am[0]===j?"h":"outerH")+"eight"](),width:am[(am[0]===j?"w":"outerW")+"idth"](),scrollLeft:aa?0:am.scrollLeft(),scrollTop:aa?0:am.scrollTop(),offset:am.offset()||{left:0,top:0}};ap.adjusted={left:X.horizontal!=="none"?X.left(ap.left):0,top:X.vertical!=="none"?X.top(ap.top):0};if(ap.adjusted.left+ap.adjusted.top){E.attr("class",function(aq,ar){return ar.replace(/ui-tooltip-pos-\w+/i,k+"-pos-"+af.abbreviation())})}if(Z&&ap.adjusted.left){ap.left+=Z.left}if(Z&&ap.adjusted.top){ap.top+=Z.top}}else{ap.adjusted={left:0,top:0}}ab.originalEvent=f.extend({},ak);E.trigger(ab,[P,ap,am.elem||am]);if(ab.isDefaultPrevented()){return P}delete ap.adjusted;if(ah===r||isNaN(ap.left)||isNaN(ap.top)||ao==="mouse"||!f.isFunction(an.effect)){E.css(ap)}else{if(f.isFunction(an.effect)){an.effect.call(E,P,f.extend({},ap));E.queue(function(aq){f(this).css({opacity:"",height:""});if(f.browser.msie){this.style.removeAttribute("filter")}aq()})}}D=0;return P},redraw:function(){if(P.rendered<1||V){return P}var Y=C.position.container,aa,ab,X,Z;V=1;if(C.style.height){E.css("height",C.style.height)}if(C.style.width){E.css("width",C.style.width)}else{E.css("width","").addClass(u);ab=E.width()+1;X=E.css("max-width")||"";Z=E.css("min-width")||"";aa=(X+Z).indexOf("%")>-1?Y.width()/100:0;X=((X.indexOf("%")>-1?aa:1)*parseInt(X,10))||ab;Z=((Z.indexOf("%")>-1?aa:1)*parseInt(Z,10))||0;ab=X+Z?Math.min(Math.max(ab,Z),X):ab;E.css("width",Math.round(ab)).removeClass(u)}V=0;return P},disable:function(X){if("boolean"!==typeof X){X=!(E.hasClass(e)||O.disabled)}if(P.rendered){E.toggleClass(e,X);f.attr(E[0],"aria-disabled",X)}else{O.disabled=!!X}return P},enable:function(){return P.disable(r)},destroy:function(){var X=W[0],Y=f.attr(X,n);if(P.rendered){E.remove();f.each(P.plugins,function(){if(this.destroy){this.destroy()}})}clearTimeout(P.timers.show);clearTimeout(P.timers.hide);G();f.removeData(X,"qtip");if(C.suppress&&Y){f.attr(X,"title",Y);W.removeAttr(n)}W.removeAttr("aria-describedby").unbind(".qtip");delete x[P.id];return W}})}function t(B,A){var E,N,I,C,L,D=f(this),F=f(document.body),K=this===document?F:D,J=(D.metadata)?D.metadata(A.metadata):y,M=A.metadata.type==="html5"&&J?J[A.metadata.name]:y,G=D.data(A.metadata.name||"qtipopts");try{G=typeof G==="string"?(new Function("return "+G))():G}catch(H){h("Unable to parse HTML5 attribute data: "+G)}C=f.extend(i,{},q.defaults,A,typeof G==="object"?a(G):y,a(M||J));N=C.position;C.id=B;if("boolean"===typeof C.content.text){I=D.attr(C.content.attr);if(C.content.attr!==r&&I){C.content.text=I}else{h("Unable to locate content for tooltip! Aborting render of tooltip on element: ",D);return r}}if(N.container===r){N.container=F}if(N.target===r){N.target=K}if(C.show.target===r){C.show.target=K}if(C.show.solo===i){C.show.solo=F}if(C.hide.target===r){C.hide.target=K}if(C.position.viewport===i){C.position.viewport=N.container}N.at=new p.Corner(N.at);N.my=new p.Corner(N.my);if(f.data(this,"qtip")){if(C.overwrite){D.qtip("destroy")}else{if(C.overwrite===r){return r}}}if(C.suppress&&(L=f.attr(this,"title"))){f(this).removeAttr("title").attr(n,L)}E=new v(D,C,B,!!I);f.data(this,"qtip",E);D.bind("remove.qtip",function(){E.destroy()});return E}q=f.fn.qtip=function(B,F,G){var H=(""+B).toLowerCase(),E=y,A=H==="disable"?[i]:f.makeArray(arguments).slice(1),D=A[A.length-1],C=this[0]?f.data(this[0],"qtip"):y;if((!arguments.length&&C)||H==="api"){return C}else{if("string"===typeof B){this.each(function(){var I=f.data(this,"qtip");if(!I){return i}if(D&&D.timeStamp){I.cache.event=D}if((H==="option"||H==="options")&&F){if(f.isPlainObject(F)||G!==g){I.set(F,G)}else{E=I.get(F);return r}}else{if(I[H]){I[H].apply(I[H],A)}}});return E!==y?E:this}else{if("object"===typeof B||!arguments.length){C=a(f.extend(i,{},B));return q.bind.call(this,C,D)}}}};q.bind=function(B,A){return this.each(function(F){var D,C,E,H,G,J;J=f.isArray(B.id)?B.id[F]:B.id;J=!J||J===r||J.length<1||x[J]?q.nextid++:(x[J]=J);H=".qtip-"+J+"-create";G=t.call(this,J,B);if(G===r){return i}D=G.options;f.each(p,function(){if(this.initialize==="initialize"){this(G)}});C={show:D.show.target,hide:D.hide.target};E={show:f.trim(""+D.show.event).replace(/ /g,H+" ")+H,hide:f.trim(""+D.hide.event).replace(/ /g,H+" ")+H};if(/mouse(over|enter)/i.test(E.show)&&!/mouse(out|leave)/i.test(E.hide)){E.hide+=" mouseleave"+H}C.show.bind("mousemove"+H,function(K){b={pageX:K.pageX,pageY:K.pageY,type:"mousemove"}});function I(L){function K(){G.render(typeof L==="object"||D.show.ready);C.show.add(C.hide).unbind(H)}if(G.cache.disabled){return r}G.cache.event=f.extend({},L);G.cache.target=L?f(L.target):[g];if(D.show.delay>0){clearTimeout(G.timers.show);G.timers.show=setTimeout(K,D.show.delay);if(E.show!==E.hide){C.hide.bind(E.hide,function(){clearTimeout(G.timers.show)})}}else{K()}}C.show.bind(E.show,I);if(D.show.ready||D.prerender){I(A)}})};p=q.plugins={Corner:function(A){A=(""+A).replace(/([A-Z])/," $1").replace(/middle/gi,"center").toLowerCase();this.x=(A.match(/left|right/i)||A.match(/center/)||["inherit"])[0].toLowerCase();this.y=(A.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase();this.precedance=(A.charAt(0).search(/^(t|b)/)>-1)?"y":"x";this.string=function(){return this.precedance==="y"?this.y+this.x:this.x+this.y};this.abbreviation=function(){var B=this.x.substr(0,1),C=this.y.substr(0,1);return B===C?B:(B==="c"||(B!=="c"&&C!=="c"))?C+B:B+C}},offset:function(C,A,D){var F=C.offset(),H=A,I=0,E=document.body,B;function G(K,J){F.left+=J*K.scrollLeft();F.top+=J*K.scrollTop()}if(H){do{if(H.css("position")!=="static"){B=H[0]===E?{left:parseInt(H.css("left"),10)||0,top:parseInt(H.css("top"),10)||0}:H.position();F.left-=B.left+(parseInt(H.css("borderLeftWidth"),10)||0)+(parseInt(H.css("marginLeft"),10)||0);F.top-=B.top+(parseInt(H.css("borderTopWidth"),10)||0);I++}if(H[0]===E){break}}while(H=H.offsetParent());if(A[0]!==E&&I>1){G(A,1)}if((p.iOS<4.1&&p.iOS>3.1)||(!p.iOS&&D)){G(f(j),-1)}}return F},iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,3})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_","."))||r,fn:{attr:function(A,E){if(this.length){var B=this[0],D="title",C=f.data(B,"qtip");if(A===D&&C&&"object"===typeof C&&C.options.suppress){if(arguments.length<2){return f.attr(B,n)}else{if(C&&C.options.content.attr===D&&C.cache.attr){C.set("content.text",E)}return this.attr(n,E)}}}return f.fn["attr"+w].apply(this,arguments)},clone:function(B){var D=f([]),C="title",A=f.fn["clone"+w].apply(this,arguments);if(!B){A.filter("["+n+"]").attr("title",function(){return f.attr(this,n)}).removeAttr(n)}return A},remove:f.ui?y:function(A,B){f(this).each(function(){if(!B){if(!A||f.filter(A,[this]).length){f("*",this).add(this).each(function(){f(this).triggerHandler("remove")})}}})}}};f.each(p.fn,function(B,C){if(!C||f.fn[B+w]){return i}var A=f.fn[B+w]=f.fn[B];f.fn[B]=function(){return C.apply(this,arguments)||A.apply(this,arguments)}});q.version="nightly";q.nextid=0;q.inactiveEvents="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" ");q.zindex=2000001;q.defaults={prerender:r,id:r,overwrite:i,suppress:i,content:{text:i,attr:"title",title:{text:r,button:r}},position:{my:"top left",at:"bottom right",target:r,container:r,viewport:r,adjust:{x:0,y:0,mouse:i,resize:i,method:"flip flip"},effect:function(B,C,A){f(this).animate(C,{duration:200,queue:r})}},show:{target:r,event:"mouseenter",effect:i,delay:90,solo:r,ready:r,autofocus:r},hide:{target:r,event:"mouseleave",effect:i,delay:0,fixed:r,inactive:r,leave:"window",distance:r},style:{classes:"",widget:r,width:r,height:r},events:{render:y,move:y,show:y,hide:y,toggle:y,visible:y,focus:y,blur:y}}}(jQuery,window));var LikersTooltipController=(function(){var f=false;var a="<div class ='likerstooltip'><div class='loading'></div></div>";function e(){jq(".likerslink").live("mouseenter click",function(h){var g=jq(this);if(typeof g.qtip("api")==="undefined"){g.qtip({content:{title:{text:g.attr("title")},text:a},suppress:false,style:{width:400},show:{event:"click",solo:true},hide:{event:"click",fixed:true,leave:false},position:{my:"top left",at:"bottom center",adjust:{x:-(g.outerWidth()/2)}},events:{show:function(j,i){if(typeof ProfilePicture!=="undefined"){ProfilePicture.loadProfilePics()}qtipId=g.qtip("option","id");if(jq("#fancyclose-"+qtipId).length==0){jq("#ui-tooltip-"+qtipId).append('<a href="javascript:void(0)" id="fancyclose-'+qtipId+'" title="close" class="icon fancyclose"></a>');jq("#fancyclose-"+qtipId).click(function(){g.qtip("hide")})}jq("#ui-tooltip-"+qtipId).css("cursor","pointer");jq("#widthPage").one("click",function(){g.qtip("hide")});jq(g.data("tracking")).each(function(l,k){tr(k)})}}});if(!f){b(g)}}else{if(g.qtip("api").rendered&&g.data("dirty")&&!f){g.qtip("api").set("content.text",a);b(g)}}});jq(".likerstooltip .isliked a.likebutton").live("click",function(){jq(this).closest("div.isliked").fadeOut("slow");jq(this).closest("div.qtip").css("cursor","progress")});jq(".likerstooltip .isliked a.likebutton.liked").live({mouseover:function(){var g=jq(this).closest(".isliked");jq(".likedtext",g).hide();jq(".unliketext",g).show()},mouseout:function(){var g=jq(this).closest(".isliked");jq(".unliketext",g).hide();jq(".likedtext",g).show()}});if(typeof LikeButtonController!=="undefined"){jq(document).bind(LikeButtonController.EVENT.CHANGED,d)}if(typeof FollowController!="undefined"){jq(document).bind("followComplete unfollowComplete ",c)}}function b(i){f=true;var h=i.data("mediaurl");var g=i.data("exclude");jq.ajax({url:"/like/getLikers",dataType:"jsonp",type:"post",data:{mediaurl:h,exclude:g},success:function(j){if(j.response.stat=="ok"&&j.response.count>0){i.data("dirty",false);i.qtip("api").set("content.text",j.response.content);if(i.qtip("api").rendered){if(typeof ProfilePicture!=="undefined"){ProfilePicture.loadProfilePics()}}}f=false},error:function(l,j,k){}})}function d(h){var g=jq('a.likerslink[data-mediaurl="'+h.mediaurl+'"]');g.each(function(){var i=jq(this);var j=parseInt(i.attr("title").split(" ")[0]);if(j>0){var k=j+h.diff;if(k==0){i.qtip("destroy");i.attr("title","0 likes")}else{i.qtip("hide");i.data("dirty",true);if(k==1){i.attr("title","1 person likes this")}else{i.attr("title",k+" people like this")}if(typeof i.qtip("api")!=="undefined"&&i.qtip("api").rendered){i.qtip("api").set("content.title.text",i.attr("title"))}}}})}function c(h){var i=jq('a.likerslink[aria-describedby="'+jq(h.target).closest("div.qtip").attr("id")+'"]');i.data("dirty",true);var g=jq("a.likerslink").not(i);g.each(function(){var j=jq(this);j.data("dirty",true)})}jq(document).ready(function(){e()});return{}}());(function(f,j,g){var i=true,r=false,y=null,q,p,b,x={},k="ui-tooltip",d="ui-widget",e="ui-state-disabled",s="div.qtip."+k,l=k+"-default",z=k+"-focus",c=k+"-hover",u=k+"-fluid",o="-31000px",w="_replacedByqTip",n="oldtitle",m;function h(){h.history=h.history||[];h.history.push(arguments);if("object"===typeof console){var C=console[console.warn?"warn":"log"],B=Array.prototype.slice.call(arguments),A;if(typeof arguments[0]==="string"){B[0]="qTip2: "+B[0]}A=C.apply?C.apply(console,B):C(B)}}function a(B){var A;if(!B||"object"!==typeof B){return r}if("object"!==typeof B.metadata){B.metadata={type:B.metadata}}if("content" in B){if("object"!==typeof B.content||B.content.jquery){B.content={text:B.content}}A=B.content.text||r;if(!f.isFunction(A)&&((!A&&!A.attr)||A.length<1||("object"===typeof A&&!A.jquery))){B.content.text=r}if("title" in B.content){if("object"!==typeof B.content.title){B.content.title={text:B.content.title}}A=B.content.title.text||r;if(!f.isFunction(A)&&((!A&&!A.attr)||A.length<1||("object"===typeof A&&!A.jquery))){B.content.title.text=r}}}if("position" in B){if("object"!==typeof B.position){B.position={my:B.position,at:B.position}}}if("show" in B){if("object"!==typeof B.show){if(B.show.jquery){B.show={target:B.show}}else{B.show={event:B.show}}}}if("hide" in B){if("object"!==typeof B.hide){if(B.hide.jquery){B.hide={target:B.hide}}else{B.hide={event:B.hide}}}}if("style" in B){if("object"!==typeof B.style){B.style={classes:B.style}}}f.each(p,function(){if(this.sanitize){this.sanitize(B)}});return B}function v(W,C,Q,R){var P=this,L=document.body,I=k+"-"+Q,D=0,V=0,E=f(),M=".qtip-"+Q,N,O;P.id=Q;P.rendered=r;P.elements=N={target:W};P.timers={img:{}};P.options=C;P.checks={};P.plugins={};P.cache=O={event:{},target:f(),disabled:r,attr:R};function F(Z){var X=0,ab,Y=C,aa=Z.split(".");while(Y=Y[aa[X++]]){if(X<aa.length){ab=Y}}return[ab||C,aa.pop()]}function U(){var X=C.style.widget;E.toggleClass(d,X).toggleClass(l,!X);N.content.toggleClass(d+"-content",X);if(N.titlebar){N.titlebar.toggleClass(d+"-header",X)}if(N.button){N.button.toggleClass(k+"-icon",!X)}}function A(X){if(N.title){N.titlebar.remove();N.titlebar=N.title=N.button=y;if(X!==r){P.reposition()}}}function S(){var Y=C.content.title.button,X=typeof Y==="string",Z=X?Y:"Close tooltip";if(N.button){N.button.remove()}if(Y.jquery){N.button=Y}else{N.button=f("<a />",{"class":"ui-state-default "+(C.style.widget?"":k+"-icon"),title:Z,"aria-label":Z}).prepend(f("<span />",{"class":"ui-icon ui-icon-close",html:"&times;"}))}N.button.appendTo(N.titlebar).attr("role","button").hover(function(aa){f(this).toggleClass("ui-state-hover",aa.type==="mouseenter")}).click(function(aa){if(!E.hasClass(e)){P.hide(aa)}return r}).bind("mousedown keydown mouseup keyup mouseout",function(aa){f(this).toggleClass("ui-state-active ui-state-focus",aa.type.substr(-4)==="down")});P.redraw()}function H(){var X=I+"-title";if(N.titlebar){A()}N.titlebar=f("<div />",{"class":k+"-titlebar "+(C.style.widget?"ui-widget-header":"")}).append(N.title=f("<div />",{id:X,"class":k+"-title","aria-atomic":i})).insertBefore(N.content);if(C.content.title.button){S()}else{if(P.rendered){P.redraw()}}}function K(X){var Y=N.button,Z=N.title;if(!P.rendered){return r}if(!X){Y.remove()}else{if(!Z){H()}S()}}function T(Z,X){var Y=N.title;if(!P.rendered||!Z){return r}if(f.isFunction(Z)){Z=Z.call(W,O.event,P)}if(Z===r){return A(r)}else{if(Z.jquery&&Z.length>0){Y.empty().append(Z.css({display:"block"}))}else{Y.html(Z)}}P.redraw();if(X!==r&&P.rendered&&E.is(":visible")){P.reposition(O.event)}}function J(Z,X){var Y=N.content;if(!P.rendered||!Z){return r}if(f.isFunction(Z)){Z=Z.call(W,O.event,P)||""}if(Z.jquery&&Z.length>0){Y.empty().append(Z.css({display:"block"}))}else{Y.html(Z)}function aa(ac){var ab,ad={};function ae(af){if(af){delete ad[af.src];clearTimeout(P.timers.img[af.src]);f(af).unbind(M)}if(f.isEmptyObject(ad)){P.redraw();if(X!==r){P.reposition(O.event)}ac()}}if((ab=Y.find("img:not([height]):not([width])")).length===0){return ae()}ab.each(function(af,ag){if(ad[ag.src]!==g){return}(function ah(){if(ag.height||ag.width){return ae(ag)}P.timers.img[ag.src]=setTimeout(ah,700)}());f(ag).bind("error"+M+" load"+M,function(){ae(this)});ad[ag.src]=ag})}if(P.rendered<0){E.queue("fx",aa)}else{V=0;aa(f.noop)}return P}function B(){var aa=C.position,Y={show:C.show.target,hide:C.hide.target,viewport:f(aa.viewport),document:f(document),window:f(j)},Z={show:f.trim(""+C.show.event).split(" "),hide:f.trim(""+C.hide.event).split(" ")},X=f.browser.msie&&parseInt(f.browser.version,10)===6;function ac(af){if(E.hasClass(e)){return r}Y.show.trigger("qtip-"+Q+"-inactive");clearTimeout(P.timers.show);clearTimeout(P.timers.hide);var ag=function(){P.toggle(i,af)};if(C.show.delay>0){P.timers.show=setTimeout(ag,C.show.delay)}else{ag()}}function ab(ai){if(E.hasClass(e)||D||V){return r}var ag=f(ai.relatedTarget||ai.target),af=ag.closest(s)[0]===E[0],ah=ag[0]===Y.show[0];clearTimeout(P.timers.show);clearTimeout(P.timers.hide);if((aa.target==="mouse"&&af)||(C.hide.fixed&&((/mouse(out|leave|move)/).test(ai.type)&&(af||ah)))){ai.preventDefault();ai.stopImmediatePropagation();return}if(C.hide.delay>0){P.timers.hide=setTimeout(function(){P.hide(ai)},C.hide.delay)}else{P.hide(ai)}}function ad(af){if(E.hasClass(e)){return r}clearTimeout(P.timers.inactive);P.timers.inactive=setTimeout(function(){P.hide(af)},C.hide.inactive)}function ae(af){if(E.is(":visible")){P.reposition(af)}}E.bind("mouseenter"+M+" mouseleave"+M,function(af){var ag=af.type==="mouseenter";if(ag){P.focus(af)}E.toggleClass(c,ag)});if(C.hide.fixed){Y.hide=Y.hide.add(E);E.bind("mouseover"+M,function(){if(!E.hasClass(e)){clearTimeout(P.timers.hide)}})}if(/mouse(out|leave)/i.test(C.hide.event)){if(C.hide.leave==="window"){Y.window.bind("mouseout"+M,function(af){if(/select|option/.test(af.target)&&!af.relatedTarget){P.hide(af)}})}}else{if(/mouse(over|enter)/i.test(C.show.event)){Y.hide.bind("mouseleave"+M,function(af){clearTimeout(P.timers.show)})}}if((""+C.hide.event).indexOf("unfocus")>-1){Y.document.bind("mousedown"+M,function(ah){var af=f(ah.target),ag=!E.hasClass(e)&&E.is(":visible");if(af[0]!==E[0]&&af.parents(s).length===0&&af.add(W).length>1){P.hide(ah)}})}if("number"===typeof C.hide.inactive){Y.show.bind("qtip-"+Q+"-inactive",ad);f.each(q.inactiveEvents,function(af,ag){Y.hide.add(N.tooltip).bind(ag+M+"-inactive",ad)})}f.each(Z.hide,function(ag,ah){var af=f.inArray(ah,Z.show),ai=f(Y.hide);if((af>-1&&ai.add(Y.show).length===ai.length)||ah==="unfocus"){Y.show.bind(ah+M,function(aj){if(E.is(":visible")){ab(aj)}else{ac(aj)}});delete Z.show[af]}else{Y.hide.bind(ah+M,ab)}});f.each(Z.show,function(af,ag){Y.show.bind(ag+M,ac)});if("number"===typeof C.hide.distance){Y.show.add(E).bind("mousemove"+M,function(ai){var ah=O.origin||{},ag=C.hide.distance,af=Math.abs;if(af(ai.pageX-ah.pageX)>=ag||af(ai.pageY-ah.pageY)>=ag){P.hide(ai)}})}if(aa.target==="mouse"){Y.show.bind("mousemove"+M,function(af){b={pageX:af.pageX,pageY:af.pageY,type:"mousemove"}});if(aa.adjust.mouse){if(C.hide.event){E.bind("mouseleave"+M,function(af){if((af.relatedTarget||af.target)!==Y.show[0]){P.hide(af)}})}Y.document.bind("mousemove"+M,function(af){if(!E.hasClass(e)&&E.is(":visible")){P.reposition(af||b)}})}}if(aa.adjust.resize||Y.viewport.length){(f.event.special.resize?Y.viewport:Y.window).bind("resize"+M,ae)}if(Y.viewport.length||(X&&E.css("position")==="fixed")){Y.viewport.bind("scroll"+M,ae)}}function G(){var X=[C.show.target[0],C.hide.target[0],P.rendered&&N.tooltip[0],C.position.container[0],C.position.viewport[0],j,document];if(P.rendered){f([]).pushStack(f.grep(X,function(Y){return typeof Y==="object"})).unbind(M)}else{C.show.target.unbind(M+"-create")}}P.checks.builtin={"^id$":function(Z,aa,X){var ab=X===i?q.nextid:X,Y=k+"-"+ab;if(ab!==r&&ab.length>0&&!f("#"+Y).length){E[0].id=Y;N.content[0].id=Y+"-content";N.title[0].id=Y+"-title"}},"^content.text$":function(Y,Z,X){J(X)},"^content.title.text$":function(Y,Z,X){if(!X){return A()}if(!N.title&&X){H()}T(X)},"^content.title.button$":function(Y,Z,X){K(X)},"^position.(my|at)$":function(Y,Z,X){if("string"===typeof X){Y[Z]=new p.Corner(X)}},"^position.container$":function(Y,Z,X){if(P.rendered){E.appendTo(X)}},"^show.ready$":function(){if(!P.rendered){P.render(1)}else{P.toggle(i)}},"^style.classes$":function(Y,Z,X){E.attr("class",k+" qtip ui-helper-reset "+X)},"^style.widget|content.title":U,"^events.(render|show|move|hide|focus|blur)$":function(Y,Z,X){E[(f.isFunction(X)?"":"un")+"bind"]("tooltip"+Z,X)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){var X=C.position;E.attr("tracking",X.target==="mouse"&&X.adjust.mouse);G();B()}};f.extend(P,{render:function(X){if(P.rendered){return P}var Z=C.content.title.text,Y=C.position,aa=f.Event("tooltiprender");f.attr(W[0],"aria-describedby",I);E=N.tooltip=f("<div/>",{id:I,"class":k+" qtip ui-helper-reset "+l+" "+C.style.classes+" "+k+"-pos-"+C.position.my.abbreviation(),width:C.style.width||"",height:C.style.height||"",tracking:Y.target==="mouse"&&Y.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":r,"aria-describedby":I+"-content","aria-hidden":i}).toggleClass(e,O.disabled).data("qtip",P).appendTo(C.position.container).append(N.content=f("<div />",{"class":k+"-content",id:I+"-content","aria-atomic":i}));N.tip=f("<div />",{"class":"ui-tooltip-tip"}).appendTo(E);P.rendered=-1;V=1;D=1;if(Z){H();T(Z,r)}J(C.content.text,r);P.rendered=i;U();f.each(C.events,function(ab,ac){if(f.isFunction(ac)){E.bind(ab==="toggle"?"tooltipshow tooltiphide":"tooltip"+ab,ac)}});f.each(p,function(){if(this.initialize==="render"){this(P)}});B();E.queue("fx",function(ab){aa.originalEvent=O.event;E.trigger(aa,[P]);V=0;D=0;P.redraw();if(C.show.ready||X){P.toggle(i,O.event)}ab()});return P},get:function(Y){var X,Z;switch(Y.toLowerCase()){case"dimensions":X={height:E.outerHeight(),width:E.outerWidth()};break;case"offset":X=p.offset(E,C.position.container);break;default:Z=F(Y.toLowerCase());X=Z[0][Z[1]];X=X.precedance?X.string():X;break}return X},set:function(aa,ab){var Z=/^position\.(my|at|adjust|target|container)|style|content|show\.ready/i,ac=/^content\.(title|attr)|style/i,ad=r,af=r,Y=P.checks,X;function ae(aj,ah){var ai,ak,ag;for(ai in Y){for(ak in Y[ai]){if(ag=(new RegExp(ak,"i")).exec(aj)){ah.push(ag);Y[ai][ak].apply(P,ah)}}}}if("string"===typeof aa){X=aa;aa={};aa[X]=ab}else{aa=f.extend(i,{},aa)}f.each(aa,function(ah,ai){var aj=F(ah.toLowerCase()),ag;ag=aj[0][aj[1]];aj[0][aj[1]]="object"===typeof ai&&ai.nodeType?f(ai):ai;aa[ah]=[aj[0],aj[1],ai,ag];ad=Z.test(ah)||ad;af=ac.test(ah)||af});a(C);D=V=1;f.each(aa,ae);D=V=0;if(E.is(":visible")&&P.rendered){if(ad){P.reposition(C.position.target==="mouse"?y:O.event)}if(af){P.redraw()}}return P},toggle:function(Z,aa){if(!P.rendered){if(Z){P.render(1)}else{return P}}var af=Z?"show":"hide",X=C[af],ab=E.is(":visible"),ac=!aa||C[af].target.length<2||O.target[0]===aa.target,ah=C.position,ad=C.content,ae,ag;if((typeof Z).search("boolean|number")){Z=!ab}if(!E.is(":animated")&&ab===Z&&ac){return P}if(aa){if((/over|enter/).test(aa.type)&&(/out|leave/).test(O.event.type)&&aa.target===C.show.target[0]&&E.has(aa.relatedTarget).length){return P}O.event=f.extend({},aa)}ag=f.Event("tooltip"+af);ag.originalEvent=aa?O.event:y;E.trigger(ag,[P,90]);if(ag.isDefaultPrevented()){return P}f.attr(E[0],"aria-hidden",!!!Z);if(Z){O.origin=f.extend({},b);P.focus(aa);if(f.isFunction(ad.text)){J(ad.text,r)}if(f.isFunction(ad.title.text)){T(ad.title.text,r)}if(!m&&ah.target==="mouse"&&ah.adjust.mouse){f(document).bind("mousemove.qtip",function(ai){b={pageX:ai.pageX,pageY:ai.pageY,type:"mousemove"}});m=i}P.reposition(aa);if(X.solo){f(s,X.solo).not(E).qtip("hide",ag)}}else{clearTimeout(P.timers.show);delete O.origin;if(m&&!f(s+'[tracking="true"]:visible',X.solo).not(E).length){f(document).unbind("mousemove.qtip");m=r}P.blur(aa)}function Y(){if(Z){if(f.browser.msie){E[0].style.removeAttribute("filter")}E.css("overflow","");if("string"===typeof X.autofocus){f(X.autofocus,E).focus()}ag=f.Event("tooltipvisible");ag.originalEvent=aa?O.event:y;E.trigger(ag,[P])}else{E.css({display:"",visibility:"",opacity:"",left:"",top:""})}}if(ac){E.stop(0,1)}if(X.effect===r){E[af]();Y.call(E)}else{if(f.isFunction(X.effect)){X.effect.call(E,P);E.queue("fx",function(ai){Y();ai()})}else{E.fadeTo(90,Z?1:0,Y)}}if(Z){X.target.trigger("qtip-"+Q+"-inactive")}return P},show:function(X){return P.toggle(i,X)},hide:function(X){return P.toggle(r,X)},focus:function(ab){if(!P.rendered){return P}var ac=f(s),Z=parseInt(E[0].style.zIndex,10),Y=q.zindex+ac.length,aa=f.extend({},ab),X,ad;if(!E.hasClass(z)){ad=f.Event("tooltipfocus");ad.originalEvent=aa;E.trigger(ad,[P,Y]);if(!ad.isDefaultPrevented()){if(Z!==Y){ac.each(function(){if(this.style.zIndex>Z){this.style.zIndex=this.style.zIndex-1}});ac.filter("."+z).qtip("blur",aa)}E.addClass(z)[0].style.zIndex=Y}}return P},blur:function(Y){var X=f.extend({},Y),Z;E.removeClass(z);Z=f.Event("tooltipblur");Z.originalEvent=X;E.trigger(Z,[P]);return P},reposition:function(ak,ah){if(!P.rendered||D){return P}D=1;var ao=C.position.target,an=C.position,af=an.my,ag=an.at,ai=an.adjust,Y=ai.method.split(" "),al=E.outerWidth(),aj=E.outerHeight(),ac=0,ad=0,ab=f.Event("tooltipmove"),aa=E.css("position")==="fixed",am=an.viewport,ap={left:0,top:0},Z=r,ae=P.plugins.tip,X={horizontal:Y[0],vertical:(Y[1]=Y[1]||Y[0]),enabled:am.jquery&&ao[0]!==j&&ao[0]!==L&&ai.method!=="none",left:function(aw){var ar=X.horizontal==="shift",av=am.offset.left+am.scrollLeft,at=af.x==="left"?al:af.x==="right"?-al:-al/2,aq=ag.x==="left"?ac:ag.x==="right"?-ac:-ac/2,ay=ae&&ae.size?ae.size.width||0:0,aB=ae&&ae.corner&&ae.corner.precedance==="x"&&!ar?ay:0,aA=av-aw+aB,au=aw+al-am.width-av+aB,ax=at-(af.precedance==="x"||af.x===af.y?aq:0),az=af.x==="center";if(ar){aB=ae&&ae.corner&&ae.corner.precedance==="y"?ay:0;ax=(af.x==="left"?1:-1)*at-aB;ap.left+=aA>0?aA:au>0?-au:0;ap.left=Math.max(am.offset.left+(aB&&ae.corner.x==="center"?ae.offset:0),aw-ax,Math.min(Math.max(am.offset.left+am.width,aw+ax),ap.left))}else{if(aA>0&&(af.x!=="left"||au>0)){ap.left-=ax}else{if(au>0&&(af.x!=="right"||aA>0)){ap.left-=az?-ax:ax}}if(ap.left!==aw&&az){ap.left-=ai.x}if(ap.left<av&&-ap.left>au){ap.left=aw}}return ap.left-aw},top:function(ay){var ar=X.vertical==="shift",aw=am.offset.top+am.scrollTop,at=af.y==="top"?aj:af.y==="bottom"?-aj:-aj/2,az=ag.y==="top"?ad:ag.y==="bottom"?-ad:-ad/2,aq=ae&&ae.size?ae.size.height||0:0,aB=ae&&ae.corner&&ae.corner.precedance==="y"&&!ar?aq:0,au=aw-ay+aB,av=ay+aj-am.height-aw+aB,ax=at-(af.precedance==="y"||af.x===af.y?az:0),aA=af.y==="center";if(ar){aB=ae&&ae.corner&&ae.corner.precedance==="x"?aq:0;ax=(af.y==="top"?1:-1)*at-aB;ap.top+=au>0?au:av>0?-av:0;ap.top=Math.max(am.offset.top+(aB&&ae.corner.x==="center"?ae.offset:0),ay-ax,Math.min(Math.max(am.offset.top+am.height,ay+ax),ap.top))}else{if(au>0&&(af.y!=="top"||av>0)){ap.top-=ax}else{if(av>0&&(af.y!=="bottom"||au>0)){ap.top-=aA?-ax:ax}}if(ap.top!==ay&&aA){ap.top-=ai.y}if(ap.top<0&&-ap.top>av){ap.top=ay}}return ap.top-ay}};if(f.isArray(ao)&&ao.length===2){ag={x:"left",y:"top"};ap={left:ao[0],top:ao[1]}}else{if(ao==="mouse"&&((ak&&ak.pageX)||O.event.pageX)){ag={x:"left",y:"top"};ak=(ak&&(ak.type==="resize"||ak.type==="scroll")?O.event:ak&&ak.pageX&&ak.type==="mousemove"?ak:b&&b.pageX&&(ai.mouse||!ak||!ak.pageX)?{pageX:b.pageX,pageY:b.pageY}:!ai.mouse&&O.origin&&O.origin.pageX?O.origin:ak)||ak||O.event||b||{};ap={top:ak.pageY,left:ak.pageX}}else{if(ao==="event"){if(ak&&ak.target&&ak.type!=="scroll"&&ak.type!=="resize"){ao=O.target=f(ak.target)}else{ao=O.target}}else{O.target=f(ao)}ao=f(ao).eq(0);if(ao.length===0){return P}else{if(ao[0]===document||ao[0]===j){ac=p.iOS?j.innerWidth:ao.width();ad=p.iOS?j.innerHeight:ao.height();if(ao[0]===j){ap={top:!aa||p.iOS?(am||ao).scrollTop():0,left:!aa||p.iOS?(am||ao).scrollLeft():0}}}else{if(ao.is("area")&&p.imagemap){ap=p.imagemap(ao,ag,X.enabled?Y:r)}else{if(ao[0].namespaceURI==="http://www.w3.org/2000/svg"&&p.svg){ap=p.svg(ao,ag)}else{ac=ao.outerWidth();ad=ao.outerHeight();ap=p.offset(ao,an.container,aa)}}}}if(ap.offset){ac=ap.width;ad=ap.height;Z=ap.flipoffset;ap=ap.offset}else{ap.left+=ag.x==="right"?ac:ag.x==="center"?ac/2:0;ap.top+=ag.y==="bottom"?ad:ag.y==="center"?ad/2:0}}}ap.left+=ai.x+(af.x==="right"?-al:af.x==="center"?-al/2:0);ap.top+=ai.y+(af.y==="bottom"?-aj:af.y==="center"?-aj/2:0);if(X.enabled){am={elem:am,height:am[(am[0]===j?"h":"outerH")+"eight"](),width:am[(am[0]===j?"w":"outerW")+"idth"](),scrollLeft:aa?0:am.scrollLeft(),scrollTop:aa?0:am.scrollTop(),offset:am.offset()||{left:0,top:0}};ap.adjusted={left:X.horizontal!=="none"?X.left(ap.left):0,top:X.vertical!=="none"?X.top(ap.top):0};if(ap.adjusted.left+ap.adjusted.top){E.attr("class",function(aq,ar){return ar.replace(/ui-tooltip-pos-\w+/i,k+"-pos-"+af.abbreviation())})}if(Z&&ap.adjusted.left){ap.left+=Z.left}if(Z&&ap.adjusted.top){ap.top+=Z.top}}else{ap.adjusted={left:0,top:0}}ab.originalEvent=f.extend({},ak);E.trigger(ab,[P,ap,am.elem||am]);if(ab.isDefaultPrevented()){return P}delete ap.adjusted;if(ah===r||isNaN(ap.left)||isNaN(ap.top)||ao==="mouse"||!f.isFunction(an.effect)){E.css(ap)}else{if(f.isFunction(an.effect)){an.effect.call(E,P,f.extend({},ap));E.queue(function(aq){f(this).css({opacity:"",height:""});if(f.browser.msie){this.style.removeAttribute("filter")}aq()})}}D=0;return P},redraw:function(){if(P.rendered<1||V){return P}var Y=C.position.container,aa,ab,X,Z;V=1;if(C.style.height){E.css("height",C.style.height)}if(C.style.width){E.css("width",C.style.width)}else{E.css("width","").addClass(u);ab=E.width()+1;X=E.css("max-width")||"";Z=E.css("min-width")||"";aa=(X+Z).indexOf("%")>-1?Y.width()/100:0;X=((X.indexOf("%")>-1?aa:1)*parseInt(X,10))||ab;Z=((Z.indexOf("%")>-1?aa:1)*parseInt(Z,10))||0;ab=X+Z?Math.min(Math.max(ab,Z),X):ab;E.css("width",Math.round(ab)).removeClass(u)}V=0;return P},disable:function(X){if("boolean"!==typeof X){X=!(E.hasClass(e)||O.disabled)}if(P.rendered){E.toggleClass(e,X);f.attr(E[0],"aria-disabled",X)}else{O.disabled=!!X}return P},enable:function(){return P.disable(r)},destroy:function(){var X=W[0],Y=f.attr(X,n);if(P.rendered){E.remove();f.each(P.plugins,function(){if(this.destroy){this.destroy()}})}clearTimeout(P.timers.show);clearTimeout(P.timers.hide);G();f.removeData(X,"qtip");if(C.suppress&&Y){f.attr(X,"title",Y);W.removeAttr(n)}W.removeAttr("aria-describedby").unbind(".qtip");delete x[P.id];return W}})}function t(B,A){var E,N,I,C,L,D=f(this),F=f(document.body),K=this===document?F:D,J=(D.metadata)?D.metadata(A.metadata):y,M=A.metadata.type==="html5"&&J?J[A.metadata.name]:y,G=D.data(A.metadata.name||"qtipopts");try{G=typeof G==="string"?(new Function("return "+G))():G}catch(H){h("Unable to parse HTML5 attribute data: "+G)}C=f.extend(i,{},q.defaults,A,typeof G==="object"?a(G):y,a(M||J));N=C.position;C.id=B;if("boolean"===typeof C.content.text){I=D.attr(C.content.attr);if(C.content.attr!==r&&I){C.content.text=I}else{h("Unable to locate content for tooltip! Aborting render of tooltip on element: ",D);return r}}if(N.container===r){N.container=F}if(N.target===r){N.target=K}if(C.show.target===r){C.show.target=K}if(C.show.solo===i){C.show.solo=F}if(C.hide.target===r){C.hide.target=K}if(C.position.viewport===i){C.position.viewport=N.container}N.at=new p.Corner(N.at);N.my=new p.Corner(N.my);if(f.data(this,"qtip")){if(C.overwrite){D.qtip("destroy")}else{if(C.overwrite===r){return r}}}if(C.suppress&&(L=f.attr(this,"title"))){f(this).removeAttr("title").attr(n,L)}E=new v(D,C,B,!!I);f.data(this,"qtip",E);D.bind("remove.qtip",function(){E.destroy()});return E}q=f.fn.qtip=function(B,F,G){var H=(""+B).toLowerCase(),E=y,A=H==="disable"?[i]:f.makeArray(arguments).slice(1),D=A[A.length-1],C=this[0]?f.data(this[0],"qtip"):y;if((!arguments.length&&C)||H==="api"){return C}else{if("string"===typeof B){this.each(function(){var I=f.data(this,"qtip");if(!I){return i}if(D&&D.timeStamp){I.cache.event=D}if((H==="option"||H==="options")&&F){if(f.isPlainObject(F)||G!==g){I.set(F,G)}else{E=I.get(F);return r}}else{if(I[H]){I[H].apply(I[H],A)}}});return E!==y?E:this}else{if("object"===typeof B||!arguments.length){C=a(f.extend(i,{},B));return q.bind.call(this,C,D)}}}};q.bind=function(B,A){return this.each(function(F){var D,C,E,H,G,J;J=f.isArray(B.id)?B.id[F]:B.id;J=!J||J===r||J.length<1||x[J]?q.nextid++:(x[J]=J);H=".qtip-"+J+"-create";G=t.call(this,J,B);if(G===r){return i}D=G.options;f.each(p,function(){if(this.initialize==="initialize"){this(G)}});C={show:D.show.target,hide:D.hide.target};E={show:f.trim(""+D.show.event).replace(/ /g,H+" ")+H,hide:f.trim(""+D.hide.event).replace(/ /g,H+" ")+H};if(/mouse(over|enter)/i.test(E.show)&&!/mouse(out|leave)/i.test(E.hide)){E.hide+=" mouseleave"+H}C.show.bind("mousemove"+H,function(K){b={pageX:K.pageX,pageY:K.pageY,type:"mousemove"}});function I(L){function K(){G.render(typeof L==="object"||D.show.ready);C.show.add(C.hide).unbind(H)}if(G.cache.disabled){return r}G.cache.event=f.extend({},L);G.cache.target=L?f(L.target):[g];if(D.show.delay>0){clearTimeout(G.timers.show);G.timers.show=setTimeout(K,D.show.delay);if(E.show!==E.hide){C.hide.bind(E.hide,function(){clearTimeout(G.timers.show)})}}else{K()}}C.show.bind(E.show,I);if(D.show.ready||D.prerender){I(A)}})};p=q.plugins={Corner:function(A){A=(""+A).replace(/([A-Z])/," $1").replace(/middle/gi,"center").toLowerCase();this.x=(A.match(/left|right/i)||A.match(/center/)||["inherit"])[0].toLowerCase();this.y=(A.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase();this.precedance=(A.charAt(0).search(/^(t|b)/)>-1)?"y":"x";this.string=function(){return this.precedance==="y"?this.y+this.x:this.x+this.y};this.abbreviation=function(){var B=this.x.substr(0,1),C=this.y.substr(0,1);return B===C?B:(B==="c"||(B!=="c"&&C!=="c"))?C+B:B+C}},offset:function(C,A,D){var F=C.offset(),H=A,I=0,E=document.body,B;function G(K,J){F.left+=J*K.scrollLeft();F.top+=J*K.scrollTop()}if(H){do{if(H.css("position")!=="static"){B=H[0]===E?{left:parseInt(H.css("left"),10)||0,top:parseInt(H.css("top"),10)||0}:H.position();F.left-=B.left+(parseInt(H.css("borderLeftWidth"),10)||0)+(parseInt(H.css("marginLeft"),10)||0);F.top-=B.top+(parseInt(H.css("borderTopWidth"),10)||0);I++}if(H[0]===E){break}}while(H=H.offsetParent());if(A[0]!==E&&I>1){G(A,1)}if((p.iOS<4.1&&p.iOS>3.1)||(!p.iOS&&D)){G(f(j),-1)}}return F},iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,3})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_","."))||r,fn:{attr:function(A,E){if(this.length){var B=this[0],D="title",C=f.data(B,"qtip");if(A===D&&C&&"object"===typeof C&&C.options.suppress){if(arguments.length<2){return f.attr(B,n)}else{if(C&&C.options.content.attr===D&&C.cache.attr){C.set("content.text",E)}return this.attr(n,E)}}}return f.fn["attr"+w].apply(this,arguments)},clone:function(B){var D=f([]),C="title",A=f.fn["clone"+w].apply(this,arguments);if(!B){A.filter("["+n+"]").attr("title",function(){return f.attr(this,n)}).removeAttr(n)}return A},remove:f.ui?y:function(A,B){f(this).each(function(){if(!B){if(!A||f.filter(A,[this]).length){f("*",this).add(this).each(function(){f(this).triggerHandler("remove")})}}})}}};f.each(p.fn,function(B,C){if(!C||f.fn[B+w]){return i}var A=f.fn[B+w]=f.fn[B];f.fn[B]=function(){return C.apply(this,arguments)||A.apply(this,arguments)}});q.version="nightly";q.nextid=0;q.inactiveEvents="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" ");q.zindex=2000001;q.defaults={prerender:r,id:r,overwrite:i,suppress:i,content:{text:i,attr:"title",title:{text:r,button:r}},position:{my:"top left",at:"bottom right",target:r,container:r,viewport:r,adjust:{x:0,y:0,mouse:i,resize:i,method:"flip flip"},effect:function(B,C,A){f(this).animate(C,{duration:200,queue:r})}},show:{target:r,event:"mouseenter",effect:i,delay:90,solo:r,ready:r,autofocus:r},hide:{target:r,event:"mouseleave",effect:i,delay:0,fixed:r,inactive:r,leave:"window",distance:r},style:{classes:"",widget:r,width:r,height:r},events:{render:y,move:y,show:y,hide:y,toggle:y,visible:y,focus:y,blur:y}}}(jQuery,window));(function(d){function c(g,h){var e=d(h);return e.length<2?e:g.parent().find(h)}function b(v,w){var x=this,i=v.add(x),u=v.children(),p=0,r=w.vertical;a||(a=x);if(u.length>1){u=d(w.items,v)}d.extend(x,{getConf:function(){return w},getIndex:function(){return p},getSize:function(){return x.getItems().size()},getNaviButtons:function(){return h.add(e)},getRoot:function(){return v},getItemWrap:function(){return u},getItems:function(){return u.children(w.item).not("."+w.clonedClass)},move:function(f,g){return x.seekTo(p+f,g)},next:function(f){return x.move(1,f)},prev:function(f){return x.move(-1,f)},begin:function(f){return x.seekTo(0,f)},end:function(f){return x.seekTo(x.getSize()-1,f)},focus:function(){return a=x},addItem:function(f){f=d(f);if(w.circular){u.children("."+w.clonedClass+":last").before(f);u.children("."+w.clonedClass+":first").replaceWith(f.clone().addClass(w.clonedClass))}else{u.append(f)}i.trigger("onAddItem",[f]);return x},seekTo:function(f,m,j){f.jquery||(f*=1);if(w.circular&&f===0&&p==-1&&m!==0){return x}if(!w.circular&&f<0||f>x.getSize()||f<-1){return x}var g=f;if(f.jquery){f=x.getItems().index(f)}else{g=x.getItems().eq(f)}var l=d.Event("onBeforeSeek");if(!j){i.trigger(l,[f,m]);if(l.isDefaultPrevented()||!g.length){return x}}g=r?{top:-g.position().top}:{left:-g.position().left};p=f;a=x;if(m===undefined){m=w.speed}u.animate(g,m,w.easing,j||function(){i.trigger("onSeek",[f])});return x}});d.each(["onBeforeSeek","onSeek","onAddItem"],function(f,g){d.isFunction(w[g])&&d(x).bind(g,w[g]);x[g]=function(j){j&&d(x).bind(g,j);return x}});if(w.circular){var z=x.getItems().slice(-1).clone().prependTo(u),y=x.getItems().eq(1).clone().appendTo(u);z.add(y).addClass(w.clonedClass);x.onBeforeSeek(function(f,j,g){if(!f.isDefaultPrevented()){if(j==-1){x.seekTo(z,g,function(){x.end(0)});return f.preventDefault()}else{j==x.getSize()&&x.seekTo(y,g,function(){x.begin(0)})}}});x.seekTo(0,0,function(){})}var h=c(v,w.prev).click(function(){x.prev()}),e=c(v,w.next).click(function(){x.next()});if(!w.circular&&x.getSize()>1){x.onBeforeSeek(function(f,g){setTimeout(function(){if(!f.isDefaultPrevented()){h.toggleClass(w.disabledClass,g<=0);e.toggleClass(w.disabledClass,g>=x.getSize()-1)}},1)});w.initialIndex||h.addClass(w.disabledClass)}w.mousewheel&&d.fn.mousewheel&&v.mousewheel(function(f,g){if(w.mousewheel){x.move(g<0?1:-1,w.wheelSpeed||50);return false}});if(w.touch){var k={};u[0].ontouchstart=function(f){f=f.touches[0];k.x=f.clientX;k.y=f.clientY};u[0].ontouchmove=function(f){if(f.touches.length==1&&!u.is(":animated")){var j=f.touches[0],g=k.x-j.clientX;j=k.y-j.clientY;x[r&&j>0||!r&&g>0?"next":"prev"]();f.preventDefault()}}}w.keyboard&&d(document).bind("keydown.scrollable",function(f){if(!(!w.keyboard||f.altKey||f.ctrlKey||d(f.target).is(":input"))){if(!(w.keyboard!="static"&&a!=x)){var g=f.keyCode;if(r&&(g==38||g==40)){x.move(g==38?-1:1);return f.preventDefault()}if(!r&&(g==37||g==39)){x.move(g==37?-1:1);return f.preventDefault()}}}});w.initialIndex&&x.seekTo(w.initialIndex,0,function(){})}d.tools=d.tools||{version:"1.2.5"};d.tools.scrollable={conf:{activeClass:"active",circular:false,clonedClass:"cloned",disabledClass:"disabled",easing:"swing",initialIndex:0,item:null,items:".items",keyboard:true,mousewheel:false,next:".next",prev:".prev",speed:400,vertical:false,touch:true,wheelSpeed:0}};var a;d.fn.scrollable=function(e){var g=this.data("scrollable");if(g){return g}e=d.extend({},d.tools.scrollable.conf,e);this.each(function(){g=new b(d(this),e);d(this).data("scrollable",g)});return e.api?g:this}})(jQuery);(function(c){function b(d,f){var e=c(f);return e.length<2?e:d.parent().find(f)}var a=c.tools.scrollable;a.navigator={conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:false,idPrefix:null,history:false}};c.fn.navigator=function(d){if(typeof d=="string"){d={navi:d}}d=c.extend({},a.navigator.conf,d);var e;this.each(function(){function t(f,j,h){v.seekTo(j);if(s){if(location.hash){location.hash=f.attr("href").replace("#","")}}else{return h.preventDefault()}}function u(){return r.find(d.naviItem||"> *")}function m(f){var h=c("<"+(d.naviItem||"a")+"/>").click(function(j){t(c(this),f,j)}).attr("href","#"+f);f===0&&h.addClass(p);d.indexed&&h.text(f+1);d.idPrefix&&h.attr("id",d.idPrefix+f);return h.appendTo(r)}function i(f,h){f=u().eq(h.replace("#",""));f.length||(f=u().filter("[href="+h+"]"));f.click()}var v=c(this).data("scrollable"),r=d.navi.jquery?d.navi:b(v.getRoot(),d.navi),g=v.getNaviButtons(),p=d.activeClass,s=d.history&&c.fn.history;if(v){e=v}v.getNaviButtons=function(){return g.add(r)};u().length?u().each(function(f){c(this).click(function(h){t(c(this),f,h)})}):c.each(v.getItems(),function(f){m(f)});v.onBeforeSeek(function(f,h){setTimeout(function(){if(!f.isDefaultPrevented()){var j=u().eq(h);!f.isDefaultPrevented()&&j.length&&u().removeClass(p).eq(h).addClass(p)}},1)});v.onAddItem(function(f,h){h=m(v.getItems().index(h));s&&h.history(i)});s&&u().history(i)});return d.api?e:this}})(jQuery);var LikesSlider={count:0,offset:0,shadowOffset:2,fetching:false,init:function(a){jq.extend(this,a);this.api=jq("#"+this.id).scrollable({circular:this.getCircular(),api:true,next:".slideright",prev:".slideleft",keyboard:false,onBeforeSeek:jq.proxy(this.onBeforeSeek,this)});this.offset=this.howmany;this.count=jq("#"+this.id+" .outer").length;if(this.getCircular()){jq("#"+this.id).siblings(".slideleft, .slideright").removeClass("disabled")}else{if(this.totalcount>this.size){jq("#"+this.id).siblings(".slideright").removeClass("disabled")}}this.setTitleHover()},getCircular:function(){return(this.totalcount>this.size)&&(this.totalcount<=this.howmany)},setTitleHover:function(){jq("#"+this.id+" .outer").hoverIntent({over:jq.proxy(this.hoverOver,this),out:jq.proxy(this.hoverOut,this)})},hoverOver:function(e){var d=jq(e.currentTarget);var c=jq(".bgWrapper",d);var a=jq("img",d).height();if(jq.browser.msie&&jq.browser.version=="7.0"){var b=jq(".details",d);if(b.find(".itemTitle").length>0){ie7Hack=(a/2)-40}else{ie7Hack=(a/2)-26}if(ie7Hack<0){c.css("bottom",0)}else{c.css("bottom",ie7Hack)}bgHeight=c.height()}else{if(d.find(".video").length>0){bgHeight=c.height()}else{bgHeight=c.height()+this.shadowOffset}}c.show().animate({bottom:"+="+bgHeight})},hoverOut:function(d){var c=jq(d.currentTarget);var b=jq(".bgWrapper",c);var a;if(c.find(".video").length>0){a=b.height()}else{a=b.height()+this.shadowOffset}b.animate({bottom:"-="+a}).fadeOut()},onBeforeSeek:function(b,a){if(this.totalcount>this.howmany&&this.count<this.totalcount&&(this.count-(a*this.size))<this.howmany/1.2&&!this.fetching){this.fetching=true;jq.get("/stream/?type=likes&on="+this.ownername+"&n="+this.howmany+"&o="+this.offset,jq.proxy(function(c){this.api.addItem(c);this.offset+=this.howmany;this.count=jq("#"+this.id+" .outer").length;this.setTitleHover();jq("#"+this.id).siblings(".slideright").removeClass("disabled");this.fetching=false},this))}}};(function(){function a(){var b=jq(this),e=b.data("username"),d,c;d="<p>"+e+" has a Pro Account</p>";c="<a href='/upgrade' class='linkClr'>Get yours!</a>";b.qtip({content:{text:c,title:{text:d}},show:{solo:true},hide:{fixed:true,inactive:50000,delay:200},position:{my:"top left",at:"bottom left"}})}jq(document).ready(function(){jq("span.proIndicator.freeViewer").each(a)})}());
