// main.js
// jquery/plugins/indicator/jquery.indicator.js
// jquery/plugins/livequery/jquery.livequery.js
// /js/player/flashUtils.js
// jquery/jquery.ui.js
// jquery/ui/effects
// jquery/plugins/facebox/facebox
// jquery/plugins/autocomplete/autocomplete.ext.js
// jquery/plugins/autocomplete/autocomplete
// jquery/plugins/cookies/jquery.cookie.js
// jquery/plugins/metadata/jquery.metadata.js
// pfShareAndEmbed
// jquery/plugins/qTip/jquery.qtip-1.0.0-rc3.js
// gplus.js
// googleanalytics/eventtracking_buttons.js
// jquery/plugins/pfmToggleBox/jquery.pfmtogglebox.js
// recordings/_recordings
// brand/show
// content/ajaxLoadListenersTable.js
// comments
// facebook/facebook.js
(function($){$.log=function(message){if(window.console){console.log(message);}};})(jQuery);function clearValue(){var inputval=$('input#q_search');if(inputval.val()=="Search Site"){inputval.val('');}}
function trackAutocompleteEvent(e,url){var types={'artist':0,'label':1,'style':2,'radioshowserie':3,'show':4,'club':5};if(url.search('^http')!=-1){var parts=url.split('/');var _type=parts[3];var slug=parts[4];_gaq.push(['_trackEvent','Autocomplete','Select',slug,types[_type]]);}}
function bindPlayLinks(path){if(path=="/"){$('a.playlink','#Play_Frontpage_Recent').livequery('click',function(){trackPlayLinkEvent('Play_Frontpage_Recent',path);});$('a.playlink','#Play_Frontpage_Popular').livequery('click',function(){trackPlayLinkEvent('Play_Frontpage_Popular',path);});$('a.playlink','#Play_Frontpage_Featured').livequery('click',function(){trackPlayLinkEvent('Play_Frontpage_Featured',path);});}else{$('a.playlink').livequery('click',function(){trackPlayLinkEvent('Triggered: PlayLink',path);});}}
function trackPlayLinkEvent(action,pathname){try{_gaq.push(['_trackEvent','pfmPlayer',action,'Path: '+pathname]);}catch(ex){return false;}}
function updateYourIE(){if($.cookie('IEfusty')==null){$('.logo').css('top','70px');$('.header').before("<div class='iefusty'><div style='float:left;'>Our website is optimized for internet explorer 8 and higher. Please install the <a href='http://windows.microsoft.com/en-US/internet-explorer/downloads/ie-8' target='_blank'>upgrade</a>.</div><a href='' id='iefusty_close'></a></div>");$.cookie('IEfusty',true,{expires:1});}}
$(document).ready(function(){if($.browser.msie&&$.browser.version.slice(0,3)<8.0){updateYourIE();$('#iefusty_close').livequery(function(){$(this).click(function(){$('.iefusty').remove();$('.logo').css('top','20px');})})}
var avbtn=$('img','.main_nav_avantgarde');$('.main_nav_avantgarde').hover(function(){avbtn.attr('src','/images/channels/mercedes/avgarde_hover.png')},function(){avbtn.attr('src','/images/channels/mercedes/avgarde_norm.png')});bindPlayLinks($(location).attr('pathname'));$liveindicator=$('#live_indicator');if(!$liveindicator.hasClass('hidden')){window.setInterval(function(){$liveindicator.toggle();},1000);};$('#apply_now_button').click(function(){_gaq.push(['_trackEvent','Filter','Apply']);return true;});$('.quick_search').keydown(function(e){if(e.which==13){_gaq.push(['_trackEvent','Autocomplete','Quicksearch',$(this).val()]);}
return true;});$('body').bind('autocomplete.select',trackAutocompleteEvent);$('#main_search_loupe').hover(function(){$(this).css('cursor','pointer')},function(){$(this).css('cursor','normal')}).click(function(){var val=$('#main_search').val();href=$(this).attr('rel');if(val=='Search'||val==''){window.location=href;}else{window.location=href+'?val='+val;}});$('#main_search').val('Search').click(function(){if($(this).val()=='Search'){$(this).val('');}}).autocomplete({ajax:"/autocomplete_web.php",timeout:100,goToUrl:{status:true,url:"/search"},wrapper:"<ul id='main_autocompletion' class='jq-ui-autocomplete'></ul>",CSSlast:true});$("#main_search").bind("blur",function(e){if($("#main_search").val()==""){$("#main_search").val('Search');}});$('#main_search').bind('activate.autocomplete',function(){if($('a','li.active').attr('id')!='complete_more_search'){$(this).val($('a','li.active').attr('title'));}});$('#main_autocompletion li').livequery(function(){$(this).css('cursor','pointer').click(function(){if($('a',this).attr('id')=='complete_more_search'){href=$('a',this).attr('href');href+=$('#main_search').val()
window.location=href;}else{$('#main_search').val($('a',this).html());var loc=$('a',this).attr('href');$("body").trigger('autocomplete.select',[loc]);window.location=loc;}}).hover(function(){$('a',this).css('text-decoration','underline')},function(){$('a',this).css('text-decoration','none')});})
$('#complete_more_search').livequery('click',function(){href=$(this).attr('href');href+=$('#main_search').val()
$(this).attr('href',href);});$('#li_heineken_pic, #li_heineken').hover(function(){$('#li_heineken a').css({'color':'#D53F2E','background-image':'url("/images/menu/menu_active.jpg")'});},function(){$('#li_heineken a').css({'color':'#444444','background-image':'url("/images/menu/menu_inactive.jpg")'});});$('#li_survey').removeClass('menu current');$('.main_nav_survey').css('background','none');if($("#dashboardDropsownSelect").length>0){$("#dashboardDropsownSelect").click(function(){$("#dashboardDropsownLinks").toggle();});}
$('a[rel*=facebox]').facebox();$('a.button_link .btn').livequery('click',function(){var new_loc=$(this).parent().attr('href');if(new_loc.match(/^\//)||new_loc.match(/^http\:\/\/.*\.play\.fm.*/)){window.location.href=new_loc;}else{window.open(new_loc,'_blank');}
return false;})
$('a.logout').click(function(){$.cookie('refresh','true',{expires:1,path:'/'});});$("input#q_search").bind("click",function(e){$("input#q_search").val('');});$("input#q_search").bind("blur",function(e){if($("input#q_search").val()=="")
$("input#q_search").val('Search Site');});if(top===self){}else{parent.location.href=self.location.href;}
$('a[rel="subscribe"]').livequery('click',function()
{subscribeTo($(this));});$('button[rel="subscribe"]').livequery('click',function()
{subscribeTo($(this));});$('button[rel="subscribe_inactive"]').livequery('click',function()
{jQuery.facebox({div:'#subscribe_inactive_content'});});function subscribeTo(subscribe_element){var object_info=subscribe_element.attr("alt");var object_info_array=object_info.split(":");var object_type=object_info_array[0];var object_id=object_info_array[1];$.ajax({url:'/user/subscribeTo',data:{object_type:object_type,object_id:object_id},type:"POST",success:function(data){try{jQuery.facebox(data);}catch(e){window.location.href="/auth";}},error:function(html){window.location.href="/auth";}});return false;}});jQuery.Indicator=function(element){this.element=$(element);this.timeout=undefined;this.element.hide().click(function(){jQuery.indicator.hide();}).hover(function(){jQuery.indicator.onOver();},function(){jQuery.indicator.onLeave();}).append("<div class='indicator_content'></div>");};jQuery.Indicator.version="1.1.1";jQuery.Indicator.prototype.onOver=function(){this.element.addClass('over');}
jQuery.Indicator.prototype.onLeave=function(){this.element.removeClass('over');if(this.element.hasClass('expired'))this.hide();}
jQuery.Indicator.prototype.onTimeout=function(){this.element.addClass('expired');if(!this.element.hasClass('over'))this.hide();}
jQuery.Indicator.prototype.show=function(){this.element.fadeIn(1000);if(!(this.element.hasClass('error')||this.element.hasClass('failure')))
this.timeout=window.setTimeout(function(){jQuery.indicator.onTimeout()},4000);}
jQuery.Indicator.prototype.hide=function(){if(this.timeout){clearTimeout(this.timeout);this.timeout=undefined;}
this.element.fadeOut(1000).removeClass('expired').removeClass('over');}
jQuery.Indicator.prototype.message=function(klass,message){this.element.removeClass('expired');if(this.element.is(":visible")){if(this.timeout){clearTimeout(this.timeout);this.timeout=undefined;}
this.element.fadeOut(1000,function(){jQuery.indicator.message(klass,message);});return;}
this.element.attr('class',klass);this.element.find('.indicator_content').text(message);this.show();}
jQuery.Indicator.prototype.subtle=function(message){this.message('subtle',message);}
jQuery.Indicator.prototype.error=function(message){this.message('error',message);}
jQuery.Indicator.prototype.failure=function(message){this.message('failure',message);}
jQuery.Indicator.prototype.fail=function(message){this.message('failure',message);}
jQuery.Indicator.prototype.warning=function(message){this.message('warning',message);}
jQuery.Indicator.prototype.warn=function(message){this.message('warning',message);}
jQuery.Indicator.prototype.information=function(message){this.message('information',message);}
jQuery.Indicator.prototype.info=function(message){this.message('information',message);}
jQuery.Indicator.prototype.success=function(message){this.message('success',message);}
jQuery.Indicator.prototype.notice=function(message){this.message('notice',message);}
$(function(){jQuery.indicator=new jQuery.Indicator('#indicator');});
/* Copyright (c) 2008 Brandon Aaron (http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * Version: 1.0.3
 * Requires jQuery 1.1.3+
 * Docs: http://docs.jquery.com/Plugins/livequery
 */
(function($){$.extend($.fn,{livequery:function(type,fn,fn2){var self=this,q;if($.isFunction(type))
fn2=fn,fn=type,type=undefined;$.each($.livequery.queries,function(i,query){if(self.selector==query.selector&&self.context==query.context&&type==query.type&&(!fn||fn.$lqguid==query.fn.$lqguid)&&(!fn2||fn2.$lqguid==query.fn2.$lqguid))
return(q=query)&&false;});q=q||new $.livequery(this.selector,this.context,type,fn,fn2);q.stopped=false;q.run();return this;},expire:function(type,fn,fn2){var self=this;if($.isFunction(type))
fn2=fn,fn=type,type=undefined;$.each($.livequery.queries,function(i,query){if(self.selector==query.selector&&self.context==query.context&&(!type||type==query.type)&&(!fn||fn.$lqguid==query.fn.$lqguid)&&(!fn2||fn2.$lqguid==query.fn2.$lqguid)&&!this.stopped)
$.livequery.stop(query.id);});return this;}});$.livequery=function(selector,context,type,fn,fn2){this.selector=selector;this.context=context||document;this.type=type;this.fn=fn;this.fn2=fn2;this.elements=[];this.stopped=false;this.id=$.livequery.queries.push(this)-1;fn.$lqguid=fn.$lqguid||$.livequery.guid++;if(fn2)fn2.$lqguid=fn2.$lqguid||$.livequery.guid++;return this;};$.livequery.prototype={stop:function(){var query=this;if(this.type)
this.elements.unbind(this.type,this.fn);else if(this.fn2)
this.elements.each(function(i,el){query.fn2.apply(el);});this.elements=[];this.stopped=true;},run:function(){if(this.stopped)return;var query=this;var oEls=this.elements,els=$(this.selector,this.context),nEls=els.not(oEls);this.elements=els;if(this.type){nEls.bind(this.type,this.fn);if(oEls.length>0)
$.each(oEls,function(i,el){if($.inArray(el,els)<0)
$.event.remove(el,query.type,query.fn);});}
else{nEls.each(function(){query.fn.apply(this);});if(this.fn2&&oEls.length>0)
$.each(oEls,function(i,el){if($.inArray(el,els)<0)
query.fn2.apply(el);});}}};$.extend($.livequery,{guid:0,queries:[],queue:[],running:false,timeout:null,checkQueue:function(){if($.livequery.running&&$.livequery.queue.length){var length=$.livequery.queue.length;while(length--)
$.livequery.queries[$.livequery.queue.shift()].run();}},pause:function(){$.livequery.running=false;},play:function(){$.livequery.running=true;$.livequery.run();},registerPlugin:function(){$.each(arguments,function(i,n){if(!$.fn[n])return;var old=$.fn[n];$.fn[n]=function(){var r=old.apply(this,arguments);$.livequery.run();return r;}});},run:function(id){if(id!=undefined){if($.inArray(id,$.livequery.queue)<0)
$.livequery.queue.push(id);}
else
$.each($.livequery.queries,function(id){if($.inArray(id,$.livequery.queue)<0)
$.livequery.queue.push(id);});if($.livequery.timeout)clearTimeout($.livequery.timeout);$.livequery.timeout=setTimeout($.livequery.checkQueue,20);},stop:function(id){if(id!=undefined)
$.livequery.queries[id].stop();else
$.each($.livequery.queries,function(id){$.livequery.queries[id].stop();});}});$.livequery.registerPlugin('append','prepend','after','before','wrap','attr','removeAttr','addClass','removeClass','toggleClass','empty','remove');$(function(){$.livequery.play();});var init=$.prototype.init;$.prototype.init=function(a,c){var r=init.apply(this,arguments);if(a&&a.selector)
r.context=a.context,r.selector=a.selector;if(typeof a=='string')
r.context=c||document,r.selector=a;return r;};$.prototype.init.prototype=$.prototype;})(jQuery);var player=null;var currentRecording=0;var currentOffset=0;var currenMarkerId=0;var currentType='recording';var currentTab='default';function setCurrentId(id){currentRecording=id;}
function setRecording(id,offset,tab,marker_id){currentType='recording';currentRecording=id;currentOffset=offset;currentTab=tab;currentMarkerId=marker_id;popupPlayer();if($.isFunction(player.loadRecording))
player.loadRecording(id,offset,tab,marker_id);}
function setRadioShow(id){currentType='radioshow';currentRecording=id;currentOffset=0;popupPlayer();if(player.loadRadioshow)
player.loadRadioshow(id);}
function setLiveshow(id){currentType='liveshow';currentRecording=id;currentOffset=0;popupPlayer();if(player.loadLiveshow)
player.loadLiveshow(id);}
function popupPlayer(){var url="/player";if(window.location.href.search("frontend_dev")>-1){url="/frontend_dev.php/player";}
player=window.open("","pfmPlayer",'height=600,width=633,scrollbars=no');if(!player||player.closed||!$.isFunction(player.showPlaylist)){player=window.open(url,"pfmPlayer",'height=600,width=633,scrollbars=no');}else player.focus();}
function refreshAuthentification(){if(player&&!player.closed){}}
function getType(){return currentType;}
function getMarkerID(){return currentMarkerId;}
function getTab(){return currentTab;}
function getRecording(){return currentRecording;}
function getOffset(){return currentOffset;}
function initPlayerLinks(){var count=0;$(".playlink").livequery(function(i){count++;$(this).click(function(){var info=$(this).attr('href').replace('#play_','').split(":");var type='';if($(this).hasClass('requestlink')){type='request';}else(type='default');if(info.length==2){var offset=info[1];var id=info[0];}else if(info.length==3){var id=info[0];var offset=info[1];var marker_id=info[2];}else{var id=info[0];}
if(offset&&marker_id){setRecording(id,offset,type,marker_id);}else if(offset){setRecording(id,offset,type,null)}else{if(id){setRecording(id,null,type,null);}else{alert('error');}}});});$(".radiolink").livequery(function(i){count++;$(this).click(function(){var info=$(this).attr('href').replace('#playRadioshow_','').split(":");var id=info[0];if(id){setRadioShow(id);}else{alert('error');}});});$(".livelink").livequery(function(i){count++;$(this).click(function(){var info=$(this).attr('href').replace('#playLiveshow_','').split(":");var id=info[0];if(id){setLiveshow(id);}else{alert('error');}});});}
$(document).ready(function(){initPlayerLinks();});;(function($){$.ui={plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]]);}},call:function(instance,name,args){var set=instance.plugins[name];if(!set){return;}
for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args);}}}},cssCache:{},css:function(name){if($.ui.cssCache[name]){return $.ui.cssCache[name];}
var tmp=$('<div class="ui-gen">').addClass(name).css({position:'absolute',top:'-5000px',left:'-5000px',display:'block'}).appendTo('body');$.ui.cssCache[name]=!!((!(/auto|default/).test(tmp.css('cursor'))||(/^[1-9]/).test(tmp.css('height'))||(/^[1-9]/).test(tmp.css('width'))||!(/none/).test(tmp.css('backgroundImage'))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor'))));try{$('body').get(0).removeChild(tmp.get(0));}catch(e){}
return $.ui.cssCache[name];},disableSelection:function(e){e.unselectable="on";e.onselectstart=function(){return false;};if(e.style){e.style.MozUserSelect="none";}},enableSelection:function(e){e.unselectable="off";e.onselectstart=function(){return true;};if(e.style){e.style.MozUserSelect="";}},hasScroll:function(e,a){var scroll=/top/.test(a||"top")?'scrollTop':'scrollLeft',has=false;if(e[scroll]>0)return true;e[scroll]=1;has=e[scroll]>0?true:false;e[scroll]=0;return has;}};var _remove=$.fn.remove;$.fn.remove=function(){$("*",this).add(this).trigger("remove");return _remove.apply(this,arguments);};function getter(namespace,plugin,method){var methods=$[namespace][plugin].getter||[];methods=(typeof methods=="string"?methods.split(/,?\s+/):methods);return($.inArray(method,methods)!=-1);}
$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=='string'),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&getter(namespace,name,options)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined);}
return this.each(function(){var instance=$.data(this,name);if(isMethodCall&&instance&&$.isFunction(instance[options])){instance[options].apply(instance,args);}else if(!isMethodCall){$.data(this,name,new $[namespace][name](this,options));}});};$[namespace][name]=function(element,options){var self=this;this.widgetName=name;this.widgetBaseClass=namespace+'-'+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,options);this.element=$(element).bind('setData.'+name,function(e,key,value){return self.setData(key,value);}).bind('getData.'+name,function(e,key){return self.getData(key);}).bind('remove',function(){return self.destroy();});this.init();};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);};$.widget.prototype={init:function(){},destroy:function(){this.element.removeData(this.widgetName);},getData:function(key){return this.options[key];},setData:function(key,value){this.options[key]=value;if(key=='disabled'){this.element[value?'addClass':'removeClass'](this.widgetBaseClass+'-disabled');}},enable:function(){this.setData('disabled',false);},disable:function(){this.setData('disabled',true);}};$.widget.defaults={disabled:false};$.ui.mouse={mouseInit:function(){var self=this;this.element.bind('mousedown.'+this.widgetName,function(e){return self.mouseDown(e);});if($.browser.msie){this._mouseUnselectable=this.element.attr('unselectable');this.element.attr('unselectable','on');}
this.started=false;},mouseDestroy:function(){this.element.unbind('.'+this.widgetName);($.browser.msie&&this.element.attr('unselectable',this._mouseUnselectable));},mouseDown:function(e){(this._mouseStarted&&this.mouseUp(e));this._mouseDownEvent=e;var self=this,btnIsLeft=(e.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(e.target).is(this.options.cancel):false);if(!btnIsLeft||elIsCancel||!this.mouseCapture(e)){return true;}
this._mouseDelayMet=!this.options.delay;if(!this._mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self._mouseDelayMet=true;},this.options.delay);}
if(this.mouseDistanceMet(e)&&this.mouseDelayMet(e)){this._mouseStarted=(this.mouseStart(e)!==false);if(!this._mouseStarted){e.preventDefault();return true;}}
this._mouseMoveDelegate=function(e){return self.mouseMove(e);};this._mouseUpDelegate=function(e){return self.mouseUp(e);};$(document).bind('mousemove.'+this.widgetName,this._mouseMoveDelegate).bind('mouseup.'+this.widgetName,this._mouseUpDelegate);return false;},mouseMove:function(e){if($.browser.msie&&!e.button){return this.mouseUp(e);}
if(this._mouseStarted){this.mouseDrag(e);return false;}
if(this.mouseDistanceMet(e)&&this.mouseDelayMet(e)){this._mouseStarted=(this.mouseStart(this._mouseDownEvent,e)!==false);(this._mouseStarted?this.mouseDrag(e):this.mouseUp(e));}
return!this._mouseStarted;},mouseUp:function(e){$(document).unbind('mousemove.'+this.widgetName,this._mouseMoveDelegate).unbind('mouseup.'+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this.mouseStop(e);}
return false;},mouseDistanceMet:function(e){return(Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance);},mouseDelayMet:function(e){return this._mouseDelayMet;},mouseStart:function(e){},mouseDrag:function(e){},mouseStop:function(e){},mouseCapture:function(e){return true;}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0};})(jQuery);eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(8(C){C.e=C.e||{};C.1B(C.e,{1b:8(F,G){1p(6 E=0;E<G.2c;E++){b(G[E]!==1C){C.3A(F[0],"3G.3E."+G[E],F[0].1g[G[E]])}}},13:8(F,G){1p(6 E=0;E<G.2c;E++){b(G[E]!==1C){F.h(G[E],C.3A(F[0],"3G.3E."+G[E]))}}},17:8(E,F){b(F=="1d"){F=E.2r(":1k")?"j":"n"}c F},3v:8(F,G){6 H,E;3h(F[0]){1N"u":H=0;1x;1N"3g":H=0.5;1x;1N"3r":H=1;1x;3s:H=F[0]/G.l}3h(F[1]){1N"r":E=0;1x;1N"3f":E=0.5;1x;1N"3k":E=1;1x;3s:E=F[1]/G.k}c{x:E,y:H}},1l:8(F){b(F.1X().1z("2A")=="2w"){c F}6 E={k:F.1D({1j:14}),l:F.1A({1j:14}),"3n":F.h("3n")};F.3w(\'<1L 2A="2w" 1g="3N-1w:1q%;3Q:2i;3Y:3u;1j:0;4M:0"></1L>\');6 I=F.1X();b(F.h("Y")=="2R"){I.h({Y:"2z"});F.h({Y:"2z"})}18{6 H=F.h("u");b(2S(S(H))){H="3o"}6 G=F.h("r");b(2S(S(G))){G="3o"}I.h({Y:F.h("Y"),u:H,r:G,4C:F.h("z-4z")}).j();F.h({Y:"2z",u:0,r:0})}I.h(E);c I},1f:8(E){b(E.1X().1z("2A")=="2w"){c E.1X().4w(E)}c E},1c:8(F,G,E,H){H=H||{};C.1Y(G,8(J,I){28=F.2V(I);b(28[0]>0){H[I]=28[0]*E+28[1]}});c H},1W:8(G,H,J,I){6 E=(1Q J=="8"?J:(I?I:1C));6 F=(1Q J=="2K"?J:1C);c f.1Y(8(){6 O={};6 M=C(f);6 N=M.1z("1g")||"";b(1Q N=="2K"){N=N.2O}b(G.1d){M.4c(G.1d)?G.1a=G.1d:G.1i=G.1d}6 K=C.1B({},(1R.22?1R.22.3q(f,1C):f.3t));b(G.1i){M.1o(G.1i)}b(G.1a){M.1V(G.1a)}6 L=C.1B({},(1R.22?1R.22.3q(f,1C):f.3t));b(G.1i){M.1V(G.1i)}b(G.1a){M.1o(G.1a)}1p(6 P 4u L){b(1Q L[P]!="8"&&L[P]&&P.2q("4i")==-1&&P.2q("2c")==-1&&L[P]!=K[P]&&(P.2Q(/2k/i)||(!P.2Q(/2k/i)&&!2S(S(L[P],10))))&&(K.Y!="2R"||(K.Y=="2R"&&!P.2Q(/r|u|3r|3k/)))){O[P]=L[P]}}M.R(O,H,F,8(){b(1Q C(f).1z("1g")=="2K"){C(f).1z("1g")["2O"]="";C(f).1z("1g")["2O"]=N}18{C(f).1z("1g",N)}b(G.1i){C(f).1o(G.1i)}b(G.1a){C(f).1V(G.1a)}b(E){E.V(f,p)}})})}});C.1y.1B({3i:C.1y.j,3a:C.1y.n,3H:C.1y.1d,3D:C.1y.1o,3z:C.1y.1V,3y:C.1y.3B,19:8(E,G,F,H){c C.e[E]?C.e[E].4h(f,{4g:E,d:G||{},w:F,t:H}):1C},j:8(){b(!p[0]||(p[0].1P==2o||/(2p|2t|2u)/.2g(p[0]))){c f.3i.V(f,p)}18{6 E=p[1]||{};E.T="j";c f.19.V(f,[p[0],E,p[2]||E.w,p[3]||E.t])}},n:8(){b(!p[0]||(p[0].1P==2o||/(2p|2t|2u)/.2g(p[0]))){c f.3a.V(f,p)}18{6 E=p[1]||{};E.T="n";c f.19.V(f,[p[0],E,p[2]||E.w,p[3]||E.t])}},1d:8(){b(!p[0]||(p[0].1P==2o||/(2p|2t|2u)/.2g(p[0]))||(p[0].1P==4e)){c f.3H.V(f,p)}18{6 E=p[1]||{};E.T="1d";c f.19.V(f,[p[0],E,p[2]||E.w,p[3]||E.t])}},1o:8(F,E,H,G){c E?C.e.1W.V(f,[{1i:F},E,H,G]):f.3D(F)},1V:8(F,E,H,G){c E?C.e.1W.V(f,[{1a:F},E,H,G]):f.3z(F)},3B:8(F,E,H,G){c E?C.e.1W.V(f,[{1d:F},E,H,G]):f.3y(F)},30:8(E,G,F,I,H){c C.e.1W.V(f,[{1i:G,1a:E},F,I,H])},4L:8(){c f.30.V(f,p)},2V:8(E){6 F=f.h(E),G=[];C.1Y(["4p","4o","%","4n"],8(H,I){b(F.2q(I)>0){G=[2d(F),I]}});c G}});U.1Y(["1I","4q","4r","4t","4s","2k","4m"],8(F,E){U.2e.4l[E]=8(G){b(G.4f==0){G.1E=D(G.33,E);G.1T=B(G.1T)}G.33.1g[E]="2P("+[g.2n(g.2v(S((G.Z*(G.1T[0]-G.1E[0]))+G.1E[0]),v),0),g.2n(g.2v(S((G.Z*(G.1T[1]-G.1E[1]))+G.1E[1]),v),0),g.2n(g.2v(S((G.Z*(G.1T[2]-G.1E[2]))+G.1E[2]),v),0)].4k(",")+")"}});8 B(F){6 E;b(F&&F.1P==4j&&F.2c==3){c F}b(E=/2P\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*\\)/.1K(F)){c[S(E[1]),S(E[2]),S(E[3])]}b(E=/2P\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*\\)/.1K(F)){c[2d(E[1])*2.55,2d(E[2])*2.55,2d(E[3])*2.55]}b(E=/#([a-1G-1F-9]{2})([a-1G-1F-9]{2})([a-1G-1F-9]{2})/.1K(F)){c[S(E[1],16),S(E[2],16),S(E[3],16)]}b(E=/#([a-1G-1F-9])([a-1G-1F-9])([a-1G-1F-9])/.1K(F)){c[S(E[1]+E[1],16),S(E[2]+E[2],16),S(E[3]+E[3],16)]}b(E=/4v\\(0, 0, 0, 0\\)/.1K(F)){c A.2i}c A[U.4H(F).4G()]}8 D(G,E){6 F;4F{F=U.4I(G,E);b(F!=""&&F!="2i"||U.4J(G,"2F")){1x}E="1I"}4K(G=G.4E);c B(F)}6 A={4D:[0,v,v],4y:[2W,v,v],4x:[31,31,4A],4B:[0,0,0],3P:[0,0,v],3O:[36,42,42],3R:[0,v,v],3T:[0,0,1M],3U:[0,1M,1M],3M:[2D,2D,2D],3J:[0,1q,0],3L:[3K,3S,2Y],4b:[1M,0,1M],46:[45,2Y,47],4a:[v,2J,0],44:[3X,50,3Z],49:[1M,0,0],40:[41,3j,3W],43:[3V,0,24],48:[v,0,v],3I:[v,4d,0],4Z:[0,1m,0],5U:[1s,0,5T],5S:[2W,2X,2J],5Q:[5R,5V,2X],5W:[39,v,v],60:[2U,5Z,2U],5Y:[24,24,24],5X:[v,5P,5O],5H:[v,v,39],5G:[0,v,0],5F:[v,0,v],5D:[1m,0,0],5E:[0,0,1m],5I:[1m,1m,0],5J:[v,36,0],62:[v,26,5M],5L:[1m,0,1m],5K:[1m,0,1m],61:[v,0,0],64:[26,26,26],6h:[v,v,v],6j:[v,v,0],2i:[v,v,v]};U.q.6f=U.q.38;U.1B(U.q,{35:"2Z",38:8(F,G,E,I,H){c U.q[U.q.35](F,G,E,I,H)},6e:8(F,G,E,I,H){c I*(G/=H)*G+E},2Z:8(F,G,E,I,H){c-I*(G/=H)*(G-2)+E},6i:8(F,G,E,I,H){b((G/=H/2)<1){c I/2*G*G+E}c-I/2*((--G)*(G-2)-1)+E},6k:8(F,G,E,I,H){c I*(G/=H)*G*G+E},6g:8(F,G,E,I,H){c I*((G=G/H-1)*G*G+1)+E},6c:8(F,G,E,I,H){b((G/=H/2)<1){c I/2*G*G*G+E}c I/2*((G-=2)*G*G+2)+E},66:8(F,G,E,I,H){c I*(G/=H)*G*G*G+E},65:8(F,G,E,I,H){c-I*((G=G/H-1)*G*G*G-1)+E},6d:8(F,G,E,I,H){b((G/=H/2)<1){c I/2*G*G*G*G+E}c-I/2*((G-=2)*G*G*G-2)+E},63:8(F,G,E,I,H){c I*(G/=H)*G*G*G*G+E},67:8(F,G,E,I,H){c I*((G=G/H-1)*G*G*G*G+1)+E},68:8(F,G,E,I,H){b((G/=H/2)<1){c I/2*G*G*G*G*G+E}c I/2*((G-=2)*G*G*G*G+2)+E},6b:8(F,G,E,I,H){c-I*g.32(G/H*(g.1e/2))+I+E},6a:8(F,G,E,I,H){c I*g.1U(G/H*(g.1e/2))+E},69:8(F,G,E,I,H){c-I/2*(g.32(g.1e*G/H)-1)+E},5N:8(F,G,E,I,H){c(G==0)?E:I*g.1u(2,10*(G/H-1))+E},5B:8(F,G,E,I,H){c(G==H)?E+I:I*(-g.1u(2,-10*G/H)+1)+E},56:8(F,G,E,I,H){b(G==0){c E}b(G==H){c E+I}b((G/=H/2)<1){c I/2*g.1u(2,10*(G-1))+E}c I/2*(-g.1u(2,-10*--G)+2)+E},53:8(F,G,E,I,H){c-I*(g.1O(1-(G/=H)*G)-1)+E},5C:8(F,G,E,I,H){c I*g.1O(1-(G=G/H-1)*G)+E},4N:8(F,G,E,I,H){b((G/=H/2)<1){c-I/2*(g.1O(1-G*G)-1)+E}c I/2*(g.1O(1-(G-=2)*G)+1)+E},52:8(F,H,E,L,K){6 I=1.1H;6 J=0;6 G=L;b(H==0){c E}b((H/=K)==1){c E+L}b(!J){J=K*0.3}b(G<g.2L(L)){G=L;6 I=J/4}18{6 I=J/(2*g.1e)*g.2x(L/G)}c-(G*g.1u(2,10*(H-=1))*g.1U((H*K-I)*(2*g.1e)/J))+E},57:8(F,H,E,L,K){6 I=1.1H;6 J=0;6 G=L;b(H==0){c E}b((H/=K)==1){c E+L}b(!J){J=K*0.3}b(G<g.2L(L)){G=L;6 I=J/4}18{6 I=J/(2*g.1e)*g.2x(L/G)}c G*g.1u(2,-10*H)*g.1U((H*K-I)*(2*g.1e)/J)+L+E},58:8(F,H,E,L,K){6 I=1.1H;6 J=0;6 G=L;b(H==0){c E}b((H/=K/2)==2){c E+L}b(!J){J=K*(0.3*1.5)}b(G<g.2L(L)){G=L;6 I=J/4}18{6 I=J/(2*g.1e)*g.2x(L/G)}b(H<1){c-0.5*(G*g.1u(2,10*(H-=1))*g.1U((H*K-I)*(2*g.1e)/J))+E}c G*g.1u(2,-10*(H-=1))*g.1U((H*K-I)*(2*g.1e)/J)*0.5+L+E},5b:8(F,G,E,J,I,H){b(H==2m){H=1.1H}c J*(G/=I)*G*((H+1)*G-H)+E},5a:8(F,G,E,J,I,H){b(H==2m){H=1.1H}c J*((G=G/I-1)*G*((H+1)*G+H)+1)+E},59:8(F,G,E,J,I,H){b(H==2m){H=1.1H}b((G/=I/2)<1){c J/2*(G*G*(((H*=(1.34))+1)*G-H))+E}c J/2*((G-=2)*G*(((H*=(1.34))+1)*G+H)+2)+E},37:8(F,G,E,I,H){c I-U.q.2l(F,H-G,0,I,H)+E},2l:8(F,G,E,I,H){b((G/=H)<(1/2.1s)){c I*(7.2j*G*G)+E}18{b(G<(2/2.1s)){c I*(7.2j*(G-=(1.5/2.1s))*G+0.1s)+E}18{b(G<(2.5/2.1s)){c I*(7.2j*(G-=(2.25/2.1s))*G+0.51)+E}18{c I*(7.2j*(G-=(2.4S/2.1s))*G+0.4R)+E}}}},4Q:8(F,G,E,I,H){b(G<H/2){c U.q.37(F,G*2,0,I,H)*0.5+E}c U.q.2l(F,G*2-H,0,I,H)*0.5+I*0.5+E}})})(U);(8(A){A.e.4O=8(B){c f.11(8(){6 D=A(f),C=["Y","u","r"];6 H=A.e.17(D,B.d.T||"n");6 G=B.d.1v||"1r";A.e.1b(D,C);D.j();6 J=A.e.1l(D).h({1n:"1k"});6 E=(G=="1r")?"l":"k";6 I=(G=="1r")?J.l():J.k();b(H=="j"){J.h(E,0)}6 F={};F[E]=H=="j"?I:0;J.R(F,B.w,B.d.q,8(){b(H=="n"){D.n()}A.e.13(D,C);A.e.1f(D);b(B.t){B.t.V(D[0],p)}D.12()})})}})(U);(8(A){A.e.4P=8(B){c f.11(8(){6 E=A(f),K=["Y","u","r"];6 J=A.e.17(E,B.d.T||"19");6 M=B.d.1v||"1h";6 C=B.d.1Z||20;6 D=B.d.2T||5;6 G=B.w||4T;b(/j|n/.2g(J)){K.4U("W")}A.e.1b(E,K);E.j();A.e.1l(E);6 F=(M=="1h"||M=="2h")?"u":"r";6 O=(M=="1h"||M=="r")?"Z":"23";6 C=B.d.1Z||(F=="u"?E.1A({1j:14})/3:E.1D({1j:14})/3);b(J=="j"){E.h("W",0).h(F,O=="Z"?-C:C)}b(J=="n"){C=C/(D*2)}b(J!="n"){D--}b(J=="j"){6 H={W:1};H[F]=(O=="Z"?"+=":"-=")+C;E.R(H,G/2,B.d.q);C=C/2;D--}1p(6 I=0;I<D;I++){6 N={},L={};N[F]=(O=="Z"?"-=":"+=")+C;L[F]=(O=="Z"?"+=":"-=")+C;E.R(N,G/2,B.d.q).R(L,G/2,B.d.q);C=(J=="n")?C*2:C/2}b(J=="n"){6 H={W:0};H[F]=(O=="Z"?"-=":"+=")+C;E.R(H,G/2,B.d.q,8(){E.n();A.e.13(E,K);A.e.1f(E);b(B.t){B.t.V(f,p)}})}18{6 N={},L={};N[F]=(O=="Z"?"-=":"+=")+C;L[F]=(O=="Z"?"+=":"-=")+C;E.R(N,G/2,B.d.q).R(L,G/2,B.d.q,8(){A.e.13(E,K);A.e.1f(E);b(B.t){B.t.V(f,p)}})}E.11("2e",8(){E.12()});E.12()})}})(U);(8(A){A.e.4Y=8(B){c f.11(8(){6 F=A(f),J=["Y","u","r","l","k"];6 I=A.e.17(F,B.d.T||"n");6 K=B.d.1v||"1r";A.e.1b(F,J);F.j();6 C=A.e.1l(F).h({1n:"1k"});6 E=F[0].4X=="4W"?C:F;6 G={1w:(K=="1r")?"l":"k",Y:(K=="1r")?"u":"r"};6 D=(K=="1r")?E.l():E.k();b(I=="j"){E.h(G.1w,0);E.h(G.Y,D/2)}6 H={};H[G.1w]=I=="j"?D:0;H[G.Y]=I=="j"?0:D/2;E.R(H,{11:1J,w:B.w,q:B.d.q,21:8(){b(I=="n"){F.n()}A.e.13(F,J);A.e.1f(F);b(B.t){B.t.V(F[0],p)}F.12()}})})}})(U);(8(A){A.e.4V=8(B){c f.11(8(){6 E=A(f),D=["Y","u","r","W"];6 I=A.e.17(E,B.d.T||"n");6 H=B.d.1v||"r";A.e.1b(E,D);E.j();A.e.1l(E);6 F=(H=="1h"||H=="2h")?"u":"r";6 C=(H=="1h"||H=="r")?"Z":"23";6 J=B.d.1Z||(F=="u"?E.1A({1j:14})/2:E.1D({1j:14})/2);b(I=="j"){E.h("W",0).h(F,C=="Z"?-J:J)}6 G={W:I=="j"?1:0};G[F]=(I=="j"?(C=="Z"?"+=":"-="):(C=="Z"?"-=":"+="))+J;E.R(G,{11:1J,w:B.w,q:B.d.q,21:8(){b(I=="n"){E.n()}A.e.13(E,D);A.e.1f(E);b(B.t){B.t.V(f,p)}E.12()}})})}})(U);(8(A){A.e.2s=8(B){c f.11(8(){6 I=B.d.2f?g.3C(g.1O(B.d.2f)):3;6 E=B.d.2f?g.3C(g.1O(B.d.2f)):3;B.d.T=B.d.T=="1d"?(A(f).2r(":27")?"n":"j"):B.d.T;6 H=A(f).j().h("2a","1k");6 J=H.2G();J.u-=S(H.h("3e"))||0;J.r-=S(H.h("3l"))||0;6 G=H.1D(14);6 C=H.1A(14);1p(6 F=0;F<I;F++){1p(6 D=0;D<E;D++){H.5d().3p("2F").3w("<1L></1L>").h({Y:"2I",2a:"27",r:-D*(G/E),u:-F*(C/I)}).1X().1o("e-2s").h({Y:"2I",1n:"1k",k:G/E,l:C/I,r:J.r+D*(G/E)+(B.d.T=="j"?(D-g.2b(E/2))*(G/E):0),u:J.u+F*(C/I)+(B.d.T=="j"?(F-g.2b(I/2))*(C/I):0),W:B.d.T=="j"?0:1}).R({r:J.r+D*(G/E)+(B.d.T=="j"?0:(D-g.2b(E/2))*(G/E)),u:J.u+F*(C/I)+(B.d.T=="j"?0:(F-g.2b(I/2))*(C/I)),W:B.d.T=="j"?1:0},B.w||3x)}}5e(8(){B.d.T=="j"?H.h({2a:"27"}):H.h({2a:"27"}).n();b(B.t){B.t.V(H[0])}H.12();A(".e-2s").1a()},B.w||3x)})}})(U);(8(A){A.e.5u=8(B){c f.11(8(){6 E=A(f),J=["Y","u","r"];6 G=A.e.17(E,B.d.T||"n");6 N=B.d.1w||15;6 M=!(!B.d.5t);A.e.1b(E,J);E.j();6 D=A.e.1l(E).h({1n:"1k"});6 H=((G=="j")!=M);6 F=H?["k","l"]:["l","k"];6 C=H?[D.k(),D.l()]:[D.l(),D.k()];6 I=/([0-9]+)%/.1K(N);b(I){N=S(I[1])/1q*C[G=="n"?0:1]}b(G=="j"){D.h(M?{l:0,k:N}:{l:N,k:0})}6 L={},K={};L[F[0]]=G=="j"?C[0]:N;K[F[1]]=G=="j"?C[1]:0;D.R(L,B.w/2,B.d.q).R(K,B.w/2,B.d.q,8(){b(G=="n"){E.n()}A.e.13(E,J);A.e.1f(E);b(B.t){B.t.V(E[0],p)}E.12()})})}})(U);(8(A){A.e.5s=8(B){c f.11(8(){6 E=A(f),D=["3F","1I","W"];6 H=A.e.17(E,B.d.T||"j");6 C=B.d.2k||"#5r";6 G=E.h("1I");A.e.1b(E,D);E.j();E.h({3F:"3u",1I:C});6 F={1I:G};b(H=="n"){F.W=0}E.R(F,{11:1J,w:B.w,q:B.d.q,21:8(){b(H=="n"){E.n()}A.e.13(E,D);b(H=="j"&&U.5v.5w){f.1g.5A("5z")}b(B.t){B.t.V(f,p)}E.12()}})})}})(U);(8(A){A.e.5y=8(B){c f.11(8(){6 D=A(f);6 F=A.e.17(D,B.d.T||"j");6 E=B.d.2T||5;b(F=="n"){E--}b(D.2r(":1k")){D.h("W",0);D.j();D.R({W:1},B.w/2,B.d.q);E=E-2}1p(6 C=0;C<E;C++){D.R({W:0},B.w/2,B.d.q).R({W:1},B.w/2,B.d.q)}b(F=="n"){D.R({W:0},B.w/2,B.d.q,8(){D.n();b(B.t){B.t.V(f,p)}})}18{D.R({W:0},B.w/2,B.d.q).R({W:1},B.w/2,B.d.q,8(){b(B.t){B.t.V(f,p)}})}D.11("2e",8(){D.12()});D.12()})}})(U);(8(A){A.e.5x=8(B){c f.11(8(){6 F=A(f);6 C=A.1B(14,{},B.d);6 H=A.e.17(F,B.d.T||"n");6 G=S(B.d.29)||3j;C.3b=14;6 E={l:F.l(),k:F.k()};6 D=G/1q;F.m=(H=="n")?E:{l:E.l*D,k:E.k*D};C.m=F.m;C.29=(H=="n")?G:1q;C.T=H;F.19("2N",C,B.w,B.t);F.12()})};A.e.2N=8(B){c f.11(8(){6 G=A(f);6 D=A.1B(14,{},B.d);6 J=A.e.17(G,B.d.T||"19");6 H=S(B.d.29)||(S(B.d.29)==0?0:(J=="n"?0:1q));6 I=B.d.1v||"1S";6 C=B.d.2M;b(J!="19"){D.2M=C||["3g","3f"];D.13=14}6 F={l:G.l(),k:G.k()};G.m=B.d.m||(J=="j"?{l:0,k:0}:F);6 E={y:I!="5q"?(H/1q):1,x:I!="1r"?(H/1q):1};G.o={l:F.l*E.y,k:F.k*E.x};b(B.d.3b){b(J=="j"){G.m.W=0;G.o.W=1}b(J=="n"){G.m.W=1;G.o.W=0}}D.m=G.m;D.o=G.o;D.T=J;G.19("1w",D,B.w,B.t);G.12()})};A.e.1w=8(B){c f.11(8(){6 C=A(f),N=["Y","u","r","k","l","1n","W"];6 M=["Y","u","r","1n","W"];6 J=["k","l","1n"];6 P=["5p"];6 K=["2H","2C","5i","5h"];6 F=["2y","2B","5g","5f"];6 G=A.e.17(C,B.d.T||"19");6 I=B.d.13||1J;6 E=B.d.2N||"1S";6 O=B.d.2M;6 D={l:C.l(),k:C.k()};C.m=B.d.m||D;C.o=B.d.o||D;b(O){6 H=A.e.3v(O,D);C.m.u=(D.l-C.m.l)*H.y;C.m.r=(D.k-C.m.k)*H.x;C.o.u=(D.l-C.o.l)*H.y;C.o.r=(D.k-C.o.k)*H.x}6 L={m:{y:C.m.l/D.l,x:C.m.k/D.k},o:{y:C.o.l/D.l,x:C.o.k/D.k}};b(E=="5j"||E=="1S"){b(L.m.y!=L.o.y){N=N.1t(K);C.m=A.e.1c(C,K,L.m.y,C.m);C.o=A.e.1c(C,K,L.o.y,C.o)}b(L.m.x!=L.o.x){N=N.1t(F);C.m=A.e.1c(C,F,L.m.x,C.m);C.o=A.e.1c(C,F,L.o.x,C.o)}}b(E=="3d"||E=="1S"){b(L.m.y!=L.o.y){N=N.1t(P);C.m=A.e.1c(C,P,L.m.y,C.m);C.o=A.e.1c(C,P,L.o.y,C.o)}}A.e.1b(C,I?N:M);C.j();A.e.1l(C);C.h("1n","1k").h(C.m);b(E=="3d"||E=="1S"){K=K.1t(["3e","5k"]).1t(P);F=F.1t(["3l","5o"]);J=N.1t(K).1t(F);C.5n("*[k]").1Y(8(){X=A(f);b(I){A.e.1b(X,J)}6 Q={l:X.l(),k:X.k()};X.m={l:Q.l*L.m.y,k:Q.k*L.m.x};X.o={l:Q.l*L.o.y,k:Q.k*L.o.x};b(L.m.y!=L.o.y){X.m=A.e.1c(X,K,L.m.y,X.m);X.o=A.e.1c(X,K,L.o.y,X.o)}b(L.m.x!=L.o.x){X.m=A.e.1c(X,F,L.m.x,X.m);X.o=A.e.1c(X,F,L.o.x,X.o)}X.h(X.m);X.R(X.o,B.w,B.d.q,8(){b(I){A.e.13(X,J)}})})}C.R(C.o,{11:1J,w:B.w,q:B.d.q,21:8(){b(G=="n"){C.n()}A.e.13(C,I?N:M);A.e.1f(C);b(B.t){B.t.V(f,p)}C.12()}})})}})(U);(8(A){A.e.5l=8(B){c f.11(8(){6 E=A(f),K=["Y","u","r"];6 J=A.e.17(E,B.d.T||"19");6 M=B.d.1v||"r";6 C=B.d.1Z||20;6 D=B.d.2T||3;6 G=B.w||B.d.w||2J;A.e.1b(E,K);E.j();A.e.1l(E);6 F=(M=="1h"||M=="2h")?"u":"r";6 O=(M=="1h"||M=="r")?"Z":"23";6 H={},N={},L={};H[F]=(O=="Z"?"-=":"+=")+C;N[F]=(O=="Z"?"+=":"-=")+C*2;L[F]=(O=="Z"?"-=":"+=")+C*2;E.R(H,G,B.d.q);1p(6 I=1;I<D;I++){E.R(N,G,B.d.q).R(L,G,B.d.q)}E.R(N,G,B.d.q).R(H,G/2,B.d.q,8(){A.e.13(E,K);A.e.1f(E);b(B.t){B.t.V(f,p)}});E.11("2e",8(){E.12()});E.12()})}})(U);(8(A){A.e.5m=8(B){c f.11(8(){6 E=A(f),D=["Y","u","r"];6 I=A.e.17(E,B.d.T||"j");6 H=B.d.1v||"r";A.e.1b(E,D);E.j();A.e.1l(E).h({1n:"1k"});6 F=(H=="1h"||H=="2h")?"u":"r";6 C=(H=="1h"||H=="r")?"Z":"23";6 J=B.d.1Z||(F=="u"?E.1A({1j:14}):E.1D({1j:14}));b(I=="j"){E.h(F,C=="Z"?-J:J)}6 G={};G[F]=(I=="j"?(C=="Z"?"+=":"-="):(C=="Z"?"-=":"+="))+J;E.R(G,{11:1J,w:B.w,q:B.d.q,21:8(){b(I=="n"){E.n()}A.e.13(E,D);A.e.1f(E);b(B.t){B.t.V(f,p)}E.12()}})})}})(U);(8(A){A.e.3m=8(B){c f.11(8(){6 E=A(f);6 G=A.e.17(E,B.d.T||"19");6 F=A(B.d.o);6 C=E.2G();6 D=A(\'<1L 5c="54-e-3m"></1L>\').3p(1R.2F);b(B.d.2E){D.1o(B.d.2E)}D.1o(B.d.2E);D.h({u:C.u,r:C.r,l:E.1A()-S(D.h("2H"))-S(D.h("2C")),k:E.1D()-S(D.h("2y"))-S(D.h("2B")),Y:"2I"});C=F.2G();3c={u:C.u,r:C.r,l:F.1A()-S(D.h("2H"))-S(D.h("2C")),k:F.1D()-S(D.h("2y"))-S(D.h("2B"))};D.R(3c,B.w,B.d.q,8(){D.1a();b(B.t){B.t.V(E[0],p)}E.12()})})}})(U);',62,393,'||||||var||function|||if|return|options|effects|this|Math|css||show|width|height|from|hide|to|arguments|easing|left||callback|top|255|duration|||||||||||||||||||||animate|parseInt|mode|jQuery|apply|opacity|child|position|pos||queue|dequeue|restore|true|||setMode|else|effect|remove|save|setTransition|toggle|PI|removeWrapper|style|up|add|margin|hidden|createWrapper|128|overflow|addClass|for|100|vertical|75|concat|pow|direction|size|break|fn|attr|outerHeight|extend|null|outerWidth|start|F0|fA|70158|backgroundColor|false|exec|div|139|case|sqrt|constructor|typeof|document|both|end|sin|removeClass|animateClass|parent|each|distance||complete|defaultView|neg|211||192|visible|unit|percent|visibility|floor|length|parseFloat|fx|pieces|test|down|transparent|5625|color|easeOutBounce|undefined|max|Number|slow|indexOf|is|explode|normal|fast|min|fxWrapper|asin|borderLeftWidth|relative|id|borderRightWidth|borderBottomWidth|169|className|body|offset|borderTopWidth|absolute|140|object|abs|origin|scale|cssText|rgb|match|static|isNaN|times|144|cssUnit|240|230|107|easeOutQuad|morph|245|cos|elem|525|def|165|easeInBounce|swing|224|_hide|fade|animation|content|marginTop|center|middle|switch|_show|150|right|marginLeft|transfer|float|auto|appendTo|getComputedStyle|bottom|default|currentStyle|none|getBaseline|wrap|500|_toggleClass|_removeClass|data|toggleClass|round|_addClass|storage|backgroundImage|ec|__toggle|gold|darkgreen|189|darkkhaki|darkgrey|font|brown|blue|background|cyan|183|darkblue|darkcyan|148|122|153|border|204|darksalmon|233||darkviolet|darkorchid|85|darkolivegreen||fuchsia|darkred|darkorange|darkmagenta|hasClass|215|Function|state|method|call|Moz|Array|join|step|outlineColor|pt|px|em|borderBottomColor|borderLeftColor|borderTopColor|borderRightColor|in|rgba|replaceWith|beige|azure|index|220|black|zIndex|aqua|parentNode|do|toLowerCase|trim|curCSS|nodeName|while|switchClass|padding|easeInOutCirc|blind|bounce|easeInOutBounce|984375|625|250|push|drop|IMG|tagName|clip|green||9375|easeInElastic|easeInCirc|ui||easeInOutExpo|easeOutElastic|easeInOutElastic|easeInOutBack|easeOutBack|easeInBack|class|clone|setTimeout|paddingRight|paddingLeft|paddingBottom|paddingTop|box|marginBottom|shake|slide|find|marginRight|fontSize|horizontal|ffff99|highlight|horizFirst|fold|browser|msie|puff|pulsate|filter|removeAttribute|easeOutExpo|easeOutCirc|maroon|navy|magenta|lime|lightyellow|olive|orange|violet|purple|203|easeInExpo|193|182|lightblue|173|khaki|130|indigo|216|lightcyan|lightpink|lightgrey|238|lightgreen|red|pink|easeInQuint|silver|easeOutQuart|easeInQuart|easeOutQuint|easeInOutQuint|easeInOutSine|easeOutSine|easeInSine|easeInOutCubic|easeInOutQuart|easeInQuad|jswing|easeOutCubic|white|easeInOutQuad|yellow|easeInCubic'.split('|'),0,{}));(function($){$.facebox=function(data,klass){$.facebox.loading()
if(data.ajax)fillFaceboxFromAjax(data.ajax,klass)
else if(data.image)fillFaceboxFromImage(data.image,klass)
else if(data.div)fillFaceboxFromHref(data.div,klass)
else if($.isFunction(data))data.call($)
else $.facebox.reveal(data,klass)}
$.extend($.facebox,{settings:{opacity:0,overlay:true,loadingImage:'/js/jquery/plugins/facebox/loading.gif',closeImage:'/js/jquery/plugins/facebox/closelabel.gif',imageTypes:['png','jpg','jpeg','gif'],faceboxHtml:'\
    <div id="facebox" style="display:none;"> \
      <div class="popup"> \
        <table> \
          <tbody id="facebox-tbody"> \
            <tr> \
              <td class="tl"/><td class="b"/><td class="tr"/> \
            </tr> \
            <tr> \
              <td class="b"/> \
              <td class="body"> \
                <div class="content"> \
                </div> \
                <div class="footer"> \
                  <a href="#" class="close"> \
                    <img src="/js/jquery/plugins/facebox/closelabel.gif" title="close" class="close_image" /> \
                  </a> \
                </div> \
              </td> \
              <td class="b"/> \
            </tr> \
            <tr> \
              <td class="bl"/><td class="b"/><td class="br"/> \
            </tr> \
          </tbody> \
        </table> \
      </div> \
    </div>'},loading:function(){init()
if($('#facebox .loading').length==1)return true
showOverlay()
$('#facebox .content').empty()
$('#facebox .body').children().hide().end().append('<div class="loading"><img src="'+$.facebox.settings.loadingImage+'"/></div>')
$('#facebox').css({top:getPageScroll()[1]+(getPageHeight()/10),left:$(window).width()/2-205}).show()
$(document).bind('keydown.facebox',function(e){if(e.keyCode==27)$.facebox.close()
return true})
$(document).trigger('loading.facebox')},reveal:function(data,klass){$(document).trigger('beforeReveal.facebox')
if(klass)$('#facebox .content').addClass(klass)
$('#facebox .content').append(data)
$('#facebox .loading').remove()
$('#facebox .body').children().fadeIn('normal')
$('#facebox').css('left',$(window).width()/2-($('#facebox table').width()/2))
$(document).trigger('reveal.facebox').trigger('afterReveal.facebox')},close:function(){$(document).trigger('close.facebox')
return false}})
$.fn.facebox=function(settings){if($(this).length==0)return
init(settings)
function clickHandler(){$.facebox.loading(true)
var klass=this.rel.match(/facebox\[?\.(\w+)\]?/)
if(klass)klass=klass[1]
fillFaceboxFromHref(this.href,klass)
return false}
return this.bind('click.facebox',clickHandler)}
function init(settings){if($.facebox.settings.inited)return true
else $.facebox.settings.inited=true
$(document).trigger('init.facebox')
makeCompatible()
var imageTypes=$.facebox.settings.imageTypes.join('|')
$.facebox.settings.imageTypesRegexp=new RegExp('\.('+imageTypes+')$','i')
if(settings)$.extend($.facebox.settings,settings)
$('body').append($.facebox.settings.faceboxHtml)
var preload=[new Image(),new Image()]
preload[0].src=$.facebox.settings.closeImage
preload[1].src=$.facebox.settings.loadingImage
$('#facebox').find('.b:first, .bl').each(function(){preload.push(new Image())
preload.slice(-1).src=$(this).css('background-image').replace(/url\((.+)\)/,'$1')})
$('#facebox .close').click($.facebox.close)
$('#facebox .close_image').attr('src',$.facebox.settings.closeImage)}
function getPageScroll(){var xScroll,yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;xScroll=self.pageXOffset;}else if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;xScroll=document.documentElement.scrollLeft;}else if(document.body){yScroll=document.body.scrollTop;xScroll=document.body.scrollLeft;}
return new Array(xScroll,yScroll)}
function getPageHeight(){var windowHeight
if(self.innerHeight){windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowHeight=document.documentElement.clientHeight;}else if(document.body){windowHeight=document.body.clientHeight;}
return windowHeight}
function makeCompatible(){var $s=$.facebox.settings
$s.loadingImage=$s.loading_image||$s.loadingImage
$s.closeImage=$s.close_image||$s.closeImage
$s.imageTypes=$s.image_types||$s.imageTypes
$s.faceboxHtml=$s.facebox_html||$s.faceboxHtml}
function fillFaceboxFromHref(href,klass){if(href.match(/#/)){var url=window.location.href.split('#')[0]
var target=href.replace(url,'')
if(target=='#')return
$.facebox.reveal($(target).html(),klass)}else if(href.match($.facebox.settings.imageTypesRegexp)){fillFaceboxFromImage(href,klass)}else{fillFaceboxFromAjax(href,klass)}}
function fillFaceboxFromImage(href,klass){var image=new Image()
image.onload=function(){$.facebox.reveal('<div class="image"><img src="'+image.src+'" /></div>',klass)}
image.src=href}
function fillFaceboxFromAjax(href,klass){$.get(href,function(data){$.facebox.reveal(data,klass)})}
function skipOverlay(){return $.facebox.settings.overlay==false||$.facebox.settings.opacity===null}
function showOverlay(){if(skipOverlay())return
if($('#facebox_overlay').length==0)
$("body").append('<div id="facebox_overlay" class="facebox_hide"></div>')
$('#facebox_overlay').hide().addClass("facebox_overlayBG").css('opacity',$.facebox.settings.opacity).click(function(){$(document).trigger('close.facebox')}).fadeIn(200)
return false}
function hideOverlay(){if(skipOverlay())return
$('#facebox_overlay').fadeOut(200,function(){$("#facebox_overlay").removeClass("facebox_overlayBG")
$("#facebox_overlay").addClass("facebox_hide")
$("#facebox_overlay").remove()})
return false}
$(document).bind('close.facebox',function(){$(document).unbind('keydown.facebox')
$('#facebox').fadeOut(function(){$('#facebox .content').removeClass().addClass('content')
hideOverlay()
$('#facebox .loading').remove()
$(document).trigger('afterClose.facebox')})})})(jQuery);(function($){$.ui=$.ui||{};$.ui.autocomplete=$.ui.autocomplete||{};$.ui.autocomplete.ext=$.ui.autocomplete.ext||{};var geonamesInfos=0;var geonamesWarnings=0;var geonamesErrors=0;var selected;$.getGeoRequests=function(){requests=new Object();requests.infos=geonamesInfos;requests.warnings=geonamesWarnings;requests.errors=geonamesErrors;return requests;};$.resetGeoRequests=function(){geonamesInfos=0;geonamesWarnings=0;geonamesErrors=0;}
$.getSelected=function(){return selected;}
$.showCityError=false;$.ui.autocomplete.ext.ajax=function(opt){var ajax=opt.ajax;var idleClass=opt.idleClass;var idleContainer=opt.idleContainer;return{getList:function(input)
{if(input.val().match(/^\s*$/)){return false;}
if(input.val().length<=1){return false;}
$.ajax({type:"GET",dataType:"json",url:ajax,data:"val="+encodeURIComponent(input.val()),complete:function(){if(idleContainer){if(opt.idleToggle){$(idleContainer).hide();}else{$(idleContainer).removeClass(idleClass);}}},beforeSend:function(){if(idleContainer){if(opt.idleToggle){$(idleContainer).show();}else{$(idleContainer).addClass(idleClass);}}},success:function(json){input.trigger("updateList",[json]);_gaq.push(['_trackEvent','Autocomplete','Suggest',ajax]);}});}};};$.ui.autocomplete.ext.templateText=function(opt){var template=$.makeTemplate(opt.templateText,"<%","%>");return{template:function(obj){return template(obj);}};};$.ui.autocomplete.ext.geodata=function(opt){var idleClass=opt.idleClass;var idleContainer=opt.idleContainer;var settings={mandatory:"false",service:"http://ws.geonames.net/searchJSON",dataType:"jsonp",maxRows:"10",featureClass:"P",qstyle:"FULL",token:"9c2c6e4829b9b710c31c5cda4983f83f857397fb",username:"playfm"};if(opt){$.extend(settings,opt);}
if(opt.mandatory){$.showCityError=true}
return{getList:function(input)
{if(input.val().match(/^\s*$/)){return false;}
$.jsonp({url:settings.service+"?dataType="+settings.dataType+"&maxRows="+settings.maxRows
+"&featureClass="+settings.featureClass+"&qstyle="+settings.qstyle+"&username="+settings.username+"&token="+settings.token
+"&name_startsWith="+input.val()+"&callback=?",timeout:3000,complete:function(){if(idleContainer){if(opt.idleToggle){$(idleContainer).hide();}else{$(idleContainer).removeClass(idleClass);}}},beforeSend:function(){if(idleContainer){if(opt.idleToggle){$(idleContainer).show();}else{$(idleContainer).addClass(idleClass);}}},success:function(data,status){input.bind("activate.autocomplete",function(e,d){selected=d.name;})
var prepared_data=[];if(data.geonames!=undefined&&data.geonames.length>0)
{$.map(data.geonames,function(item){prepared_data.push({name:item.name+', '+item.adminName1+', '+item.countryName.toUpperCase(),lat:item.lat,lng:item.lng,country:item.countryName,country_short:item.countryCode,region:item.adminName1,locality:item.name,geonameId:item.geonameId});});input.trigger("updateList",[prepared_data]);geonamesInfos++;}
else{geonamesWarnings++;}},error:function(d,msg){geonamesErrors++;if(idleContainer){if(opt.idleToggle){$(idleContainer).hide();}else{$(idleContainer).removeClass(idleClass);}}}});}}};})(jQuery);(function($){$.ui=$.ui||{};$.ui.autocomplete=$.ui.autocomplete||{};var active;var selected=-1;var url=false;var arrowKeys=[37,38,39,40];$.fn.autocompleteMode=function(container,input,size,opt){var original=input.val();var self=this;$.data(document.body,"autocompleteMode",true);$("body").one("cancel.autocomplete",function(){input.trigger("cancel.autocomplete");if(opt.goToUrl!=undefined&&opt.goToUrl.status){opt.goToUrl.url="/search"}
$("body").trigger("off.autocomplete");});$("body").one("activate.autocomplete",function(){if(active&&active[0]){input.trigger("activate.autocomplete",[$.data(active[0],"originalObject")]);$("body").trigger("off.autocomplete");}else{$("body").trigger("cancel.autocomplete");}});$("body").one("off.autocomplete",function(e,reset){container.remove();$.data(document.body,"autocompleteMode",false);input.unbind("keydown.autocomplete");if(selected>=0)
selected=-1;$("body").add(window).unbind("click.autocomplete").unbind("cancel.autocomplete").unbind("activate.autocomplete");});$(window).bind("click.autocomplete",function(){$("body").trigger("cancel.autocomplete");});var select=function(){active=$("> *",container).removeClass("active").slice(selected,selected+1).addClass("active");if(opt.goToUrl!=undefined&&opt.goToUrl.status){opt.goToUrl.url=$("> *",container).slice(selected,selected+1).children().attr('rel');if(opt.goToUrl.url.indexOf("search?val=")>=0){opt.goToUrl.url+=input.val();}}
input.trigger("itemSelected.autocomplete",[$.data(active[0],"originalObject")]);};container.mousemove(function(e){if(e.target==container[0])return;selected=$("> *",container).index($(e.target).is('li')?$(e.target)[0]:$(e.target).parents('li')[0]);select();}).bind("click.autocomplete",function(e){$("body").trigger("activate.autocomplete");$.data(document.body,"suppressKey",false);});input.bind("keydown.autocomplete",function(e){if(e.which==27){$("body").trigger("cancel.autocomplete");}
else if(e.which==13){$("body").trigger("activate.autocomplete");}
else if(e.which==9){pfmOptions=$(this).data('playfmAutocomplete');if($.data(document.body,"autocompleteMode")&&typeof(pfmOptions)!="undefined"){$(this).playfmAutocomplete_add_item($(this).val(),$(this).val(),opt);$("body").trigger("cancel.autocomplete");$(this).val('');}}
else if(e.which==40||e.which==9||e.which==38){switch(e.which){case 40:e.preventDefault();selected=selected>=size-1?0:selected+1;break;case 9:selected=selected>=size-1?0:selected+1;break;case 38:e.preventDefault();selected=selected<=0?size-1:selected-1;break;default:break;}
select();}else{return true;}
$.data(document.body,"suppressKey",true);});};$.fn.autocomplete=function(opt){opt=$.extend({},{timeout:100,widthOffset:6,getList:function(input){input.trigger("updateList",[opt.list]);},template:function(str,cnt,i){if(opt.CSSlast){if((cnt-1)==i){return"<li class='jq-ui-autocomplete-last'>"+opt.insertText(str)+"</li>";}}
return"<li>"+opt.insertText(str)+"</li>";},insertText:function(str){return str;},match:function(typed){return this.match(new RegExp(typed));},wrapper:"<ul class='jq-ui-autocomplete'></ul>",onEnter:function(value){return false;}},opt);if($.ui.autocomplete.ext){for(var ext in $.ui.autocomplete.ext){if(opt[ext]){opt=$.extend(opt,$.ui.autocomplete.ext[ext](opt));delete opt[ext];}}}
return this.each(function(){var cur=0;$(this).keyup(function(e){if(e.which==8&&$(this).val().length<=1){$('body').trigger('cancel.autocomplete')}}).keydown(function(e){var typingTimeout=$.data(this,"typingTimeout");if(typingTimeout)window.clearInterval(typingTimeout);if(e.which==13){$("body").trigger("activate.autocomplete");if(opt.collection&&opt.collector.allow_new&&$(this).val()){$(this).playfmAutocomplete_add_item($(this).val(),$(this).val(),opt);$("body").trigger("cancel.autocomplete");$(this).val('');$.data(document.body,"suppressKey",false);return false;}
if(opt.onEnter){if(opt.goToUrl!=undefined&&opt.goToUrl.status){if(opt.goToUrl.url=="/search"&&$(this).val().length){opt.goToUrl.url+="?val="+$(this).val();}
$("body").trigger('autocomplete.select',[opt.goToUrl.url]);window.top.location.href=opt.goToUrl.url;}
if(selected==-1){opt.onEnter($(this).val());$("body").trigger("cancel.autocomplete");$.data(document.body,"suppressKey",false);return false;}}}
if($.data(document.body,"suppressKey")){$.data(document.body,"suppressKey",false);}
if($.data(document.body,"autocompleteMode")&&$.inArray(e.which,arrowKeys)>=0){return $('body').trigger('cancel.Autocomplete');}
else if($.data(document.body,"autocompleteMode")&&e.which==13||$.data(document.body,"autocompleteMode")&&e.which==27){return false;}
else if($.data(document.body,"autocompleteMode")&&e.which<32&&e.keyCode!=8&&e.keyCode!=46&&e.keyCode!=37&&e.keyCode!=39&&(cur==$(this).val().length&&cur>0)){return false;}
else if(e.keyCode==9){pfmOptions=$(this).data('options.postUpdateAutocomplete');if($.data(document.body,"autocompleteMode")&&typeof(pfmOptions)!="undefined"){$(this).playfmAutocomplete_add_item($(this).val(),$(this).val(),opt);$("body").trigger("cancel.autocomplete");$(this).val('');}else{$("body").trigger("cancel.autocomplete");$(this).next('input').focus();}}
else{$.data(this,"typingTimeout",window.setTimeout(function(){$(e.target).trigger("autocomplete");},opt.timeout));cur=$(this).val().length;}}).bind("autocomplete",function(){$.data(document.body,"autocompleteMode",true);var self=$(this);self.one("updateList",function(e,list){cnt=list.length;i=1;list=$(list).map(function(){var node=$(opt.template(this,cnt,i))[0];$.data(node,"originalObject",this);i++;return node;});if(!$.data(document.body,"autocompleteMode"))return false;if(!($(this).val().length)){return false};$("body").trigger("off.autocomplete");if(!list.length){self.trigger("no_result.autocomplete");$.data(document.body,"autocompleteMode",false);return false;}else{self.trigger("result.autocomplete");}
var container=list.wrapAll(opt.wrapper).parent();var offset=self.offset();opt.container=container.css({top:offset.top+self.outerHeight(),left:offset.left,width:self.width()}).appendTo("body");$("body").autocompleteMode(container,self,list.length,opt);});opt.getList(self);});});};})(jQuery);jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}
var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}
expires='; expires='+date.toUTCString();}
var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}
return cookieValue;}};(function($){$.extend({metadata:{defaults:{type:'class',name:'metadata',cre:/({.*})/,single:'metadata'},setType:function(type,name){this.defaults.type=type;this.defaults.name=name;},get:function(elem,opts){var settings=$.extend({},this.defaults,opts);if(!settings.single.length)settings.single='metadata';var data=$.data(elem,settings.single);if(data)return data;data="{}";var getData=function(data){if(typeof data!="string")return data;if(data.indexOf('{')<0){data=eval("("+data+")");}}
var getObject=function(data){if(typeof data!="string")return data;data=eval("("+data+")");return data;}
if(settings.type=="html5"){var object={};$(elem.attributes).each(function(){var name=this.nodeName;if(name.match(/^data-/))name=name.replace(/^data-/,'');else return true;object[name]=getObject(this.nodeValue);});}else{if(settings.type=="class"){var m=settings.cre.exec(elem.className);if(m)
data=m[1];}else if(settings.type=="elem"){if(!elem.getElementsByTagName)return;var e=elem.getElementsByTagName(settings.name);if(e.length)
data=$.trim(e[0].innerHTML);}else if(elem.getAttribute!=undefined){var attr=elem.getAttribute(settings.name);if(attr)
data=attr;}
object=getObject(data.indexOf("{")<0?"{"+data+"}":data);}
$.data(elem,settings.single,object);return object;}}});$.fn.metadata=function(opts){return $.metadata.get(this[0],opts);};})(jQuery);var pfShareAndEmbedDiv=null;function pfShareAndEmbed(link,url,type){if(pfShareAndEmbedDiv==null){pfShareAndEmbedDiv=$('body').append('<div id="pfShareAndEmbed"></div><div id="pfShareAndEmbedOverlay"></div>');}
if(type=='page'){var left=link.position().left;if(left>600)left=left-250;var top=link.position().top+30;}else{var left=300;var top=70;}
$('#pfShareAndEmbed').css('left',left);$('#pfShareAndEmbed').css('top',top);$('#pfShareAndEmbed').show();$('#pfShareAndEmbed').html('<span style="margin-bottom: 10px;">Share on:</span><img src="/images/ajax-loader_black.gif" style="float: left;padding: 0px 5px 10px 10px;"/>Loading...');$.ajax({url:'/content/shareAndEmbedFor'+url,success:function(data){$('#pfShareAndEmbed').html(data);pfShareAndEmbedReinit();}});}
function pfShareAndEmbedReinit(){$("#pfShareAndEmbed input").focus(function()
{this.select();});$("#pfShareAndEmbedOverlay").show();$("#pfShareAndEmbed button#pfShareAndEmbedClose").click(function()
{$("#pfShareAndEmbed").hide();$("#pfShareAndEmbedOverlay").hide();});$("#pfShareAndEmbedOverlay").click(function()
{$("#pfShareAndEmbed").hide();$("#pfShareAndEmbedOverlay").hide();});}
/*
 * jquery.qtip. The jQuery tooltip plugin
 *
 * Copyright (c) 2009 Craig Thompson
 * http://craigsworks.com
 *
 * Licensed under MIT
 * http://www.opensource.org/licenses/mit-license.php
 *
 * Launch  : February 2009
 * Version : 1.0.0-rc3
 * Released: Tuesday 12th May, 2009 - 00:00
 * Debug: jquery.qtip.debug.js
 */
(function($)
{$.fn.qtip=function(options,blanket)
{var i,id,interfaces,opts,obj,command,config,api;if(typeof options=='string')
{if(typeof $(this).data('qtip')!=='object')
$.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.NO_TOOLTIP_PRESENT,false);if(options=='api')
return $(this).data('qtip').interfaces[$(this).data('qtip').current];else if(options=='interfaces')
return $(this).data('qtip').interfaces;}
else
{if(!options)options={};if(typeof options.content!=='object'||(options.content.jquery&&options.content.length>0))options.content={text:options.content};if(typeof options.content.title!=='object')options.content.title={text:options.content.title};if(typeof options.position!=='object')options.position={corner:options.position};if(typeof options.position.corner!=='object')options.position.corner={target:options.position.corner,tooltip:options.position.corner};if(typeof options.show!=='object')options.show={when:options.show};if(typeof options.show.when!=='object')options.show.when={event:options.show.when};if(typeof options.show.effect!=='object')options.show.effect={type:options.show.effect};if(typeof options.hide!=='object')options.hide={when:options.hide};if(typeof options.hide.when!=='object')options.hide.when={event:options.hide.when};if(typeof options.hide.effect!=='object')options.hide.effect={type:options.hide.effect};if(typeof options.style!=='object')options.style={name:options.style};options.style=sanitizeStyle(options.style);opts=$.extend(true,{},$.fn.qtip.defaults,options);opts.style=buildStyle.call({options:opts},opts.style);opts.user=$.extend(true,{},options);};return $(this).each(function()
{if(typeof options=='string')
{command=options.toLowerCase();interfaces=$(this).qtip('interfaces');if(typeof interfaces=='object')
{if(blanket===true&&command=='destroy')
while(interfaces.length>0)interfaces[interfaces.length-1].destroy();else
{if(blanket!==true)interfaces=[$(this).qtip('api')];for(i=0;i<interfaces.length;i++)
{if(command=='destroy')interfaces[i].destroy();else if(interfaces[i].status.rendered===true)
{if(command=='show')interfaces[i].show();else if(command=='hide')interfaces[i].hide();else if(command=='focus')interfaces[i].focus();else if(command=='disable')interfaces[i].disable(true);else if(command=='enable')interfaces[i].disable(false);};};};};}
else
{config=$.extend(true,{},opts);config.hide.effect.length=opts.hide.effect.length;config.show.effect.length=opts.show.effect.length;if(config.position.container===false)config.position.container=$(document.body);if(config.position.target===false)config.position.target=$(this);if(config.show.when.target===false)config.show.when.target=$(this);if(config.hide.when.target===false)config.hide.when.target=$(this);id=$.fn.qtip.interfaces.length;for(i=0;i<id;i++)
{if(typeof $.fn.qtip.interfaces[i]=='undefined'){id=i;break;};};obj=new qTip($(this),config,id);$.fn.qtip.interfaces[id]=obj;if(typeof $(this).data('qtip')=='object')
{if(typeof $(this).attr('qtip')==='undefined')
$(this).data('qtip').current=$(this).data('qtip').interfaces.length;$(this).data('qtip').interfaces.push(obj);}
else $(this).data('qtip',{current:0,interfaces:[obj]});if(config.content.prerender===false&&config.show.when.event!==false&&config.show.ready!==true)
{config.show.when.target.bind(config.show.when.event+'.qtip-'+id+'-create',{qtip:id},function(event)
{api=$.fn.qtip.interfaces[event.data.qtip];api.options.show.when.target.unbind(api.options.show.when.event+'.qtip-'+event.data.qtip+'-create');api.cache.mouse={x:event.pageX,y:event.pageY};construct.call(api);api.options.show.when.target.trigger(api.options.show.when.event);});}
else
{obj.cache.mouse={x:config.show.when.target.offset().left,y:config.show.when.target.offset().top};construct.call(obj);}};});};function qTip(target,options,id)
{var self=this;self.id=id;self.options=options;self.status={animated:false,rendered:false,disabled:false,focused:false};self.elements={target:target.addClass(self.options.style.classes.target),tooltip:null,wrapper:null,content:null,contentWrapper:null,title:null,button:null,tip:null,bgiframe:null};self.cache={mouse:{},position:{},toggle:0};self.timers={};$.extend(self,self.options.api,{show:function(event)
{var returned,solo;if(!self.status.rendered)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'show');if(self.elements.tooltip.css('display')!=='none')return self;self.elements.tooltip.stop(true,false);returned=self.beforeShow.call(self,event);if(returned===false)return self;function afterShow()
{if(self.options.position.type!=='static')self.focus();self.onShow.call(self,event);if($.browser.msie)self.elements.tooltip.get(0).style.removeAttribute('filter');};self.cache.toggle=1;if(self.options.position.type!=='static')
self.updatePosition(event,(self.options.show.effect.length>0));if(typeof self.options.show.solo=='object')solo=$(self.options.show.solo);else if(self.options.show.solo===true)solo=$('div.qtip').not(self.elements.tooltip);if(solo)solo.each(function(){if($(this).qtip('api').status.rendered===true)$(this).qtip('api').hide();});if(typeof self.options.show.effect.type=='function')
{self.options.show.effect.type.call(self.elements.tooltip,self.options.show.effect.length);self.elements.tooltip.queue(function(){afterShow();$(this).dequeue();});}
else
{switch(self.options.show.effect.type.toLowerCase())
{case'fade':self.elements.tooltip.fadeIn(self.options.show.effect.length,afterShow);break;case'slide':self.elements.tooltip.slideDown(self.options.show.effect.length,function()
{afterShow();if(self.options.position.type!=='static')self.updatePosition(event,true);});break;case'grow':self.elements.tooltip.show(self.options.show.effect.length,afterShow);break;default:self.elements.tooltip.show(null,afterShow);break;};self.elements.tooltip.addClass(self.options.style.classes.active);};return $.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_SHOWN,'show');},hide:function(event)
{var returned;if(!self.status.rendered)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'hide');else if(self.elements.tooltip.css('display')==='none')return self;clearTimeout(self.timers.show);self.elements.tooltip.stop(true,false);returned=self.beforeHide.call(self,event);if(returned===false)return self;function afterHide(){self.onHide.call(self,event);};self.cache.toggle=0;if(typeof self.options.hide.effect.type=='function')
{self.options.hide.effect.type.call(self.elements.tooltip,self.options.hide.effect.length);self.elements.tooltip.queue(function(){afterHide();$(this).dequeue();});}
else
{switch(self.options.hide.effect.type.toLowerCase())
{case'fade':self.elements.tooltip.fadeOut(self.options.hide.effect.length,afterHide);break;case'slide':self.elements.tooltip.slideUp(self.options.hide.effect.length,afterHide);break;case'grow':self.elements.tooltip.hide(self.options.hide.effect.length,afterHide);break;default:self.elements.tooltip.hide(null,afterHide);break;};self.elements.tooltip.removeClass(self.options.style.classes.active);};return $.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_HIDDEN,'hide');},updatePosition:function(event,animate)
{var i,target,tooltip,coords,mapName,imagePos,newPosition,ieAdjust,ie6Adjust,borderAdjust,mouseAdjust,offset,curPosition,returned
if(!self.status.rendered)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'updatePosition');else if(self.options.position.type=='static')
return $.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.CANNOT_POSITION_STATIC,'updatePosition');target={position:{left:0,top:0},dimensions:{height:0,width:0},corner:self.options.position.corner.target};tooltip={position:self.getPosition(),dimensions:self.getDimensions(),corner:self.options.position.corner.tooltip};if(self.options.position.target!=='mouse')
{if(self.options.position.target.get(0).nodeName.toLowerCase()=='area')
{coords=self.options.position.target.attr('coords').split(',');for(i=0;i<coords.length;i++)coords[i]=parseInt(coords[i]);mapName=self.options.position.target.parent('map').attr('name');imagePos=$('img[usemap="#'+mapName+'"]:first').offset();target.position={left:Math.floor(imagePos.left+coords[0]),top:Math.floor(imagePos.top+coords[1])};switch(self.options.position.target.attr('shape').toLowerCase())
{case'rect':target.dimensions={width:Math.ceil(Math.abs(coords[2]-coords[0])),height:Math.ceil(Math.abs(coords[3]-coords[1]))};break;case'circle':target.dimensions={width:coords[2]+1,height:coords[2]+1};break;case'poly':target.dimensions={width:coords[0],height:coords[1]};for(i=0;i<coords.length;i++)
{if(i%2==0)
{if(coords[i]>target.dimensions.width)
target.dimensions.width=coords[i];if(coords[i]<coords[0])
target.position.left=Math.floor(imagePos.left+coords[i]);}
else
{if(coords[i]>target.dimensions.height)
target.dimensions.height=coords[i];if(coords[i]<coords[1])
target.position.top=Math.floor(imagePos.top+coords[i]);};};target.dimensions.width=target.dimensions.width-(target.position.left-imagePos.left);target.dimensions.height=target.dimensions.height-(target.position.top-imagePos.top);break;default:return $.fn.qtip.log.error.call(self,4,$.fn.qtip.constants.INVALID_AREA_SHAPE,'updatePosition');break;};target.dimensions.width-=2;target.dimensions.height-=2;}
else if(self.options.position.target.add(document.body).length===1)
{target.position={left:$(document).scrollLeft(),top:$(document).scrollTop()};target.dimensions={height:$(window).height(),width:$(window).width()};}
else
{if(typeof self.options.position.target.attr('qtip')!=='undefined')
target.position=self.options.position.target.qtip('api').cache.position;else
target.position=self.options.position.target.offset();target.dimensions={height:self.options.position.target.outerHeight(),width:self.options.position.target.outerWidth()};};newPosition=$.extend({},target.position);if(target.corner.search(/right/i)!==-1)
newPosition.left+=target.dimensions.width;if(target.corner.search(/bottom/i)!==-1)
newPosition.top+=target.dimensions.height;if(target.corner.search(/((top|bottom)Middle)|center/)!==-1)
newPosition.left+=(target.dimensions.width/2);if(target.corner.search(/((left|right)Middle)|center/)!==-1)
newPosition.top+=(target.dimensions.height/2);}
else
{target.position=newPosition={left:self.cache.mouse.x,top:self.cache.mouse.y};target.dimensions={height:1,width:1};};if(tooltip.corner.search(/right/i)!==-1)
newPosition.left-=tooltip.dimensions.width;if(tooltip.corner.search(/bottom/i)!==-1)
newPosition.top-=tooltip.dimensions.height;if(tooltip.corner.search(/((top|bottom)Middle)|center/)!==-1)
newPosition.left-=(tooltip.dimensions.width/2);if(tooltip.corner.search(/((left|right)Middle)|center/)!==-1)
newPosition.top-=(tooltip.dimensions.height/2);ieAdjust=($.browser.msie)?1:0;ie6Adjust=($.browser.msie&&parseInt($.browser.version.charAt(0))===6)?1:0;if(self.options.style.border.radius>0)
{if(tooltip.corner.search(/Left/)!==-1)
newPosition.left-=self.options.style.border.radius;else if(tooltip.corner.search(/Right/)!==-1)
newPosition.left+=self.options.style.border.radius;if(tooltip.corner.search(/Top/)!==-1)
newPosition.top-=self.options.style.border.radius;else if(tooltip.corner.search(/Bottom/)!==-1)
newPosition.top+=self.options.style.border.radius;};if(ieAdjust)
{if(tooltip.corner.search(/top/)!==-1)
newPosition.top-=ieAdjust
else if(tooltip.corner.search(/bottom/)!==-1)
newPosition.top+=ieAdjust
if(tooltip.corner.search(/left/)!==-1)
newPosition.left-=ieAdjust
else if(tooltip.corner.search(/right/)!==-1)
newPosition.left+=ieAdjust
if(tooltip.corner.search(/leftMiddle|rightMiddle/)!==-1)
newPosition.top-=1};if(self.options.position.adjust.screen===true)
newPosition=screenAdjust.call(self,newPosition,target,tooltip);if(self.options.position.target==='mouse'&&self.options.position.adjust.mouse===true)
{if(self.options.position.adjust.screen===true&&self.elements.tip)
mouseAdjust=self.elements.tip.attr('rel');else
mouseAdjust=self.options.position.corner.tooltip;newPosition.left+=(mouseAdjust.search(/right/i)!==-1)?-6:6;newPosition.top+=(mouseAdjust.search(/bottom/i)!==-1)?-6:6;}
if(!self.elements.bgiframe&&$.browser.msie&&parseInt($.browser.version.charAt(0))==6)
{$('select, object').each(function()
{offset=$(this).offset();offset.bottom=offset.top+$(this).height();offset.right=offset.left+$(this).width();if(newPosition.top+tooltip.dimensions.height>=offset.top&&newPosition.left+tooltip.dimensions.width>=offset.left)
bgiframe.call(self);});};newPosition.left+=self.options.position.adjust.x;newPosition.top+=self.options.position.adjust.y;curPosition=self.getPosition();if(newPosition.left!=curPosition.left||newPosition.top!=curPosition.top)
{returned=self.beforePositionUpdate.call(self,event);if(returned===false)return self;self.cache.position=newPosition;if(animate===true)
{self.status.animated=true;self.elements.tooltip.animate(newPosition,200,'swing',function(){self.status.animated=false});}
else self.elements.tooltip.css(newPosition);self.onPositionUpdate.call(self,event);if(typeof event!=='undefined'&&event.type&&event.type!=='mousemove')
$.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_POSITION_UPDATED,'updatePosition');};return self;},updateWidth:function(newWidth)
{var hidden;if(!self.status.rendered)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'updateWidth');else if(newWidth&&typeof newWidth!=='number')
return $.fn.qtip.log.error.call(self,2,'newWidth must be of type number','updateWidth');hidden=self.elements.contentWrapper.siblings().add(self.elements.tip).add(self.elements.button);if(!newWidth)
{if(typeof self.options.style.width.value=='number')
newWidth=self.options.style.width.value;else
{self.elements.tooltip.css({width:'auto'});hidden.hide();if($.browser.msie)
self.elements.wrapper.add(self.elements.contentWrapper.children()).css({zoom:'normal'});newWidth=self.getDimensions().width+1;if(!self.options.style.width.value)
{if(newWidth>self.options.style.width.max)newWidth=self.options.style.width.max
if(newWidth<self.options.style.width.min)newWidth=self.options.style.width.min};};};if(newWidth%2!==0)newWidth-=1;self.elements.tooltip.width(newWidth);hidden.show();if(self.options.style.border.radius)
{self.elements.tooltip.find('.qtip-betweenCorners').each(function(i)
{$(this).width(newWidth-(self.options.style.border.radius*2));})};if($.browser.msie)
{self.elements.wrapper.add(self.elements.contentWrapper.children()).css({zoom:'1'});self.elements.wrapper.width(newWidth);if(self.elements.bgiframe)self.elements.bgiframe.width(newWidth).height(self.getDimensions.height);};return $.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_WIDTH_UPDATED,'updateWidth');},updateStyle:function(name)
{var tip,borders,context,corner,coordinates;if(!self.status.rendered)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'updateStyle');else if(typeof name!=='string'||!$.fn.qtip.styles[name])
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.STYLE_NOT_DEFINED,'updateStyle');self.options.style=buildStyle.call(self,$.fn.qtip.styles[name],self.options.user.style);self.elements.content.css(jQueryStyle(self.options.style));if(self.options.content.title.text!==false)
self.elements.title.css(jQueryStyle(self.options.style.title,true));self.elements.contentWrapper.css({borderColor:self.options.style.border.color});if(self.options.style.tip.corner!==false)
{if($('<canvas>').get(0).getContext)
{tip=self.elements.tooltip.find('.qtip-tip canvas:first');context=tip.get(0).getContext('2d');context.clearRect(0,0,300,300);corner=tip.parent('div[rel]:first').attr('rel');coordinates=calculateTip(corner,self.options.style.tip.size.width,self.options.style.tip.size.height);drawTip.call(self,tip,coordinates,self.options.style.tip.color||self.options.style.border.color);}
else if($.browser.msie)
{tip=self.elements.tooltip.find('.qtip-tip [nodeName="shape"]');tip.attr('fillcolor',self.options.style.tip.color||self.options.style.border.color);};};if(self.options.style.border.radius>0)
{self.elements.tooltip.find('.qtip-betweenCorners').css({backgroundColor:self.options.style.border.color});if($('<canvas>').get(0).getContext)
{borders=calculateBorders(self.options.style.border.radius)
self.elements.tooltip.find('.qtip-wrapper canvas').each(function()
{context=$(this).get(0).getContext('2d');context.clearRect(0,0,300,300);corner=$(this).parent('div[rel]:first').attr('rel')
drawBorder.call(self,$(this),borders[corner],self.options.style.border.radius,self.options.style.border.color);});}
else if($.browser.msie)
{self.elements.tooltip.find('.qtip-wrapper [nodeName="arc"]').each(function()
{$(this).attr('fillcolor',self.options.style.border.color)});};};return $.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_STYLE_UPDATED,'updateStyle');},updateContent:function(content,reposition)
{var parsedContent,images,loadedImages;if(!self.status.rendered)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'updateContent');else if(!content)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.NO_CONTENT_PROVIDED,'updateContent');parsedContent=self.beforeContentUpdate.call(self,content);if(typeof parsedContent=='string')content=parsedContent;else if(parsedContent===false)return;if($.browser.msie)self.elements.contentWrapper.children().css({zoom:'normal'});if(content.jquery&&content.length>0)
content.clone(true).appendTo(self.elements.content).show();else self.elements.content.html(content);images=self.elements.content.find('img[complete=false]');if(images.length>0)
{loadedImages=0;images.each(function(i)
{$('<img src="'+$(this).attr('src')+'" />').load(function(){if(++loadedImages==images.length)afterLoad();});});}
else afterLoad();function afterLoad()
{self.updateWidth();if(reposition!==false)
{if(self.options.position.type!=='static')
self.updatePosition(self.elements.tooltip.is(':visible'),true);if(self.options.style.tip.corner!==false)
positionTip.call(self);};};self.onContentUpdate.call(self);return $.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_CONTENT_UPDATED,'loadContent');},loadContent:function(url,data,method)
{var returned;if(!self.status.rendered)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'loadContent');returned=self.beforeContentLoad.call(self);if(returned===false)return self;if(method=='post')
$.post(url,data,setupContent);else
$.get(url,data,setupContent);function setupContent(content)
{self.onContentLoad.call(self);$.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_CONTENT_LOADED,'loadContent');self.updateContent(content);};return self;},updateTitle:function(content)
{if(!self.status.rendered)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'updateTitle');else if(!content)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.NO_CONTENT_PROVIDED,'updateTitle');returned=self.beforeTitleUpdate.call(self);if(returned===false)return self;if(self.elements.button)self.elements.button=self.elements.button.clone(true);self.elements.title.html(content)
if(self.elements.button)self.elements.title.prepend(self.elements.button);self.onTitleUpdate.call(self);return $.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_TITLE_UPDATED,'updateTitle');},focus:function(event)
{var curIndex,newIndex,elemIndex,returned;if(!self.status.rendered)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'focus');else if(self.options.position.type=='static')
return $.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.CANNOT_FOCUS_STATIC,'focus');curIndex=parseInt(self.elements.tooltip.css('z-index'));newIndex=6000+$('div.qtip[qtip]').length-1;if(!self.status.focused&&curIndex!==newIndex)
{returned=self.beforeFocus.call(self,event);if(returned===false)return self;$('div.qtip[qtip]').not(self.elements.tooltip).each(function()
{if($(this).qtip('api').status.rendered===true)
{elemIndex=parseInt($(this).css('z-index'));if(typeof elemIndex=='number'&&elemIndex>-1)
$(this).css({zIndex:parseInt($(this).css('z-index'))-1});$(this).qtip('api').status.focused=false;}})
self.elements.tooltip.css({zIndex:newIndex});self.status.focused=true;self.onFocus.call(self,event);$.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_FOCUSED,'focus');};return self;},disable:function(state)
{if(!self.status.rendered)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'disable');if(state)
{if(!self.status.disabled)
{self.status.disabled=true;$.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_DISABLED,'disable');}
else $.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.TOOLTIP_ALREADY_DISABLED,'disable');}
else
{if(self.status.disabled)
{self.status.disabled=false;$.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_ENABLED,'disable');}
else $.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.TOOLTIP_ALREADY_ENABLED,'disable');};return self;},destroy:function()
{var i,returned,interfaces;returned=self.beforeDestroy.call(self);if(returned===false)return self;if(self.status.rendered)
{self.options.show.when.target.unbind('mousemove.qtip',self.updatePosition);self.options.show.when.target.unbind('mouseout.qtip',self.hide);self.options.show.when.target.unbind(self.options.show.when.event+'.qtip');self.options.hide.when.target.unbind(self.options.hide.when.event+'.qtip');self.elements.tooltip.unbind(self.options.hide.when.event+'.qtip');self.elements.tooltip.unbind('mouseover.qtip',self.focus);self.elements.tooltip.remove();}
else self.options.show.when.target.unbind(self.options.show.when.event+'.qtip-create');if(typeof self.elements.target.data('qtip')=='object')
{interfaces=self.elements.target.data('qtip').interfaces;if(typeof interfaces=='object'&&interfaces.length>0)
{for(i=0;i<interfaces.length-1;i++)
if(interfaces[i].id==self.id)interfaces.splice(i,1)}}
delete $.fn.qtip.interfaces[self.id];if(typeof interfaces=='object'&&interfaces.length>0)
self.elements.target.data('qtip').current=interfaces.length-1;else
self.elements.target.removeData('qtip');self.onDestroy.call(self);$.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_DESTROYED,'destroy');return self.elements.target},getPosition:function()
{var show,offset;if(!self.status.rendered)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'getPosition');show=(self.elements.tooltip.css('display')!=='none')?false:true;if(show)self.elements.tooltip.css({visiblity:'hidden'}).show();offset=self.elements.tooltip.offset();if(show)self.elements.tooltip.css({visiblity:'visible'}).hide();return offset;},getDimensions:function()
{var show,dimensions;if(!self.status.rendered)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'getDimensions');show=(!self.elements.tooltip.is(':visible'))?true:false;if(show)self.elements.tooltip.css({visiblity:'hidden'}).show();dimensions={height:self.elements.tooltip.outerHeight(),width:self.elements.tooltip.outerWidth()};if(show)self.elements.tooltip.css({visiblity:'visible'}).hide();return dimensions;}});};function construct()
{var self,adjust,content,url,data,method,tempLength;self=this;self.beforeRender.call(self);self.status.rendered=true;self.elements.tooltip='<div qtip="'+self.id+'" '+'class="qtip '+(self.options.style.classes.tooltip||self.options.style)+'"'+'style="display:none; -moz-border-radius:0; -webkit-border-radius:0; border-radius:0;'+'position:'+self.options.position.type+';">'+'  <div class="qtip-wrapper" style="position:relative; overflow:hidden; text-align:left;">'+'    <div class="qtip-contentWrapper" style="overflow:hidden;">'+'       <div class="qtip-content '+self.options.style.classes.content+'"></div>'+'</div></div></div>';self.elements.tooltip=$(self.elements.tooltip);self.elements.tooltip.appendTo(self.options.position.container)
self.elements.tooltip.data('qtip',{current:0,interfaces:[self]});self.elements.wrapper=self.elements.tooltip.children('div:first');self.elements.contentWrapper=self.elements.wrapper.children('div:first').css({background:self.options.style.background});self.elements.content=self.elements.contentWrapper.children('div:first').css(jQueryStyle(self.options.style));if($.browser.msie)self.elements.wrapper.add(self.elements.content).css({zoom:1});if(self.options.hide.when.event=='unfocus')self.elements.tooltip.attr('unfocus',true);if(typeof self.options.style.width.value=='number')self.updateWidth();if($('<canvas>').get(0).getContext||$.browser.msie)
{if(self.options.style.border.radius>0)
createBorder.call(self);else
self.elements.contentWrapper.css({border:self.options.style.border.width+'px solid '+self.options.style.border.color});if(self.options.style.tip.corner!==false)
createTip.call(self);}
else
{self.elements.contentWrapper.css({border:self.options.style.border.width+'px solid '+self.options.style.border.color});self.options.style.border.radius=0;self.options.style.tip.corner=false;$.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.CANVAS_VML_NOT_SUPPORTED,'render');};if((typeof self.options.content.text=='string'&&self.options.content.text.length>0)||(self.options.content.text.jquery&&self.options.content.text.length>0))
content=self.options.content.text;else if(typeof self.elements.target.attr('title')=='string'&&self.elements.target.attr('title').length>0)
{content=self.elements.target.attr('title').replace("\\n",'<br />');self.elements.target.attr('title','');}
else if(typeof self.elements.target.attr('alt')=='string'&&self.elements.target.attr('alt').length>0)
{content=self.elements.target.attr('alt').replace("\\n",'<br />');self.elements.target.attr('alt','');}
else
{content=' ';$.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.NO_VALID_CONTENT,'render');};if(self.options.content.title.text!==false)createTitle.call(self);self.updateContent(content);assignEvents.call(self);if(self.options.show.ready===true)self.show();if(self.options.content.url!==false)
{url=self.options.content.url;data=self.options.content.data;method=self.options.content.method||'get';self.loadContent(url,data,method);};self.onRender.call(self);$.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_RENDERED,'render');};function createBorder()
{var self,i,width,radius,color,coordinates,containers,size,betweenWidth,betweenCorners,borderTop,borderBottom,borderCoord,sideWidth,vertWidth;self=this;self.elements.wrapper.find('.qtip-borderBottom, .qtip-borderTop').remove();width=self.options.style.border.width;radius=self.options.style.border.radius;color=self.options.style.border.color||self.options.style.tip.color;coordinates=calculateBorders(radius);containers={};for(i in coordinates)
{containers[i]='<div rel="'+i+'" style="'+((i.search(/Left/)!==-1)?'left':'right')+':0; '+'position:absolute; height:'+radius+'px; width:'+radius+'px; overflow:hidden; line-height:0.1px; font-size:1px">';if($('<canvas>').get(0).getContext)
containers[i]+='<canvas height="'+radius+'" width="'+radius+'" style="vertical-align: top"></canvas>';else if($.browser.msie)
{size=radius*2+3;containers[i]+='<v:arc stroked="false" fillcolor="'+color+'" startangle="'+coordinates[i][0]+'" endangle="'+coordinates[i][1]+'" '+'style="width:'+size+'px; height:'+size+'px; margin-top:'+((i.search(/bottom/)!==-1)?-2:-1)+'px; '+'margin-left:'+((i.search(/Right/)!==-1)?coordinates[i][2]-3.5:-1)+'px; '+'vertical-align:top; display:inline-block; behavior:url(#default#VML)"></v:arc>';};containers[i]+='</div>';};betweenWidth=self.getDimensions().width-(Math.max(width,radius)*2);betweenCorners='<div class="qtip-betweenCorners" style="height:'+radius+'px; width:'+betweenWidth+'px; '+'overflow:hidden; background-color:'+color+'; line-height:0.1px; font-size:1px;">';borderTop='<div class="qtip-borderTop" dir="ltr" style="height:'+radius+'px; '+'margin-left:'+radius+'px; line-height:0.1px; font-size:1px; padding:0;">'+
containers['topLeft']+containers['topRight']+betweenCorners;self.elements.wrapper.prepend(borderTop);borderBottom='<div class="qtip-borderBottom" dir="ltr" style="height:'+radius+'px; '+'margin-left:'+radius+'px; line-height:0.1px; font-size:1px; padding:0;">'+
containers['bottomLeft']+containers['bottomRight']+betweenCorners;self.elements.wrapper.append(borderBottom);if($('<canvas>').get(0).getContext)
{self.elements.wrapper.find('canvas').each(function()
{borderCoord=coordinates[$(this).parent('[rel]:first').attr('rel')];drawBorder.call(self,$(this),borderCoord,radius,color);})}
else if($.browser.msie)self.elements.tooltip.append('<v:image style="behavior:url(#default#VML);"></v:image>');sideWidth=Math.max(radius,(radius+(width-radius)))
vertWidth=Math.max(width-radius,0);self.elements.contentWrapper.css({border:'0px solid '+color,borderWidth:vertWidth+'px '+sideWidth+'px'})};function drawBorder(canvas,coordinates,radius,color)
{var context=canvas.get(0).getContext('2d');context.fillStyle=color;context.beginPath();context.arc(coordinates[0],coordinates[1],radius,0,Math.PI*2,false);context.fill();};function createTip(corner)
{var self,color,coordinates,coordsize,path;self=this;if(self.elements.tip!==null)self.elements.tip.remove();color=self.options.style.tip.color||self.options.style.border.color;if(self.options.style.tip.corner===false)return;else if(!corner)corner=self.options.style.tip.corner;coordinates=calculateTip(corner,self.options.style.tip.size.width,self.options.style.tip.size.height);self.elements.tip='<div class="'+self.options.style.classes.tip+'" dir="ltr" rel="'+corner+'" style="position:absolute; '+'height:'+self.options.style.tip.size.height+'px; width:'+self.options.style.tip.size.width+'px; '+'margin:0 auto; line-height:0.1px; font-size:1px;">';if($('<canvas>').get(0).getContext)
self.elements.tip+='<canvas height="'+self.options.style.tip.size.height+'" width="'+self.options.style.tip.size.width+'"></canvas>';else if($.browser.msie)
{coordsize=self.options.style.tip.size.width+','+self.options.style.tip.size.height;path='m'+coordinates[0][0]+','+coordinates[0][1];path+=' l'+coordinates[1][0]+','+coordinates[1][1];path+=' '+coordinates[2][0]+','+coordinates[2][1];path+=' xe';self.elements.tip+='<v:shape fillcolor="'+color+'" stroked="false" filled="true" path="'+path+'" coordsize="'+coordsize+'" '+'style="width:'+self.options.style.tip.size.width+'px; height:'+self.options.style.tip.size.height+'px; '+'line-height:0.1px; display:inline-block; behavior:url(#default#VML); '+'vertical-align:'+((corner.search(/top/)!==-1)?'bottom':'top')+'"></v:shape>';self.elements.tip+='<v:image style="behavior:url(#default#VML);"></v:image>';self.elements.contentWrapper.css('position','relative');};self.elements.tooltip.prepend(self.elements.tip+'</div>');self.elements.tip=self.elements.tooltip.find('.'+self.options.style.classes.tip).eq(0);if($('<canvas>').get(0).getContext)
drawTip.call(self,self.elements.tip.find('canvas:first'),coordinates,color);if(corner.search(/top/)!==-1&&$.browser.msie&&parseInt($.browser.version.charAt(0))===6)
self.elements.tip.css({marginTop:-4});positionTip.call(self,corner);};function drawTip(canvas,coordinates,color)
{var context=canvas.get(0).getContext('2d');context.fillStyle=color;context.beginPath();context.moveTo(coordinates[0][0],coordinates[0][1]);context.lineTo(coordinates[1][0],coordinates[1][1]);context.lineTo(coordinates[2][0],coordinates[2][1]);context.fill();};function positionTip(corner)
{var self,ieAdjust,paddingCorner,paddingSize,newMargin;self=this;if(self.options.style.tip.corner===false||!self.elements.tip)return;if(!corner)corner=self.elements.tip.attr('rel');ieAdjust=positionAdjust=($.browser.msie)?1:0;self.elements.tip.css(corner.match(/left|right|top|bottom/)[0],0);if(corner.search(/top|bottom/)!==-1)
{if($.browser.msie)
{if(parseInt($.browser.version.charAt(0))===6)
positionAdjust=(corner.search(/top/)!==-1)?-3:1;else
positionAdjust=(corner.search(/top/)!==-1)?1:2;};if(corner.search(/Middle/)!==-1)
self.elements.tip.css({left:'50%',marginLeft:-(self.options.style.tip.size.width/2)});else if(corner.search(/Left/)!==-1)
self.elements.tip.css({left:self.options.style.border.radius-ieAdjust});else if(corner.search(/Right/)!==-1)
self.elements.tip.css({right:self.options.style.border.radius+ieAdjust});if(corner.search(/top/)!==-1)
self.elements.tip.css({top:-positionAdjust});else
self.elements.tip.css({bottom:positionAdjust});}
else if(corner.search(/left|right/)!==-1)
{if($.browser.msie)
positionAdjust=(parseInt($.browser.version.charAt(0))===6)?1:((corner.search(/left/)!==-1)?1:2);if(corner.search(/Middle/)!==-1)
self.elements.tip.css({top:'50%',marginTop:-(self.options.style.tip.size.height/2)});else if(corner.search(/Top/)!==-1)
self.elements.tip.css({top:self.options.style.border.radius-ieAdjust});else if(corner.search(/Bottom/)!==-1)
self.elements.tip.css({bottom:self.options.style.border.radius+ieAdjust});if(corner.search(/left/)!==-1)
self.elements.tip.css({left:-positionAdjust});else
self.elements.tip.css({right:positionAdjust});};paddingCorner='padding-'+corner.match(/left|right|top|bottom/)[0];paddingSize=self.options.style.tip.size[(paddingCorner.search(/left|right/)!==-1)?'width':'height'];self.elements.tooltip.css('padding',0);self.elements.tooltip.css(paddingCorner,paddingSize);if($.browser.msie&&parseInt($.browser.version.charAt(0))==6)
{newMargin=parseInt(self.elements.tip.css('margin-top'))||0;newMargin+=parseInt(self.elements.content.css('margin-top'))||0;self.elements.tip.css({marginTop:newMargin});};};function createTitle()
{var self=this;if(self.elements.title!==null)self.elements.title.remove();self.elements.title=$('<div class="'+self.options.style.classes.title+'">').css(jQueryStyle(self.options.style.title,true)).css({zoom:($.browser.msie)?1:0}).prependTo(self.elements.contentWrapper);if(self.options.content.title.text)self.updateTitle.call(self,self.options.content.title.text);if(self.options.content.title.button!==false&&typeof self.options.content.title.button=='string')
{self.elements.button=$('<a class="'+self.options.style.classes.button+'" style="float:right; position: relative"></a>').css(jQueryStyle(self.options.style.button,true)).html(self.options.content.title.button).prependTo(self.elements.title).click(function(event){if(!self.status.disabled)self.hide(event)});};};function assignEvents()
{var self,showTarget,hideTarget,inactiveEvents;self=this;showTarget=self.options.show.when.target;hideTarget=self.options.hide.when.target;if(self.options.hide.fixed)hideTarget=hideTarget.add(self.elements.tooltip);if(self.options.hide.when.event=='inactive')
{inactiveEvents=['click','dblclick','mousedown','mouseup','mousemove','mouseout','mouseenter','mouseleave','mouseover'];function inactiveMethod(event)
{if(self.status.disabled===true)return;clearTimeout(self.timers.inactive);self.timers.inactive=setTimeout(function()
{$(inactiveEvents).each(function()
{hideTarget.unbind(this+'.qtip-inactive');self.elements.content.unbind(this+'.qtip-inactive');});self.hide(event);},self.options.hide.delay);};}
else if(self.options.hide.fixed===true)
{self.elements.tooltip.bind('mouseover.qtip',function()
{if(self.status.disabled===true)return;clearTimeout(self.timers.hide);});};function showMethod(event)
{if(self.status.disabled===true)return;if(self.options.hide.when.event=='inactive')
{$(inactiveEvents).each(function()
{hideTarget.bind(this+'.qtip-inactive',inactiveMethod);self.elements.content.bind(this+'.qtip-inactive',inactiveMethod);});inactiveMethod();};clearTimeout(self.timers.show);clearTimeout(self.timers.hide);self.timers.show=setTimeout(function(){self.show(event);},self.options.show.delay);};function hideMethod(event)
{if(self.status.disabled===true)return;if(self.options.hide.fixed===true&&self.options.hide.when.event.search(/mouse(out|leave)/i)!==-1&&$(event.relatedTarget).parents('div.qtip[qtip]').length>0)
{event.stopPropagation();event.preventDefault();clearTimeout(self.timers.hide);return false;};clearTimeout(self.timers.show);clearTimeout(self.timers.hide);self.elements.tooltip.stop(true,true);self.timers.hide=setTimeout(function(){self.hide(event);},self.options.hide.delay);};if((self.options.show.when.target.add(self.options.hide.when.target).length===1&&self.options.show.when.event==self.options.hide.when.event&&self.options.hide.when.event!=='inactive')||self.options.hide.when.event=='unfocus')
{self.cache.toggle=0;showTarget.bind(self.options.show.when.event+'.qtip',function(event)
{if(self.cache.toggle==0)showMethod(event);else hideMethod(event);});}
else
{showTarget.bind(self.options.show.when.event+'.qtip',showMethod);if(self.options.hide.when.event!=='inactive')
hideTarget.bind(self.options.hide.when.event+'.qtip',hideMethod);};if(self.options.position.type.search(/(fixed|absolute)/)!==-1)
self.elements.tooltip.bind('mouseover.qtip',self.focus);if(self.options.position.target==='mouse'&&self.options.position.type!=='static')
{showTarget.bind('mousemove.qtip',function(event)
{self.cache.mouse={x:event.pageX,y:event.pageY};if(self.status.disabled===false&&self.options.position.adjust.mouse===true&&self.options.position.type!=='static'&&self.elements.tooltip.css('display')!=='none')
self.updatePosition(event);});};};function screenAdjust(position,target,tooltip)
{var self,adjustedPosition,adjust,newCorner,overflow,corner;self=this;if(tooltip.corner=='center')return target.position
adjustedPosition=$.extend({},position);newCorner={x:false,y:false};overflow={left:(adjustedPosition.left<$.fn.qtip.cache.screen.scroll.left),right:(adjustedPosition.left+tooltip.dimensions.width+2>=$.fn.qtip.cache.screen.width+$.fn.qtip.cache.screen.scroll.left),top:(adjustedPosition.top<$.fn.qtip.cache.screen.scroll.top),bottom:(adjustedPosition.top+tooltip.dimensions.height+2>=$.fn.qtip.cache.screen.height+$.fn.qtip.cache.screen.scroll.top)};adjust={left:(overflow.left&&(tooltip.corner.search(/right/i)!=-1||(tooltip.corner.search(/right/i)==-1&&!overflow.right))),right:(overflow.right&&(tooltip.corner.search(/left/i)!=-1||(tooltip.corner.search(/left/i)==-1&&!overflow.left))),top:(overflow.top&&tooltip.corner.search(/top/i)==-1),bottom:(overflow.bottom&&tooltip.corner.search(/bottom/i)==-1)};if(adjust.left)
{if(self.options.position.target!=='mouse')
adjustedPosition.left=target.position.left+target.dimensions.width;else
adjustedPosition.left=self.cache.mouse.x
newCorner.x='Left';}
else if(adjust.right)
{if(self.options.position.target!=='mouse')
adjustedPosition.left=target.position.left-tooltip.dimensions.width;else
adjustedPosition.left=self.cache.mouse.x-tooltip.dimensions.width;newCorner.x='Right';};if(adjust.top)
{if(self.options.position.target!=='mouse')
adjustedPosition.top=target.position.top+target.dimensions.height;else
adjustedPosition.top=self.cache.mouse.y
newCorner.y='top';}
else if(adjust.bottom)
{if(self.options.position.target!=='mouse')
adjustedPosition.top=target.position.top-tooltip.dimensions.height;else
adjustedPosition.top=self.cache.mouse.y-tooltip.dimensions.height;newCorner.y='bottom';};if(adjustedPosition.left<0)
{adjustedPosition.left=position.left;newCorner.x=false;};if(adjustedPosition.top<0)
{adjustedPosition.top=position.top;newCorner.y=false;};if(self.options.style.tip.corner!==false)
{adjustedPosition.corner=new String(tooltip.corner);if(newCorner.x!==false)adjustedPosition.corner=adjustedPosition.corner.replace(/Left|Right|Middle/,newCorner.x);if(newCorner.y!==false)adjustedPosition.corner=adjustedPosition.corner.replace(/top|bottom/,newCorner.y);if(adjustedPosition.corner!==self.elements.tip.attr('rel'))
createTip.call(self,adjustedPosition.corner);};return adjustedPosition;};function jQueryStyle(style,sub)
{var styleObj,i;styleObj=$.extend(true,{},style);for(i in styleObj)
{if(sub===true&&i.search(/(tip|classes)/i)!==-1)
delete styleObj[i];else if(!sub&&i.search(/(width|border|tip|title|classes|user)/i)!==-1)
delete styleObj[i];};return styleObj;};function sanitizeStyle(style)
{if(typeof style.tip!=='object')style.tip={corner:style.tip};if(typeof style.tip.size!=='object')style.tip.size={width:style.tip.size,height:style.tip.size};if(typeof style.border!=='object')style.border={width:style.border};if(typeof style.width!=='object')style.width={value:style.width};if(typeof style.width.max=='string')style.width.max=parseInt(style.width.max.replace(/([0-9]+)/i,"$1"));if(typeof style.width.min=='string')style.width.min=parseInt(style.width.min.replace(/([0-9]+)/i,"$1"));if(typeof style.tip.size.x=='number')
{style.tip.size.width=style.tip.size.x;delete style.tip.size.x;};if(typeof style.tip.size.y=='number')
{style.tip.size.height=style.tip.size.y;delete style.tip.size.y;};return style;};function buildStyle()
{var self,i,styleArray,styleExtend,finalStyle,ieAdjust;self=this;styleArray=[true,{}];for(i=0;i<arguments.length;i++)
styleArray.push(arguments[i]);styleExtend=[$.extend.apply($,styleArray)];while(typeof styleExtend[0].name=='string')
{styleExtend.unshift(sanitizeStyle($.fn.qtip.styles[styleExtend[0].name]));};styleExtend.unshift(true,{classes:{tooltip:'qtip-'+(arguments[0].name||'defaults')}},$.fn.qtip.styles.defaults);finalStyle=$.extend.apply($,styleExtend);ieAdjust=($.browser.msie)?1:0;finalStyle.tip.size.width+=ieAdjust;finalStyle.tip.size.height+=ieAdjust;if(finalStyle.tip.size.width%2>0)finalStyle.tip.size.width+=1;if(finalStyle.tip.size.height%2>0)finalStyle.tip.size.height+=1;if(finalStyle.tip.corner===true)
finalStyle.tip.corner=(self.options.position.corner.tooltip==='center')?false:self.options.position.corner.tooltip;return finalStyle;};function calculateTip(corner,width,height)
{var tips={bottomRight:[[0,0],[width,height],[width,0]],bottomLeft:[[0,0],[width,0],[0,height]],topRight:[[0,height],[width,0],[width,height]],topLeft:[[0,0],[0,height],[width,height]],topMiddle:[[0,height],[width/2,0],[width,height]],bottomMiddle:[[0,0],[width,0],[width/2,height]],rightMiddle:[[0,0],[width,height/2],[0,height]],leftMiddle:[[width,0],[width,height],[0,height/2]]};tips.leftTop=tips.bottomRight;tips.rightTop=tips.bottomLeft;tips.leftBottom=tips.topRight;tips.rightBottom=tips.topLeft;return tips[corner];};function calculateBorders(radius)
{var borders;if($('<canvas>').get(0).getContext)
{borders={topLeft:[radius,radius],topRight:[0,radius],bottomLeft:[radius,0],bottomRight:[0,0]};}
else if($.browser.msie)
{borders={topLeft:[-90,90,0],topRight:[-90,90,-radius],bottomLeft:[90,270,0],bottomRight:[90,270,-radius]};};return borders;};function bgiframe()
{var self,html,dimensions;self=this;dimensions=self.getDimensions();html='<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:false" '+'style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=\'0\'); border: 1px solid red; '+'height:'+dimensions.height+'px; width:'+dimensions.width+'px" />';self.elements.bgiframe=self.elements.wrapper.prepend(html).children('.qtip-bgiframe:first');};$(document).ready(function()
{$.fn.qtip.cache={screen:{scroll:{left:$(window).scrollLeft(),top:$(window).scrollTop()},width:$(window).width(),height:$(window).height()}};var adjustTimer;$(window).bind('resize scroll',function(event)
{clearTimeout(adjustTimer);adjustTimer=setTimeout(function()
{if(event.type==='scroll')
$.fn.qtip.cache.screen.scroll={left:$(window).scrollLeft(),top:$(window).scrollTop()};else
{$.fn.qtip.cache.screen.width=$(window).width();$.fn.qtip.cache.screen.height=$(window).height();};for(i=0;i<$.fn.qtip.interfaces.length;i++)
{var api=$.fn.qtip.interfaces[i];if(api.status.rendered===true&&(api.options.position.type!=='static'||api.options.position.adjust.scroll&&event.type==='scroll'||api.options.position.adjust.resize&&event.type==='resize'))
{api.updatePosition(event,true);}};},100);})
$(document).bind('mousedown.qtip',function(event)
{if($(event.target).parents('div.qtip').length===0)
{$('.qtip[unfocus]').each(function()
{var api=$(this).qtip("api");if($(this).is(':visible')&&!api.status.disabled&&$(event.target).add(api.elements.target).length>1)
api.hide(event);})};})});$.fn.qtip.interfaces=[]
$.fn.qtip.log={error:function(){return this;}};$.fn.qtip.constants={};$.fn.qtip.defaults={content:{prerender:false,text:false,url:false,data:null,title:{text:false,button:false}},position:{target:false,corner:{target:'bottomRight',tooltip:'topLeft'},adjust:{x:0,y:0,mouse:true,screen:false,scroll:true,resize:true},type:'absolute',container:false},show:{when:{target:false,event:'mouseover'},effect:{type:'fade',length:100},delay:140,solo:false,ready:false},hide:{when:{target:false,event:'mouseout'},effect:{type:'fade',length:100},delay:0,fixed:false},api:{beforeRender:function(){},onRender:function(){},beforePositionUpdate:function(){},onPositionUpdate:function(){},beforeShow:function(){},onShow:function(){},beforeHide:function(){},onHide:function(){},beforeContentUpdate:function(){},onContentUpdate:function(){},beforeContentLoad:function(){},onContentLoad:function(){},beforeTitleUpdate:function(){},onTitleUpdate:function(){},beforeDestroy:function(){},onDestroy:function(){},beforeFocus:function(){},onFocus:function(){}}};$.fn.qtip.styles={defaults:{background:'white',color:'#111',overflow:'hidden',textAlign:'left',width:{min:0,max:250},padding:'5px 9px',border:{width:1,radius:0,color:'#d3d3d3'},tip:{corner:false,color:false,size:{width:13,height:13},opacity:1},title:{background:'#e1e1e1',fontWeight:'bold',padding:'7px 12px'},button:{cursor:'pointer'},classes:{target:'',tip:'qtip-tip',title:'qtip-title',button:'qtip-button',content:'qtip-content',active:'qtip-active'}},cream:{border:{width:3,radius:0,color:'#F9E98E'},title:{background:'#F0DE7D',color:'#A27D35'},background:'#FBF7AA',color:'#A27D35',classes:{tooltip:'qtip-cream'}},light:{border:{width:3,radius:0,color:'#E2E2E2'},title:{background:'#f1f1f1',color:'#454545'},background:'white',color:'#454545',classes:{tooltip:'qtip-light'}},dark:{border:{width:3,radius:0,color:'#303030'},title:{background:'#404040',color:'#f3f3f3'},background:'#505050',color:'#f3f3f3',classes:{tooltip:'qtip-dark'}},red:{border:{width:3,radius:0,color:'#CE6F6F'},title:{background:'#f28279',color:'#9C2F2F'},background:'#F79992',color:'#9C2F2F',classes:{tooltip:'qtip-red'}},green:{border:{width:3,radius:0,color:'#A9DB66'},title:{background:'#b9db8c',color:'#58792E'},background:'#CDE6AC',color:'#58792E',classes:{tooltip:'qtip-green'}},blue:{border:{width:3,radius:0,color:'#ADD9ED'},title:{background:'#D0E9F5',color:'#5E99BD'},background:'#E5F6FE',color:'#4D9FBF',classes:{tooltip:'qtip-blue'}}};})(jQuery);(function(){var po=document.createElement('script');po.type='text/javascript';po.async=true;po.src='https://apis.google.com/js/plusone.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(po,s);})();function trackButton(category,action,label){try{var path=$(location).attr('pathname');var label=(typeof label=='undefined')?path:label;category+='Button';if(category=='ShareButton'){switch(action)
{case'ShareEntityTeaser':action='Share_Set_Teaser';break;case'ShareEntityDetail':if(path.indexOf('/recording/')>=0)
action='Share_Set_Detail';else
action='Share_Profile';break;}}
_gaq.push(['_trackEvent',category,action,'URL: '+label]);}catch(ex){return false;}}
$(document).ready(function(){var buttons={'follow':{'collection':$('a, button','.share_and_watch'),'cat':'Add','act':'Follow'},'addToWatchlist':{'collection':$('button.btn_add_watchlist','.sidebar'),'cat':'Add','act':'AddToWatchList [Related-Box]'},'addToWatchlistDetail':{'collection':$('button.btn_add','#recording_outer_wrapper'),'cat':'Add','act':'AddToPlaylist'},'addToPlaylist':{'collection':$('button.btn_add','.recordingTeaser .teaser_buttons'),'cat':'Add','act':'AddToPlaylist'},'share':{'collection':$('button.btn_embed','.recordingTeaser .teaser_buttons'),'cat':'Share','act':'ShareEntityTeaser'},'shareDetail':{'collection':$('a','.sharebtn_wrapper'),'cat':'Share','act':'ShareEntityDetail'}};$.each(buttons,function(index,object){object.collection.livequery('click',function(){trackButton(object.cat,object.act);});});});(function($){$.fn.pfmToggleBox=function(options)
{var open=null;var defaults={button:'',target:'',ajax:''};var options=$.extend(defaults,options);if($(options['target']).is(':visible')){open=true;if($(options['button']).hasClass("btn_form_info_close")){$(options['button']).toggleClass('btn_form_info_close');$(options['button']).toggleClass('btn_form_info_open');}}else{open=false;if($(options['button']).hasClass("btn_form_info_open")){$(options['button']).toggleClass('btn_form_info_close');$(options['button']).toggleClass('btn_form_info_open');}}
return this.each(function()
{$(this).click(function(){if(open){open=false;$(options['target']).hide();$(options['button']).toggleClass('btn_form_info_close');$(options['button']).toggleClass('btn_form_info_open');}else{open=true;$(options['target']).show();var content=$(options['target']).html().replace(/^\s+/,'').replace(/\s+$/,'');if(content==""&&options['ajax']!=""){$(options['target']).text("Loading...");$.ajax({url:options['ajax'],success:function(html){$(options['target']).html(html);}});}
$(options['button']).toggleClass('btn_form_info_close');$(options['button']).toggleClass('btn_form_info_open');}});});}})(jQuery);$(document).ready(function()
{$("#show_genre_box").livequery("click",function(){$('#genre_box_teaser').addClass('hide');$('#genre_box_content').removeClass('hide');});$("#hide_genre_box").livequery("click",function(){$('#genre_box_teaser').removeClass('hide');$('#genre_box_content').addClass('hide');});$(".btn_tracklist").livequery("click",function(){var id=$(this).attr('alt');if(($("#tracklisting"+id).html())==0){$("#recording_indicator_"+id).slideDown(100);$("#tracklisting"+id).load("/recording/getTracklist/"+id,{},function(){$("#recording_indicator_"+id).slideUp(100,function(){$("#tracklisting"+id).slideToggle(1000);});});}else{$("#tracklisting"+id).slideToggle(1000);}
return false;});});$(document).ready(function()
{$('.recording_toggle').pfmToggleBox({target:'#recordings_toggle_target',button:'#recordings_toggle_button'});$('.event_toggle').pfmToggleBox({target:'#event_toggle_target',button:'#event_toggle_button'});$('.radio_toggle').pfmToggleBox({target:'#radio_toggle_target',button:'#radio_toggle_button'});if($('#track_toggle').length){$('.track_toggle').pfmToggleBox({target:'#track_toggle_target',button:'#track_toggle_button',ajax:$('#track_toggle').metadata().url});}
$.ajax({url:$('#wrap_brand_sidebarRelated').metadata().url,success:function(data){if(data.indexOf('class="noresult')<=-1)
$('#wrap_brand_sidebarRelated').html(data).show();}})
$('#show_description').click(function(){$('#description_long').show();$('#description').hide();});$('#hide_description').click(function(){$('#description_long').hide();$('#description').show();});});$(document).ready(function()
{var link=$("#listeners_table_placeholder").metadata().callbackurl;$("#listeners_table_placeholder").text("Loading listeners...")
$("#showmore_listeners").hide();$.ajax({url:link,error:function(){$("#listeners_table_placeholder").text("Please reload page to view listeners.")},success:function(data){if(data.indexOf('class="listeners')!=-1){$("#showmore_listeners").show();}
$("#listeners_table_placeholder").html(data);}});});var comments=1;$(document).ready(function(){$("#submitComment").click(function(){comment=$("#comment_comment").val();$("#comment_indicator").show();if(comment.length>=3){$.ajax({url:'/comment/comment',data:$("#commentForm").serialize(),type:"POST",success:function(html){$(".comments_content").html(html);var location=window.location.href.toString();location=location.replace(/#comments/,'');window.location.href=location+"#comments";$("#comment_comment").val('');$("#comment_indicator").hide();$.indicator.notice("Comment saved");},error:function(html){window.location.href="/auth";}});}else{$.indicator.failure("Please add a few words...");$("#comment_indicator").hide();}
return false;});$(".comments_content .paginator_wrapper a").livequery('click',function(){$("#comments_reload_feedback").show();href=$(this).attr('href');$.ajax({url:href,success:function(html){$(".comments_content").html(html);$("#comments_reload_feedback").hide();}});return false;});$('.comment_toggle').pfmToggleBox({target:'#comment_toggle_target',button:'#comment_toggle_button'});});(function($){var dialogSetup=false;$.fn.updateToGraph=function(){$(document).bind('loading.facebox',function(){$(document).unbind('keydown.facebox');$('#facebox_overlay').unbind('click');});$(document).bind('afterReveal.facebox',function(){if($('#fb_updated').length>0){$(document).bind('close.facebox',function(){window.location.href=$('#fb_updated').attr('href');});window.setTimeout(function(){$(document).trigger('close.facebox');},2000);}});return this.each(function(){$(this).click(function(){var url=$(this).attr('href');var id=getFacebookId();if(id===null){FB.login(function(response){if(response.authResponse){$.facebox({ajax:url});}else{$.log('not logged in');}},{scope:'email'});}else{hasPermissions(id,'email',function(granted){if(granted===true){$.facebox({ajax:url});}else{checkPermissions('email',function(permGranted){if(permGranted===true){$.facebox({ajax:url});}else{$.log('not granted');}});}});}
return false;});});};$.updateFacebookToken=function(){if($('#connect_to_facebook').length>0)
return;FB.getLoginStatus(function(response){if(response.authResponse){$.ajax({url:'/user/updateFacebookToken'});}});};$.fn.publicStreamForm=function(){$form=this;var granted=false;var id=getFacebookId();if(id!==null){hasPermissions(id,'publish_stream,offline_access',function(permGranted){granted=permGranted;});}
$form.ajaxForm({beforeSubmit:function(arr,$form,options){if(streamsSelected()===false||granted===true){$('#ajaxLoader_connect').show();return true;}
var id=getFacebookId();if(id===null){FB.login(function(response){if(response.authResponse){updateFacebookId(response.authResponse.userID);$('#ajaxLoader_connect').show();$form.ajaxSubmit({success:function(result){closeSettings();$.ajax({url:'/user/updateFacebookToken'});}});}else{$.log('not logged in');}},{scope:'email,publish_stream,offline_access'});return false;}
checkPermissions('publish_stream,offline_access',function(permGranted){if(permGranted===true){granted=true;$('#ajaxLoader_connect').show();$form.ajaxSubmit({success:function(result){closeSettings();$.ajax({url:'/user/updateFacebookToken'});}});}else closeSettings();});return false;},success:function(result){closeSettings();}});};$.subscribeToFacebookLogin=function(){};$.onFacebookLogin=function(redirectUrl){try{FB.getLoginStatus(function(response){if(response.authResponse){id=response.authResponse.userID;if(!id)
return;hasPermissions(id,'email',function(hasPerms){if(hasPerms==true){window.location=redirectUrl;}else{checkPermissions('email',function(status){if(status===true){window.location.href=redirectUrl;}else{}});}});}else{if(response.status==='connected'){app_id=65921695005;FB.init({appId:app_id,status:true,cookie:true,xfbml:true,oauth:true});var timeout=window.setInterval(function(){var facebook_cookie=$.cookie('fbsr_'+app_id);if(facebook_cookie!==null){window.clearInterval(timeout);window.location=redirectUrl;}else $.log('no facebook cookie set');},200);}
else{return;}}});}catch(e){$.log(e.message);}};$.fn.fbConnect=function(settings){var $button=this;this.click(function(){var url=$(this).attr('href');try{FB.getLoginStatus(function(response){if(response.authResponse){var id=getFacebookId();hasPermissions(id,'email',function(hasperms){if(hasperms===true){connectToFacebook(url);return;}
checkPermissions('email',function(status){if(status===true){window.location.href=$($button).attr('href');}});});}else{FB.login(function(response){if(response.authResponse){hasPermissions(response.authResponse.userID,'email',function(hasperms){if(hasperms===true){connectToFacebook(url);return;}
checkPermissions('email',function(status){$.log(status);});});}else{$.log('not logged in');}},{scope:'email'});}});}catch(e){$.log(e.message);}
return false;});return this;};function closeSettings(){$('#ajaxLoader_connect').hide();$('#facebook_details_list').slideUp('slow');}
function updateFacebookId(id){$.ajax({url:'/user/updateFacebookId?id='+id});}
function connectToFacebook(url){window.location.href=url;return;}
function hasPermissions(id,permissions,callback){try{var hasAllPerms=true;var query='SELECT '+permissions+' FROM permissions WHERE uid = '+id;FB.api({'method':'fql.query','query':query},function(result){var perms=result[0];if(typeof(perms)==='undefined'){callback(false);return;}
$.each(permissions.split(','),function(index,perm){if(perms[perm]!=1){hasAllPerms=false;return false;}});callback(hasAllPerms);});}catch(e){return false;}}
function checkPermissions(permissions,callback){if(dialogSetup===false){FB.provide('UIServer.Methods',{'permissions.request':{size:{width:575,height:240},url:'connect/uiserver.php',transform:function(call){if(call.params.display=='dialog'){call.params.display='iframe';call.params.channel=FB.UIServer._xdChannelHandler(call.id,'parent.parent');call.params.cancel=FB.UIServer._xdNextHandler(call.cb,call.id,'parent.parent',true);call.params.next=FB.UIServer._xdResult(call.cb,call.id,'parent.parent',false);dialogSetup=true;}
return call;}}});}
var token=getFacebookToken();if(token===null){$.log('accesstoken is NULL');return false;}else{FB.api('/me/permissions?access_token='+token,function(response){var response_perms=response.data[0];var granted=true;if(typeof(response_perms)==='undefined'){callback(false);return;}else{$.each(permissions.split(','),function(index,perm){if(response_perms[perm]!==1)
granted=false;});callback(granted);}});}}
function getFacebookId(){var authResponse=FB.getAuthResponse();if(typeof(authResponse)==="undefined"||authResponse===null){return null;}
return authResponse.userID;}
function getFacebookToken(){var authResponse=FB.getAuthResponse();if(typeof(authResponse)==="undefined"||authResponse===null){return null;}
return authResponse.accessToken;}
function streamsSelected(){var selected=false;$('#facebook_streamform input:checkbox').each(function(){if($(this).attr('checked')==true)
selected=true;});return selected;}})(jQuery);

