!function(t){function n(t,e){return t<>>32-e}function p(t,e){var i=2147483648&t,s=2147483648&e,o=1073741824&t,a=1073741824&e,t=(1073741823&t)+(1073741823&e);return o&a?2147483648^t^i^s:o|a?1073741824&t?3221225472^t^i^s:1073741824^t^i^s:t^i^s}function c(t,e,i,s,o,a,r){return t=p(t,p(p(e&i|~e&s,o),r)),p(n(t,a),e)}function u(t,e,i,s,o,a,r){return t=p(t,p(p(e&s|i&~s,o),r)),p(n(t,a),e)}function g(t,e,i,s,o,a,r){return t=p(t,p(p(e^i^s,o),r)),p(n(t,a),e)}function m(t,e,i,s,o,a,r){return t=p(t,p(p(i^(e|~s),o),r)),p(n(t,a),e)}function f(t){for(var e="",i="",s=0;s<=3;s++)e+=(i="0"+(t>>>8*s&255).toString(16)).substr(i.length-2,2);return e}t.extend({md5:function(t){Array();for(var e,i,s,o,a=function(t){for(var e,i=t.length,s=i+8,s=16*(1+(s-s%64)/64),o=Array(s-1),a=0,r=0;r>>29,o}(t=function(t){t=t.replace(/\x0d\x0a/g,"\n");for(var e="",i=0;i>6|192))+String.fromCharCode(63&s|128):(e=(e+=String.fromCharCode(s>>12|224))+String.fromCharCode(s>>6&63|128))+String.fromCharCode(63&s|128)}return e}(t)),r=1732584193,n=4023233417,l=2562383102,d=271733878,h=0;h'+i.html()+"")),i.css({width:i.width()+parseInt(i.css("padding-left").replace("px",""))+parseInt(i.css("padding-right").replace("px","")),height:i.height()+parseInt(i.css("padding-top").replace("px",""))+parseInt(i.css("padding-bottom").replace("px",""))}),i.append(''),this.isLoading=!0,i.addClass(t).addClass(e).attr(e,e)):(this.isLoading=!1,i.removeClass(t).removeClass(e).removeAttr(e),i.find(".loading-spinner").remove(),!0===i.data("label-created")&&i.html(i.find("loading-label").html())))},this),0)};var t=o.fn.mikaButton;o.fn.mikaButton=function(i){return this.each(function(){var t=o(this),e=t.data("mika.button");e||t.data("mika.button",e=new s(this)),i&&e.setState(i)})},o.fn.mikaButton.Constructor=s,o.fn.mikaButton.noConflict=function(){return o.fn.mikaButton=t,this}}(jQuery),!function(t){var e,i;"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():(e=window.Cookies,(i=window.Cookies=t()).noConflict=function(){return window.Cookies=e,i})}(function(){function c(){for(var t=0,e={};t00:00'):jQuery(".resultsboard-"+this.options.globalObjectName+' [data-type="lastupdatetimestamp"]').html(this.formatTime(new Date))),MikaResultsRenderTrigger()},formatTime:function(t){var e=t.getHours(),i=t.getMinutes(),t=t.getSeconds();return e+":"+(i=i<10?"0"+i:i)+":"+(t=t<10?"0"+t:t)},microtime:function(){return(new Date).getTime()},getClientSeconds:function(){var t=new Date,e=3600*t.getHours();return(e+=60*t.getMinutes())+t.getSeconds()},refresh:function(){this.log("function: refresh","info",!0),this.refresh_counter||(this.refresh_counter=0),this.refresh_counter++;var t,e,i,s,o=0,a=0,r=0,n=this.getContainerByType("favorites");if(n.data){var l,d={},h={},p={},c={},u=0,g=0;for(l in n.data.rows)if(n.data.rows.hasOwnProperty(l)){var m,f=n.data.rows[l];f.split_groups[f.global_info.active_group_key];for(t in void 0===f.is_in_replay&&("F"==f.global_info.race_status&&this.data.global.options.replay_mode?f.is_in_replay=!0:f.is_in_replay=!1),w=k=b=!1,f.starttime_net_ms&&(f.starttime_net_ms=parseInt(f.starttime_net_ms),u=u||f.starttime_net_ms,u=Math.min(u,f.starttime_net_ms)),f.splits)f.splits.hasOwnProperty(t)&&(e=f.splits[t],f.is_in_replay?(g=this.data.global.options.replay_daytime?f.starttime_net_ms-u:0,this.replay_time&&e.time_ms&&e.time_ms+g<=this.replay_time&&(b=e,void 0!==f.splits[parseInt(t)+1]?k=f.splits[parseInt(t)+1]:(k=b,w=!0)),e.time_ms&&(this.data.global.options.replay_daytime?this.replay_time_max=Math.max(this.replay_time_max,e.time_ms+g):this.replay_time_max=Math.max(this.replay_time_max,e.time_ms))):e.time_ms&&"-"!=e.time_ms&&(b=e,k=!1));if(!b&&f.is_in_replay){for(t in f.splits)if(f.splits.hasOwnProperty(t)){k=f.splits[t];break}b=k}if(k)for(i in f.split_groups)f.split_groups.hasOwnProperty(i)&&(i==b.group?(void 0===h[i]&&(h[i]={}),void 0===d[i]&&(d[i]={}),f.is_in_replay&&this.data.global.options.replay_mode?(f.split_groups[i].active=!0,f.global_info.active_group_key=i,a=0,r=this.data.global.options.replay_daytime?(this.replay_time-g-b.time_ms)/k.ms_km_estimate:(this.replay_time-b.time_ms)/k.ms_km_estimate,r+=b.km-f.split_groups[i].first_km,(isNaN(r)||r<0)&&(r=0),f.split_groups[i].estimated_pos=r,m=this.replay_time-g,f.race_time=0=this.replay_time_max&&(this.replay_time=0),this.replay_running=!0,jQuery(".resultsboard-"+this.options.globalObjectName+" .lb-containers").addClass("replay-running"),window.clearInterval(this.timer.refresh),window.clearInterval(this.timer.replay),this.timer.replay=window.setInterval("window['"+this.options.globalObjectName+"'].replayStep()",this.data.global.options.replay_step)},replayStop:function(){this.replay_running=!1,jQuery(".resultsboard-"+this.options.globalObjectName+" .lb-containers").removeClass("replay-running"),window.clearInterval(this.timer.replay),this.refresh()},replayRewind:function(){this.replay_time=0,this.replayStop(),this.replayStart()},renderMainButtons:function(){var t="";return"fixed"!=jQuery(".cbox.left .list").css("position")?t+='
'+this.strings.reload+'"+this.strings.fullscreen+"
":t+='
'+this.strings.reload+'"+this.strings.fullscreen_close+"
",t+='
'+this.strings.reload+'"+this.strings.reload+"
",this.getContainerByType("list")&&(this.options.autoFollow?t+='
'+this.strings.auto_follow+'"+this.strings.auto_follow+"
":t+='
'+this.strings.auto_follow+'"+this.strings.auto_follow+"
"),this.options.help&&(t+='
'+this.strings.help+"
"),t},renderMain:function(){var t,e=(e=(e=(e="")+('
'+this.options.title)+'
')+this.renderMainButtons()+"
")+"
"+'
';for(t in"jqm"==this.options.theme&&(e+='
  • '),void 0!==this.data.global.global_option_bar&&(e+=this.renderOptionBar()),this.data.global.options.cols)this.data.global.options.cols.hasOwnProperty(t)&&(e+='
    ');return"jqm"==this.options.theme&&(e+="
"),e=e+"
"+'"},clearCols:function(){jQuery(".lb-col").html("")},trigger:function(t,e){var i;switch(this.log("Trigger: "+t,"info"),t){case"reload":this.load();break;case"refresh":this.refresh();break;case"replayPlay":this.replayStart();break;case"replayStop":this.replayStop();break;case"replayRewind":this.replayRewind();break;case"setSelector":e.key&&e.container&&(this.subSelectorState[e.container]=e.key,this.options.autoFollow=!1,this.renderContainers(e.container),jQuery(".resultsboard-"+this.options.globalObjectName+" .list-option-buttons").html(this.renderMainButtons()));break;case"autoFollow":e?(this.options.autoFollow=!0,this.subSelectorState={}):this.options.autoFollow=!1,this.addToRenderQueue("list"),this.renderFromQueue(),jQuery(".resultsboard-"+this.options.globalObjectName+" .list-option-buttons").html(this.renderMainButtons());break;case"showDetails":this.data.global.options.show_details=!!e,this.addToRenderQueue("favorites"),this.renderFromQueue();break;case"openFavoriteDetails":this.openFavoriteDetails(e.id_favorite,e);break;case"closeFavoriteDetails":this.closeFavoriteDetails(e.id_favorite,e);break;case"addFavorite":"none"!=this.data.global.options.favorites_mode&&-1==this.favorites.indexOf(e.id)&&(this.favorites.push(e.id),this.options_submit.command={name:"addFavorite",id:e.id},this.addToRenderQueue("list"),this.addToRenderQueue("map"),this.load());break;case"removeFavorite":if("none"!=this.data.global.options.favorites_mode)if(o=[],-1!=(i=this.favorites.indexOf(e.id))){for(r in this.favorites)this.favorites.hasOwnProperty(r)&&this.favorites[r]!=e.id&&o.push(this.favorites[r]);this.favorites=o,this.options_submit.command={name:"removeFavorite",id:e.id},this.addToRenderQueue("list"),this.addToRenderQueue("map"),this.load()}break;case"clearFavorites":this.favorites=[],this.options_submit.command={name:"clearFavorites",id:e.id},this.load(),this.renderContainers();break;case"selectFavoriteToggle":-1!=(i=this.favorites.indexOf(e.id))&&(-1!=this.favoritesSelected.indexOf(e.id)?this.trigger("deselectFavorite",{id:e.id}):this.trigger("selectFavorite",{id:e.id}));break;case"selectFavorite":-1!==(i=this.favorites.indexOf(e.id))&&this.favoritesSelected.push(e.id);break;case"deselectFavorite":if(-1!==(i=this.favorites.indexOf(e.id))){var s=this.favorites[i],o=[];for(r in this.favoritesSelected)this.favoritesSelected.hasOwnProperty(r)&&s!=this.favoritesSelected[r]&&o.push(this.favoritesSelected[r]);this.favoritesSelected=o}break;case"submitOptions":var o=[],a=(jQuery(".resultsboard-"+this.options.globalObjectName+" form").each(function(t,e){"lb"==e.name&&(o=jQuery(this).serializeArray())}),{});for(r in o)o.hasOwnProperty(r)&&("field_"==o[r].name.substr(0,6)&&(a[o[r].name.substr(6)]=o[r].value),"option_"==o[r].name.substr(0,7))&&(a[o[r].name.substr(7)]=o[r].value);this.replay_time_max=0,this.replay_time=0,this.replay_speed=0,this.options_submit.option_bar=a,this.load();break;case"centerMap":this.mapAutoZoom=!1,this.mapCenter(e.container);break;case"switchFullscreen":this.switchFullscreen();break;case"switchControls":jQuery(".resultsboard-"+this.options.globalObjectName+".list").hasClass("hide-on")?jQuery(".resultsboard-"+this.options.globalObjectName+".list").removeClass("hide-on"):jQuery(".resultsboard-"+this.options.globalObjectName+".list").addClass("hide-on");break;case"switchControlsExtended":jQuery(".resultsboard-"+this.options.globalObjectName+".list").hasClass("hide-on")?(jQuery(".resultsboard-"+this.options.globalObjectName+".list").removeClass("hide-on"),jQuery(".resultsboard-"+this.options.globalObjectName+".list").removeClass("hide-on-extended")):(jQuery(".resultsboard-"+this.options.globalObjectName+".list").addClass("hide-on"),jQuery(".resultsboard-"+this.options.globalObjectName+".list").addClass("hide-on-extended"));break;case"switchAutoZoom":for(var r in this.mapAutoZoom?(this.mapAutoZoom=!1,jQuery(".resultsboard-"+this.options.globalObjectName+" .button-map-autozoom").removeClass("button-active")):(this.mapAutoZoom=!0,jQuery(".resultsboard-"+this.options.globalObjectName+" .button-map-autozoom").addClass("button-active")),this.data.containers)this.data.containers.hasOwnProperty(r)&&"map"==this.data.containers[r].type&&this.mapUpdate(r);break;case"switchOverlayMenu":(p=jQuery(".resultsboard-"+this.options.globalObjectName+" .overlayMenu")).css({display:"block"});var n=p.position(),l=p.offset(),d=n.top+(e.top-l.top),h=n.left+(e.left-l.left);p.css({display:"block",left:h+"px",top:d+"px"});break;case"switchOverlay":if(-1!==this.mapOverlays.indexOf(e.overlayId)){o=[];for(r in this.mapOverlays)this.mapOverlays.hasOwnProperty(r)&&this.mapOverlays[r]!=e.overlayId&&o.push(this.mapOverlays[r]);this.mapOverlays=o,jQuery(".overlayMenu #overlayButton-"+e.overlayId).removeClass("active")}else this.mapOverlays.push(e.overlayId),jQuery(".overlayMenu #overlayButton-"+e.overlayId).addClass("active");window.setTimeout(this.options.globalObjectName+'.trigger("closeOverlayMenu")',350);break;case"closeOverlayMenu":for(r in(p=jQuery(".resultsboard-"+this.options.globalObjectName+" .overlayMenu")).css({display:"none"}),this.data.containers)this.data.containers.hasOwnProperty(r)&&"map"==this.data.containers[r].type&&this.mapUpdateOverlays(r);break;case"openInfoWindow":(p=jQuery(".resultsboard-"+this.options.globalObjectName+" .mapInfoWindow")).css({display:"block"});var p,n=p.position(),l=p.offset(),d=e.top,h=e.left;p.css({display:"block",left:h+"px",top:d+"px"}),p.html(e.html);break;case"closeInfoWindow":(p=jQuery(".resultsboard-"+this.options.globalObjectName+" .mapInfoWindow")).css({display:"none"})}},render:function(){jQuery(this.targetElement).html(this.renderMain()),this.renderContainers()},renderFromQueue:function(){for(var t in this.renderQueue)if(this.renderQueue.hasOwnProperty(t))for(var e in this.data.containers)this.data.containers.hasOwnProperty(e)&&this.data.containers[e].type==this.renderQueue[t]&&this.renderContainers(e);this.clearRenderQueue()},renderContainers:function(t){for(var e in this.data.containers)if(this.data.containers.hasOwnProperty(e)&&!(t&&e!=t||"map"!=this.data.containers[e].type&&"favorites"!=this.data.containers[e].type&&"list"!=this.data.containers[e].type&&"overlays"!=this.data.containers[e].type)){if(this.data.containers[e].state,"overlays"!=this.data.containers[e].type)if(jQuery(".resultsboard-"+this.options.globalObjectName+" .lb-container.container-id-"+e).length)if("favorites"==this.data.containers[e].type){var i=jQuery(".favorite-boxes .favorite-wrap").length,s=0;if(void 0!==this.data.containers[e].data.rows)for(var o in this.data.containers[e].data.rows)s++;i!=s?jQuery(".resultsboard-"+this.options.globalObjectName+" .lb-container.container-id-"+e).html(this.renderContainer(e,!0)):this.updateContainerContentTypeFavorites(e)}else jQuery(".resultsboard-"+this.options.globalObjectName+" .lb-container.container-id-"+e).html(this.renderContainer(e,!0));else{i=this.renderContainer(e,!1);jQuery(".resultsboard-"+this.options.globalObjectName+" .lb-col.col-id-"+this.data.containers[e].col).append(i)}if("map"==this.data.containers[e].type&&this.mapInit(e),"favorites"==this.data.containers[e].type)for(var a in this.data.containers)this.data.containers.hasOwnProperty(a)&&"map"==this.data.containers[a].type&&this.mapUpdate(a);if("overlays"==this.data.containers[e].type)for(var a in this.data.containers)this.data.containers.hasOwnProperty(a)&&"map"==this.data.containers[a].type&&this.mapUpdateOverlays(a)}var r,n="";for(r in this.data.global.options.cols)this.data.global.options.cols.hasOwnProperty(r)&&(n+=".lb-col.col-id-"+this.data.global.options.cols[r].id,r+1'+this.data.settings.global_event_official_string+"

"):jQuery(".resultsboard-"+this.options.globalObjectName+" .event-official").remove(),"undefined"!=typeof require&&require(["Mika/Mika"],function(t){(new t).emit("results/board.rendered")})},registerTooltips:function(){jQuery(".resultsboard-"+this.options.globalObjectName+" .leaderboard-search input").tooltip({tooltipClass:"tooltip-warning",show:{delay:0},position:{my:"center bottom",at:"center top"},content:this.strings.not_found,items:"input"}),jQuery(".resultsboard-"+this.options.globalObjectName+" .leaderboard-search input").tooltip("disable"),this.options.isTouchDevice||(jQuery(".tt-help").tooltip({tooltipClass:"tooltip-help",show:{delay:400},position:{my:"center top-45",at:"center top"},items:"a,span,button,div"}),jQuery(".tt-help.tt-oninit.tt-pos-bottom").tooltip({tooltipClass:"tooltip-help tooltip-icon-info tt-pos-bottom",show:{delay:2500},position:{my:"center top+4",at:"center bottom",collision:"none"},items:"a,span,button,div"}),jQuery(".tt-help.tt-oninit.tt-pos-top").tooltip({tooltipClass:"tooltip-help tooltip-icon-info tt-pos-top",show:{delay:2500},position:{my:"center bottom-10",at:"center top",collision:"none"},items:"a,span,button,div"}),jQuery(".resultsboard-"+this.options.globalObjectName+" .tt-oninit").tooltip("enable"),jQuery(".resultsboard-"+this.options.globalObjectName+" .tt-oninit").tooltip("open"),jQuery(".tt-help.tt-oninit").tooltip({show:{delay:400}})),jQuery(".tt-help-info").tooltip({tooltipClass:"tooltip-help-info",show:{delay:400,effect:"slideDown"},position:{my:"right top",at:"right bottom"},content:this.options.help})},renderContainer:function(t,e){var i,s,o=this.data.containers[t],a="",r="",n=o.title;if(void 0!==o.data.sub_selector){if(!this.subSelectorState[t]||o.data.rows[this.subSelectorState[t]]||(this.subSelectorState[t]=!1),!this.subSelectorState[t])for(i in o.data.sub_selector)o.data.sub_selector.hasOwnProperty(i)&&o.data.sub_selector[i].has_data&&(this.subSelectorState[t]=i);if(this.options.autoFollow)for(i in o.data.sub_selector)o.data.sub_selector.hasOwnProperty(i)&&o.data.sub_selector[i].has_data&&(this.subSelectorState[t]=i);for(i in this.subSelectorState[t]||(this.subSelectorState[t]=0),o.data.sub_selector)o.data.sub_selector.hasOwnProperty(i)&&i==this.subSelectorState[t]&&(s=o.data.sub_selector[i].name);this.data.global.options.append_subselector_title&&(n=o.title+" "+s+"")}return"jqm"===this.options.theme?(e||(a+='
'),a=(a=a+'
  • '+o.title+"
  • ")+'
  • ',(r=this.renderContainerContent(t))&&(a+=r),a+="
"):(e||(a+='
'),a=(a=a+'
'+n+"
")+'
'+this.strings.move+'
',a+='
',(r=this.renderContainerContent(t))&&(a+=r),a+="
"),e||(a+="
"),a},renderContainerContent:function(t){var e="";switch(this.data.containers[t].type){case"list":e=this.renderContainerContentTypeList(t);break;case"favorites":e=this.renderContainerContentTypeFavorites(t);break;case"map":e=this.renderContainerContentTypeMap(t)}return e},renderTrendField:function(t,e,i,s){var o="";switch("object"!=typeof t[e.field]&&(t[e.field]={value:t[e.field]}),t[e.field].value){case"plus":s="icon_up.gif";break;case"minus":s="icon_down.gif";break;default:s="icon_even.gif"}var a="",r="";return void 0!==e.type_data&&void 0!==e.type_data.view_places&&!0===e.type_data.view_places&&"~"!=t[e.field].trend_place_diff.modifier&&"unknown"!=t[e.field].value?r=" "+(">"==t[e.field].trend_place_diff.modifier?">":t[e.field].trend_place_diff.modifier)+t[e.field].trend_place_diff.places+"":void 0!==t[e.field].trend_place_diff&&"plus"==t[e.field].value|"minus"==t[e.field].value&&(a=t[e.field].trend_place_diff.modifier+""+t[e.field].trend_place_diff.places),(o+="')+r+""},renderContainerContentTypeList:function(t){var e,i,s,o=this.data.containers[t],a="",r="",n="",l="",d="",h=!1,p=void 0!==o.data.sub_selector?(a+=this.renderSubSelector(t),o.data.rows[this.subSelectorState[t]]):o.data.rows,c=!1;for(i in this.data.containers)if(this.data.containers.hasOwnProperty(i)&&"favorites"==this.data.containers[i].type){c=this.data.containers[i];break}if(c){var u,g=[];for(i in c.data.rows)c.data.rows.hasOwnProperty(i)&&(u=c.data.rows[i]).id&&g.push(u.id)}else g=this.favorites;if(a+="","jqm"===this.options.theme)a+='
    ';else{a+='',"none"!=this.data.global.options.favorites_mode&&(a+='');var m=0;for(i in o.data.fields.data)o.data.fields.data.hasOwnProperty(i)&&m++;var f=0;for(i in o.data.fields.data)o.data.fields.data.hasOwnProperty(i)&&((e=o.data.fields.data[i]).width||(e.width="auto"),r="",e.class&&(r+=e.class),f+1==m&&(r+=" last"),a+="'+e.name+"",f++);a+=""}if(p.length){if("jqm"!==this.options.theme){var _=0;for(void 0!==o.data.options.num_results&&p.length":(l+=' style="cursor:pointer"',a+="
  • '):(void 0===v.id?a+='
  • ":a+="","none"!=this.data.global.options.favorites_mode&&(y="",y=this.data.global.options.favorite_titles[this.favorites.indexOf(v.id)]?this.data.global.options.favorite_titles[this.favorites.indexOf(v.id)]:"",y=this.data.global.options.favorite_titles[g.indexOf(v.id)]?this.data.global.options.favorite_titles[g.indexOf(v.id)]:"",a+='")),f=0,o.data.fields.data)if(o.data.fields.data.hasOwnProperty(b)){e=o.data.fields.data[b],r="",d=k?e.type:"fillup",e.class&&(r+=e.class),f+1==m&&(r+=" last");var w="";if("add_favorite"==d&&(r+=" icon s favorite-toggle"),r&&(w=' class="'+r+'"'),"jqm"===this.options.theme)switch(d){case"add_favorite":break;case"trend":v[e.field]?a+=this.renderTrendField(v,e,w,""):a+="";break;default:"name"==e.role?a+="

    "+(void 0!==v[e.field]&&null!=v[e.field]?v[e.field]:"")+"

    ":"actual_split_time"==e.field?a+='
    '+e.name+""+(void 0!==v[e.field]&&null!=v[e.field]?v[e.field]:"")+"
    ":a+='
    '+e.name+""+(void 0!==v[e.field]&&null!=v[e.field]?v[e.field]:"")+"
    "}else switch(d){case"add_favorite":a+=h?"':"';break;case"trend":v[e.field]?a+=this.renderTrendField(v,e,w,""):a+="";break;case"fillup":a+=" ";break;default:a+=""+(void 0!==v[e.field]&&null!=v[e.field]?v[e.field]:"")+""}f++}"jqm"===this.options.theme?a+=h?'
    ":'":a+=""}}else{var j=5;o.data.options.num_results&&(j=o.data.options.num_results),"jqm"===this.options.theme?a+='
  • '+this.strings.no_results+"
  • ":a+='"}return"jqm"===this.options.theme?a+="":a+="
     
    '+y+"
    '+this.strings.no_results+"
    ",a},renderOptionBar:function(t){var e,i="";if(void 0!==this.data.global.global_option_bar&&this.data.global.global_option_bar.fields.length){var s=this.data.global.global_option_bar;if(t||(i+='
    '),i+='
    ',void 0!==s.fields&&s.fields.length)for(var o in s.fields)if(s.fields.hasOwnProperty(o)){var a,r,n=s.fields[o],i="jqm"===this.options.theme?1')+' ")+'":(i=(i+='
    ')+""+n.title+" ")+'"+"
    "}if(void 0!==s.options&&void 0!==s.options.hideable&&s.options.hideable&&(i+="Hide"),void 0!==s.options.limits&&s.options.limits.length){for(e in i="jqm"===this.options.theme?i+'
    ",s.options.limits)s.options.limits.hasOwnProperty(e)&&(l="",void 0!==this.data.settings&&this.data.settings.limit==s.options.limits[e]&&(l=' selected="selected"'),i+='");i=i+""+"
    "}"undefined"!=s.options.show_last_update&&!0===s.options.show_last_update&&"jqm"!==this.options.theme&&(i=i+'
    '+this.strings["resultsboard.last_update"]+' ',void 0!==s.options.last_update_count_up&&!0===s.options.last_update_count_up?i+='':i+=this.formatTime(new Date),i+="
    "),i=i+'
    '+"",t||(i+="
    ")}return void 0!==s.options&&void 0!==s.options.hideable&&s.options.hideable&&(i+="."),t?(jQuery("#optionbar-global").html(i),""):i},renderSubSelector:function(t){var e,i,s,o,a,r,n,l="",d="",h="",p="",c="",u=this.data.containers[t];if("auto"==u.data.options.sub_selector_mode&&(r=jQuery(".lb-container.container-id-"+t).width()?jQuery(".lb-container.container-id-"+t).width()/u.data.sub_selector.length-1:jQuery(".lb-col.col-id-"+u.col).width()/u.data.sub_selector.length-1,u.data.options.sub_selector_mode=30':u.data.options.sub_selector_class?l+='
    ':l+='
    ',u.data.sub_selector)u.data.sub_selector.hasOwnProperty(e)&&u.data.sub_selector[e].has_data&&0;for(e in r=0,n="","calc"==u.data.options.sub_selector_width?n="jqm"===this.options.theme?(r=100/u.data.sub_selector.length,r-=.1*(u.data.sub_selector.length+1),"%;"):(r=jQuery(".lb-container.container-id-"+t).width()?jQuery(".lb-container.container-id-"+t).width()/u.data.sub_selector.length-1:jQuery(".lb-col.col-id-"+u.col).width()/u.data.sub_selector.length-1,"px;"):u.data.options.sub_selector_width&&(r=u.data.options.sub_selector_width),isNaN(r)||(r*=u.data.options.sub_selector_width_factor),s=r+n,i=0,u.data.sub_selector)u.data.sub_selector.hasOwnProperty(e)&&(d=p="",h="width:"+s,(o=u.data.sub_selector[e]).color&&(h+="background-color:"+o.color+";"),o.class&&(d+=o.class+" "),a=!1,e==this.subSelectorState[t]&&(d+="selected ",p+=' data-theme="a"',a=!0),o.has_data&&(d+="active ",a||(p+=' data-theme="b"')),i+1==u.data.sub_selector.length&&(d+="last "),h=h&&'style="'+h+'" ',"jqm"===this.options.theme?l+="'+o.name+"":l+="'+o.name+"",i++);l+="
    "}else if("dropdown"==u.data.options.sub_selector_mode){for(var g in l+='"}return l},updateContainerContentTypeFavorites:function(t,e){var i,s=this.data.containers[t];for(i in s.data.rows)s.data.rows.hasOwnProperty(i)&&s.data.rows[i].id&&this.renderFavorite(s.data.rows[i],s.data.fields.data,s.data.options,"",i,!0,e);if("position"==s.data.options.order_by)for(var o in s.data.split_groups.data){var a=s.data.split_groups.data[o].name;for(i in jQuery(".favorite-boxes .split-group-"+a+" .replay-barrier").remove(),this.favoritesOrderLive[a])this.favoritesOrderLive[a].hasOwnProperty(i)&&jQuery("#f-"+this.favoritesOrderLive[a][i]).appendTo(".favorite-boxes .split-group-"+a);if(this.data.global.options.replay_mode&&this.favoritesOrderReplay[a]&&this.favoritesOrderReplay[a].length)for(i in jQuery(".favorite-boxes .split-group-"+a).append('
    REPLAY
    '),this.favoritesOrderReplay[a])this.favoritesOrderReplay[a].hasOwnProperty(i)&&jQuery("#f-"+this.favoritesOrderReplay[a][i]).appendTo(".favorite-boxes .split-group-"+a)}},renderContainerContentTypeFavorites:function(t){var e,i,s=this.data.containers[t],o="",a=(o+='
    ',this.data.global.options.show_clear_button&&(o+=' "+this.strings.clear+""),this.data.global.options.show_search&&(o+=' '),this.data.global.options.show_details_button&&(o+='
    '+this.strings.show_details+'
    '),o=o+"
    "+'
    ',2),r=(this.data.global.options.favorite_cols&&(a=this.data.global.options.favorite_cols),a=parseInt(a),"calc"==s.data.options.width?(e="",(e=jQuery(".lb-container.container-id-"+t).width()?jQuery(".lb-container.container-id-"+t).width()/a:jQuery(".lb-col.col-id-"+s.col).width()/a)<220&&(a=1,e=jQuery(".lb-container.container-id-"+t).width()?jQuery(".lb-container.container-id-"+t).width()/a:jQuery(".lb-col.col-id-"+s.col).width()/a),1')+'
    '+h.title+"
    "):o+='
    ',s.data.rows)l=e?"width:"+e+";":"",s.data.rows.hasOwnProperty(n)&&s.data.rows[n].id&&(d=!1,jQuery.each(s.data.rows[n].split_groups,function(t,e){e.active&&(d=e,0)}),d||jQuery.each(s.data.rows[n].split_groups,function(t,e){return d=e,!1}),s.data.options.use_split_groups&&d.name!=h.name||(r=!0,n=parseInt(n),o+=this.renderFavorite(s.data.rows[n],s.data.fields.data,s.data.options,l,n)));if(o+="
    ",!s.data.options.use_split_groups)break}return r||(this.data.global.options.replay_mode?o+='
    '+this.strings.help_favorites_replay+"
    ":o+='
    '+this.strings.help_favorites+"
    "),o+="
    "},renderFavorite:function(e,t,i,s,o,a,r){var n,l,d=[],h="";for(n in t)t.hasOwnProperty(n)&&((l=t[n]).active&&!l.split&&-1==l.field.search("time_finish_")&&-1!=l.field.search("place")&&(d.push(l),0')+this.renderFavoritesPrimaryFields(e,t,i)+"
    ";if(i.collapsible||(1')+this.renderFavoritesPlaces(e,d,i)+"
"),this.data.global.options.show_details&&(u=(u+='
')+this.renderFavoritesSplits(e,t,i)+"
")),i.collapsible&&!r&&(p=this.renderFavoritesHead(e,t,o,i),p=(p+='
')+this.renderFavoritesSecondaryFields(e,t,i)+"
",1')+this.renderFavoritesPlaces(e,d,i)+""),p=(p=this.data.global.options.show_details?(p+='
')+this.renderFavoritesSplits(e,t,i)+"
":p)+'
close detailsdrag box to detach
'),!a)return a="info-box favorite-wrap",a+=" index-"+o,o%2&&(a+=" highlight"),this.options.addFavorite==e.id&&(a+=" favorite-active"),h=(h=h+('
')+u+"
",i.collapsible&&(h=h+'',c=this.options.globalObjectName,this.events.click.push({selector:"#f-"+e.id+" .button-secondary.open",func:function(t){window[c].openFavoriteDetails(e.id,{top:t.pageY,left:t.pageX})}}),this.events.mouseover.push({selector:"#f-"+e.id+" .sensitive",func:function(t){jQuery("#f-"+e.id).addClass("mouseover")}}),this.events.mouseout.push({selector:"#f-"+e.id+" .sensitive",func:function(t){jQuery("#f-"+e.id).removeClass("mouseover")}})),h+="
",(h=i.collapsible?(h+='
')+p+"
":h)+"
";jQuery("#f-"+e.id+" .info-primary").html(u),i.collapsible&&!r&&jQuery("#f-"+e.id+" .info-secondary").html(p)},renderFavoritesPrimaryFields:function(t,e,i){var s,o=[],a="",r=(t.is_in_replay&&(a+='
R
'),0),n=0;for(s in e)!e.hasOwnProperty(s)||(d=e[s]).active&&!d.split&&-1==d.field.search("time_finish_")&&(-1!=d.field.search("place")?o.push(d):i.collapsible&&!d.primary||d.hide||n++);for(s in e)if(e.hasOwnProperty(s)){var l,d=e[s];if(d.active&&!d.split&&-1==d.field.search("time_finish_"))if(-1!=d.field.search("place"))o.push(d);else if((!i.collapsible||d.primary)&&!d.hide){if((i.divide_fields||0!=r)&&r%i.divide_fields!=0||(a+=''),null==t[d.field]&&(t[d.field]=""),"position_info"==d.type&&(l=this.getPersonInfoStrings(t),t[d.field]=l.title),"diff_time"==d.type){var h=!1;for(p in t.split_groups)t.split_groups[p].active&&(h=t.split_groups[p]);if(!h)for(p in t.split_groups){h=t.split_groups[p];break}t[d.field]=h.diff_time_string}if("current_group"==d.type){h=!1;for(p in t.split_groups)t.split_groups[p].active&&(h=t.split_groups[p]);if(!h)for(p in t.split_groups){h=t.split_groups[p];break}t[d.field]=h.title}if("diff_km"==d.type){var p,h=!1;for(p in t.split_groups)t.split_groups[p].active&&(h=t.split_groups[p]);if(!h)for(p in t.split_groups){h=t.split_groups[p];break}t[d.field]=h.diff_km_string}a+='",++r%i.divide_fields!=0&&r!=n||(a+="
'+d.name+''+t[d.field]+"
"),1===o.length&&(t[o[0].field]||(t[o[0].field]="-"),a+=''+o[0].name+''+t[o[0].field]+"")}}return a},renderFavoritesSecondaryFields:function(t,e,i){var s,o,a='';a+="";for(s in e)e.hasOwnProperty(s)&&(!(o=e[s]).active||o.split||-1!=o.field.search("time_finish_")||-1!=o.field.search("place")||i.collapsible&&o.primary||o.hide||(null==t[o.field]&&(t[o.field]=""),a+='",0));return a=a+""+"
'+o.name+''+t[o.field]+"
"},renderFavoritesSplits:function(t,e,i){var s,o,a,r,n,l=0,d="";for(n in t.splits)if(t.splits.hasOwnProperty(n)){if(!i.divide_splits&&0==l||l%i.divide_splits==0){for(a in d=(d+='')+""+"",s=0,e)e.hasOwnProperty(a)&&e[a].active&&e[a].split&&s++;for(a in r=0,e)e.hasOwnProperty(a)&&e[a].active&&e[a].split&&(o="",0==r&&(o+=" desc"),r+1==s&&(o+=" last"),e[a].class&&(o+=" "+e[a].class),d+=""+e[a].name+"",r++);d=(d+="")+""+""}for(a in d+="",r=0,e)e.hasOwnProperty(a)&&e[a].active&&e[a].split&&(o="",0==r&&(o+=" desc"),r+1==s&&(o+=" last"),e[a].class&&(o+=" "+e[a].class),d+=""+t.splits[n][e[a].field]+"",r++);d+="",++l%i.divide_splits!=0&&l!=t.splits.length||(d+="
")}return d},renderFavoritesPlaces:function(t,e,i){var s,o="",a='',a=(a+="")+""+('");for(s in e)e.hasOwnProperty(s)&&(a+='");for(s in a=(a=(a+="")+""+"")+""+'',e)e.hasOwnProperty(s)&&(o="",o=null==t[e[s].field]?"-":t[e[s].field],a+='");return a=(a+="")+""+"
'+this.strings.places+"'+e[s].name+"
'+o+"
"},renderFavoritesHead:function(t,e,i,s){var o,a="",a=this.data.global.options.favorite_titles[i]||"",r="",n="";for(o in e)e.hasOwnProperty(o)&&e[o].active&&e[o].head&&(e[o].name&&(n=e[o].name+": "),r+=' '+n+t[e[o].field]+"");var l='
';return l+('
'+a+"
")+r+('
'+this.strings.remove+'
')+"
"},openFavoriteDetails:function(t,e){var i=jQuery("#f-"+t+" .info-secondary"),s=(i.css({display:"block"}),i.position()),o=i.offset(),a=s.top+(e.top-o.top),s=s.left+(e.left-o.left);i.css({display:"block",left:s+"px",top:a+"px"}),i.draggable({snap:!0,cursor:"move",start:function(){jQuery("#f-"+t).addClass("dragged")}})},closeFavoriteDetails:function(t,e){jQuery("#f-"+t+" .info-secondary").css({display:"none"}),jQuery("#f-"+t).removeClass("dragged")},renderContainerContentTypeMap:function(t){var e,i,s="";return s+='
',this.data.global.options.show_search&&(s+=' "),s=(s+=' "+this.strings.map_center+"")+(' "+this.strings.autozoom+""),this.getContainerByType("overlays")&&(this.data.global.options.tooltip_intros.map_overlays?s+=' '+this.strings.map_overlays+"":s+=' '+this.strings.map_overlays+"",e=this.options.globalObjectName,this.eventsDelete.click.push({selector:".button-map-overlays"}),this.events.click.push({selector:".button-map-overlays",func:function(t){return window[e].trigger("switchOverlayMenu",{top:t.pageY,left:t.pageX}),!1}})),s=s+"
"+('
'),this.data.global.options.replay_mode&&(s=(s=(s=(s=(s=(s+='
')+'
'+this.strings.replay_play+"")+' '+this.strings.replay_stop+"")+' '+this.strings.replay_rewind+"
")+'
'+this.strings.slider_start+"")+' '+this.strings.slider_finish+"",this.data.global.options.tooltip_intros.map_slider&&(i="tt-oninit"),this.data.global.options.replay_daytime?s+=' '+this.strings.replay_daytime+' 00:00:00':s+=' '+this.strings.replay_racetime+' 00:00:00',s=(s+='
')+'
'+this.strings.replay_speed+'
'),s=s+this.renderOverlayMenu()+''},renderOverlayMenu:function(){var t,e=this.getContainerByType("overlays"),i="",s="",o=this.options.globalObjectName;if(e){for(var a in i=i+'"}return i},switchFullscreen:function(){if("fixed"!=jQuery(".cbox.left .list").css("position")){for(var t in this.fullscreen_old_style={height:jQuery(".cbox.left .list").css("height"),position:"relative",width:jQuery(".cbox.left .list").css("width"),overflow:"inherit"},this.data.containers)if(this.data.containers.hasOwnProperty(t)&&"map"==this.data.containers[t].type){this.fullscreen_map_old_style={height:jQuery("#map-container-"+this.data.containers[t].id).css("height")};break}for(t in jQuery(".cbox.left .list").css({position:"fixed",overflow:"hidden",zIndex:9999,margin:0,top:0,left:0,width:jQuery(window).width()+"px",height:jQuery(window).height()+"px"}),jQuery(".cbox.left .list").addClass("is-fullscreen"),this.render(),this.data.containers)if(this.data.containers.hasOwnProperty(t)&&"map"==this.data.containers[t].type){jQuery(".tt-help").tooltip("disable"),jQuery("#map-container-"+this.data.containers[t].id).css("height",jQuery(window).height()-142+"px"),this.mapInit(this.data.containers[t].id),this.mapInitSliders(),this.registerTooltips();break}}else for(t in jQuery(".cbox.left .list").css(this.fullscreen_old_style),jQuery(".cbox.left .list").removeClass("is-fullscreen"),this.render(),this.data.containers)if(this.data.containers.hasOwnProperty(t)&&"map"==this.data.containers[t].type){jQuery(".tt-help").tooltip("disable"),jQuery("#map-container-"+this.data.containers[t].id).css(this.fullscreen_map_old_style),this.mapInit(this.data.containers[t].id),this.mapInitSliders(),this.registerTooltips();break}},getReplaySpeedFromIndex:function(t){return this.data.global.options.replay_speeds[t]},getContainerByType:function(t){for(i=0;i"+t.start_no_text+" "+t.__fullname+"
("+this.strings.finished+")"):"started"==l.estimated_pos||"started"==l.state?(o=this.strings.started,a+=""+t.start_no_text+" "+t.__fullname+"
("+this.strings.started+")"):(o=this.strings.not_started,a+=""+t.start_no_text+" "+t.__fullname):(l.estimated_pos_string||(l.estimated_pos_string=l.estimated_pos),a=(a+=""+t.start_no_text+" "+t.__fullname)+"
"+l.estimated_pos_string+" km",o+=l.estimated_pos_string+" km",this.data.global.options.show_map_miles&&(a+="/"+t.__estimated_pos_factor+" Miles",o+="/"+t.__estimated_pos_factor+" Miles"),t.__estimated_finish&&(a+="
"+this.strings.estimated_finish+": "+t.__estimated_finish),t.__estimated_finish_daytime&&(a+="
"+this.strings.estimated_finish_daytime+": "+t.__estimated_finish_daytime)),r+=a,a=''+a,e?o+=" "+this.strings.click_to_follow:r=(n=i?(a='',a=(a+=''+this.data.global.options.favorite_titles[s]+"")+''+t.start_no_text+" "+t.__fullname,t.subtitle&&(a+="
"+t.subtitle),a+="
","marker-person small details-short"):(a='',a+=''+this.data.global.options.favorite_titles[s]+"","marker-person small"),this.data.global.options.favorite_titles[s]),{title:o,label:a,summary:r,css_class:n+=" fav-color i-"+s}},mapInit:function(t){if("object"==typeof google.maps||"function"==typeof google.maps){var e;switch(this.maps[t]=new google.maps.Map(document.getElementById("map-container-"+t)),this.data.global.options.map_type){case"satellite":e=google.maps.MapTypeId.SATELLITE;break;case"hybrid":e=google.maps.MapTypeId.HYBRID;break;case"physical":case"terrain":e=google.maps.MapTypeId.TERRAIN;break;default:e=google.maps.MapTypeId.ROADMAP}if(this.maps[t].setOptions({mapTypeId:e,zoom:8}),this.data.containers[t].data.tracks){this.mapPolylines[t]=[],this.mapMarkers[t]=[],this.mapMarkersPersons[t]=[],this.mapMarkersFree[t]=[],this.mapBounds[t]=new google.maps.LatLngBounds;var i,s,o=0;for(i in this.data.containers[t].data.tracks)this.data.containers[t].data.tracks.hasOwnProperty(i)&&(s=!1,o==this.data.containers[t].data.tracks.length-1&&(s=!0),this.mapPolylines[t][i]=this.mapInitTrack(t,this.data.containers[t].data.tracks[i],this.data.containers[t].data.fields.data,s),o++,this.maps[t].fitBounds(this.mapBounds[t]))}}this.mapUpdate(t),this.mapUpdateOverlays(t)},mapInitTrack:function(t,e,i,s){var o="#0000ff",o=(e.color&&(o=e.color),new google.maps.Polyline({strokeColor:o,strokeWeight:4,strokeOpacity:.8})),a=google.maps.geometry.encoding.decodePath(e.points_encoded);o.setPath(a),o.setMap(this.maps[t]);for(var r=0;rkm",labelAnchor:new google.maps.Point(8,31),labelClass:"marker-km",zIndex:h,labelZIndex:h+1}),h++,d+=1e3*e.km_marker}if(e.custom_marker)for(var p in e.custom_marker)e.custom_marker.hasOwnProperty(p)&&(l=moveAlongPath(i,1e3*(p=e.custom_marker[p]).km))&&new MarkerWithLabel({icon:a=new google.maps.MarkerImage(this.options.path_images+"/map_marker_grey.png",new google.maps.Size(32,37),new google.maps.Point(0,0),new google.maps.Point(16,37)),position:l,draggable:!1,map:this.maps[t],labelContent:p.title,labelAnchor:new google.maps.Point(10,31),labelClass:"marker-km custom",labelStyle:{opacity:1}});var c=i.getPath().getAt(i.getPath().getLength()-1),o=(c&&(r=o?this.options.path_images+"/map_flag_finish.png":this.options.path_images+"/map_flag_blue.png",a=new google.maps.MarkerImage(r,new google.maps.Size(32,37),new google.maps.Point(0,0),new google.maps.Point(11,30)),new google.maps.Marker({position:c,map:this.maps[t],icon:a})),i.getPath().getAt(0));o&&(a=new google.maps.MarkerImage(this.options.path_images+"/map_flag_start.png",new google.maps.Size(32,37),new google.maps.Point(0,0),new google.maps.Point(11,30)),new google.maps.Marker({position:o,map:this.maps[t],icon:a}))},mapUpdate:function(t){var e,i=this.getContainerByType("favorites");if(!i)return!1;for(e in i.data.rows)if(i.data.rows.hasOwnProperty(e)){var s=i.data.rows[e];if(!s.id)return!0;var o,a=s.split_groups[s.global_info.active_group_key];void 0===this.mapMarkerCluster[t]&&(this.mapMarkerCluster[t]={}),(a.estimated_pos||0===a.estimated_pos)&&(o="",jQuery.each(this.data.containers[t].data.mappings.tracks,function(t,e){if(e.event_ids&&-1==e.event_ids.indexOf(s.event))return!0;if(s.start_group&&e.start_groups&&-1==e.start_groups.indexOf(s.start_group))return!0;if(e.split_groups&&-1==e.split_groups.indexOf(s.global_info.active_group_key))return!0;if(e.field_values)for(var i in e.field_values)if(e.field_values.hasOwnProperty(i)&&-1==e.field_values[i].indexOf(s[i]))return!0;return o=e.track,!1}),o)&&void 0!==(a=this.mapPolylines[t][o])&&this.mapUpdatePersonMarker(t,o,a,s,e)}if(this.data.containers[t].data.options.clustering)for(o in this.data.containers[t].data.tracks)if(this.data.containers[t].data.tracks.hasOwnProperty(o))if(this.mapMarkerCluster[t]||(this.mapMarkerCluster[t]={}),this.mapMarkerCluster[t]&&void 0===this.mapMarkerCluster[t][o]&&(this.mapMarkerCluster[t][o]={}),this.mapMarkerCluster[t]&&"function"==typeof this.mapMarkerCluster[t][o].repaint)this.mapMarkerCluster[t][o].repaint();else{for(var r in this.mapMarkerClusterIcons[t]=[],this.data.containers[t].data.mappings.markers){var n,l=this.data.containers[t].data.mappings.markers[r];l.cluster_sizes&&((n=this.data.containers[t].data.markers[l.marker]).icon.anchor||(n.icon.anchor=[32,32]),n.icon.height||(n.icon.height=32),n.icon.width||(n.icon.width=32),n.icon.url)&&this.mapMarkerClusterIcons[t].push({url:n.icon.url,height:n.icon.height,width:n.icon.width,anchor:[20,20],anchorIcon:[n.icon.anchor[0],n.icon.anchor[1]],mapping:l})}var p=this.mapMarkerClusterIcons[t];this.mapMarkerCluster[t][o]=new MarkerClusterer(this.maps[t],this.mapMarkersPersons[t],{gridSize:20,calculator:function(t,e){var i,s=0,o="",a=0,r=0,n=0;for(i in t)t.hasOwnProperty(i)&&("e"==t[i].clusterSummaryDirection&&a++,"w"==t[i].clusterSummaryDirection&&r++,"not_started"!=t[i].clusterSummaryPosition&&"finished"!=t[i].clusterSummaryPosition||n++,t[i].clusterSummary)&&(o+=""+t[i].clusterSummary+"");var l,d={count:t.length};for(l in 4'+o+""}},styles:this.mapMarkerClusterIcons[t]})}if(this.favoritesSelected){var d=new google.maps.LatLngBounds,h=0;for(r in this.mapMarkersPersons[t])this.mapMarkersPersons[t].hasOwnProperty(r)&&-1!=this.favoritesSelected.indexOf(this.mapMarkersPersons[t][r].favoriteId)&&(h++,d.extend(this.mapMarkersPersons[t][r].getPosition()));this.mapAutoZoom&&1window.screen.logicalXDPI?t=window.screen.systemXDPI/window.screen.logicalXDPI:void 0!==window.devicePixelRatio&&(t=window.devicePixelRatio),t},mapFetchIcons:function(t,e){var i,s={},o="",a="",r="",n="";for(i in t)t.hasOwnProperty(i)&&i.substr(0,e.length)==e&&((s=this.mapFetchIcon(e,i,"marker")).icon&&(o=t[i],a=s.ratio),(s=this.mapFetchIcon(e,i,"settings")).icon)&&(r=t[i],n=s.ratio);for(i in t)t.hasOwnProperty(i)&&(o||(s=this.mapFetchIcon("",i,"marker")).icon&&(o=t[i],a=s.ratio),r||(s=this.mapFetchIcon("",i,"settings")).icon&&(r=t[i],n=s.ratio));return{icon_settings:r,icon_settings_ratio:n,icon_marker:o,icon_marker_ratio:a}},mapFetchIcon:function(t,e,i){var s="",o=null;return t&&(shift_substr=t.length+1),e.substr(0,i.length+3)==i+"@3x"&&3==this.pixelRatio?(s=e,o=3):"@2x"==e.substr(0,i.length+3)&&2==this.pixelRatio?(s=e,o=2):e.substr(0,i.length)==i&&(s=e,o=1),{icon:s,ratio:o}},mapUpdateOverlays:function(t){var e=this.getContainerByType("overlays");if(e)for(var i in e.data.rows)if(e.data.rows.hasOwnProperty(i)){var s,o,a,r=e.data.rows[i];if(-1==this.mapOverlays.indexOf(r.id)){for(o in this.mapMarkers[t][r.id])this.mapMarkers[t][r.id].hasOwnProperty(o)&&this.mapMarkers[t][r.id][o].setMap(null);this.mapMarkers[t][r.id]=[]}else for(o in r.icons&&(s=this.mapFetchIcons(r.icons,"resultsboard")),r.points)r.points.hasOwnProperty(o)&&(a={},a=this.mapFetchIcons(r.points[o].icons,"resultsboard").icon_marker||s.icon_marker,this.mapUpdateMarker(t,{icon:a,position_latlng:r.points[o].position_latlng,title:r.points[o].title,description:r.points[o].description,show_label:r.show_label,detail_window:r.show_label},r.id,o))}},mapUpdateMarker:function(t,i,s,o){var e,a,r={},n=["icon","shadow"];for(e in n)n.hasOwnProperty(e)&&i[a=n[e]]&&(r[a]=new google.maps.MarkerImage,i[a].url&&(r[a].url=i[a].url),i[a].width&&i[a].height&&(r[a].size=new google.maps.Size(i[a].width,i[a].height)),i[a].anchor&&(r[a].anchor=new google.maps.Point(i[a].anchor[0],i[a].anchor[1])),i[a].origin)&&(r[a].origin=new google.maps.Point(i[a].origin[0],i[a].origin[1]));r.icon||(r.icon=new google.maps.MarkerImage,r.icon.url="http://maps.gstatic.com/intl/de_ALL/mapfiles/ms/micons/man.png",r.icon.anchor=new google.maps.Point(16,32)),r.shadow||(r.shadow=new google.maps.MarkerImage,r.shadow.url="http://maps.gstatic.com/intl/de_ALL/mapfiles/ms/micons/man.shadow.png",r.shadow.anchor=new google.maps.Point(16,32)),void 0===this.mapMarkers[t][s]&&(this.mapMarkers[t][s]={});var l,d,h=new google.maps.LatLng(i.position_latlng[0],i.position_latlng[1]);return this.mapMarkers[t][s][o]?(this.mapMarkers[t][s][o].setPosition(h),this.mapMarkers[t][s][o].setOptions({labelContent:i.title,optimized:!1}),this.mapMarkers[t][s][o].setIcon(r.icon),this.mapMarkers[t][s][o].setShadow(r.shadow)):(i.show_label?(this.mapMarkers[t][s][o]={},this.mapMarkers[t][s][o]=new MarkerWithLabel({icon:r.icon,shadow:r.shadow,optimized:!1,position:h,draggable:!1,labelContent:i.title,labelAnchor:new google.maps.Point(-10,20),labelClass:"marker-person marker-group marker-group-"+s})):(this.mapMarkers[t][s][o]={},this.mapMarkers[t][s][o]=new google.maps.Marker({icon:r.icon,shadow:r.shadow,optimized:!1,position:h,draggable:!1})),this.mapMarkers[t][s][o].setMap(this.maps[t]),l=this.options.globalObjectName,(d=new google.maps.OverlayView).draw=function(){},d.setMap(this.maps[t]),google.maps.event.addListener(this.mapMarkers[t][s][o],"mouseover",function(t){var e="

"+i.title+"

";e+='
'+i.description+"
";t=d.getProjection().fromLatLngToContainerPixel(t.latLng);window[l].trigger("openInfoWindow",{index:o,groupKey:s,top:t.y,left:t.x,html:e})}),google.maps.event.addListener(this.mapMarkers[t][s][o],"mouseout",function(t){window[l].trigger("closeInfoWindow",{})})),!0},mapUpdatePersonMarker:function(t,e,i,s,o){var a,r,n="",l=!1,d=s.split_groups[s.global_info.active_group_key];if(i&&(a=0,isNaN(d.estimated_pos)?"finished"==d.estimated_pos?l=i.getPath().getAt(i.getPath().getLength()-1):"started"==d.estimated_pos?l=moveAlongPath(i,0):"not_started"==d.estimated_pos&&(l=i.getPath().getAt(0)):(l=moveAlongPath(i,1e3*d.estimated_pos),a=d.estimated_pos)),!l)return!1;for(r in this.data.containers[t].data.mappings.markers)if(this.data.containers[t].data.mappings.markers.hasOwnProperty(r)){var h=this.data.containers[t].data.mappings.markers[r];if(!(h.event_ids&&-1==h.event_ids.indexOf(s.event)||h.directions&&-1==h.directions.indexOf(l.direction)||h.sex&&-1==h.sex.indexOf(s.sex)||h.states&&-1==h.states.indexOf(d.state)||h.split_groups&&-1==h.split_groups.indexOf(s.global_info.active_group_key)||h.source&&-1==h.source.indexOf(s.position_data.source))){if(0",o+="
"+s.tracker_data.position[0]+","+s.tracker_data.position[1],this.mapMarkersPersons[t][s.id]?(this.mapMarkersPersons[t][s.id].setPosition(i),this.mapMarkersPersons[t][s.id].setOptions({clusterSummary:b.summary,clusterSummaryClass:b.css_class+" summary",clusterSummaryDirection:l.direction,clusterSummaryPosition:d.estimated_pos,labelContent:o,optimized:!1}),this.mapMarkersPersons[t][s.id].setIcon(g.icon),this.mapMarkersPersons[t][s.id].setShadow(g.shadow)):(this.mapMarkersPersons[t][s.id]={},this.mapMarkersPersons[t][s.id]=new MarkerWithLabel({dataId:s.id,icon:g.icon,shadow:g.shadow,favoriteId:s.id,optimized:!1,position:l,draggable:!1,clusterSummary:b.summary,clusterSummaryClass:b.css_class+" summary",clusterSummaryDirection:l.direction,clusterSummaryPosition:d.estimated_pos,labelContent:o,labelAnchor:new google.maps.Point(-20,30),labelClass:b.css_class,zIndex:999,labelZIndex:1e3}))),!0},mapCenter:function(t){var e,i=new google.maps.LatLngBounds;for(e in this.mapPolylines[t])if(this.mapPolylines[t].hasOwnProperty(e))for(var s=this.mapPolylines[t][e].getPath(),o=0;os.lng()&&(a="w"),(r=google.maps.geometry.spherical.computeOffset(r,e,google.maps.geometry.spherical.computeHeading(r,s))).direction=a,r):moveAlongPath(t,e-o,i+1)):null}function ClusterIcon(t,e){t.getMarkerClusterer().extend(ClusterIcon,google.maps.OverlayView),this.cluster_=t,this.className_=t.getMarkerClusterer().getClusterClass(),this.styles_=e,this.center_=null,this.div_=null,this.sums_=null,this.visible_=!1,this.setMap(t.getMap())}function Cluster(t){this.markerClusterer_=t,this.map_=t.getMap(),this.gridSize_=t.getGridSize(),this.minClusterSize_=t.getMinimumClusterSize(),this.averageCenter_=t.getAverageCenter(),this.markers_=[],this.center_=null,this.bounds_=null,this.clusterIcon_=new ClusterIcon(this,t.getStyles())}function MarkerClusterer(t,e,i){this.extend(MarkerClusterer,google.maps.OverlayView),e=e||[],i=i||{},this.markers_=[],this.clusters_=[],this.listeners_=[],this.activeMap_=null,this.ready_=!1,this.gridSize_=i.gridSize||60,this.minClusterSize_=i.minimumClusterSize||2,this.maxZoom_=i.maxZoom||null,this.styles_=i.styles||[],this.title_=i.title||"",this.zoomOnClick_=!0,void 0!==i.zoomOnClick&&(this.zoomOnClick_=i.zoomOnClick),this.averageCenter_=!1,void 0!==i.averageCenter&&(this.averageCenter_=i.averageCenter),this.ignoreHidden_=!1,void 0!==i.ignoreHidden&&(this.ignoreHidden_=i.ignoreHidden),this.enableRetinaIcons_=!1,void 0!==i.enableRetinaIcons&&(this.enableRetinaIcons_=i.enableRetinaIcons),this.imagePath_=i.imagePath||MarkerClusterer.IMAGE_PATH,this.imageExtension_=i.imageExtension||MarkerClusterer.IMAGE_EXTENSION,this.imageSizes_=i.imageSizes||MarkerClusterer.IMAGE_SIZES,this.calculator_=i.calculator||MarkerClusterer.CALCULATOR,this.batchSize_=i.batchSize||MarkerClusterer.BATCH_SIZE,this.batchSizeIE_=i.batchSizeIE||MarkerClusterer.BATCH_SIZE_IE,this.clusterClass_=i.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize_=this.batchSizeIE_),this.setupStyles_(),this.addMarkers(e,!0),this.setMap(t)}"object"==typeof google&&(ClusterIcon.prototype.onAdd=function(){var o,a,r=this;this.div_=document.createElement("div"),this.div_.className=this.className_,this.visible_&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div_),this.boundsChangedListener_=google.maps.event.addListener(this.getMap(),"bounds_changed",function(){a=o}),google.maps.event.addDomListener(this.div_,"mousedown",function(){a=!(o=!0)}),google.maps.event.addDomListener(this.div_,"click",function(t){var e,i,s;o=!1,a||(s=r.cluster_.getMarkerClusterer(),google.maps.event.trigger(s,"click",r.cluster_),google.maps.event.trigger(s,"clusterclick",r.cluster_),s.getZoomOnClick()&&(i=s.getMaxZoom(),e=r.cluster_.getBounds(),s.getMap().fitBounds(e),setTimeout(function(){s.getMap().fitBounds(e),null!==i&&s.getMap().getZoom()>i&&s.getMap().setZoom(i+1)},100)),t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation())}),google.maps.event.addDomListener(this.div_,"mouseover",function(){var t=r.cluster_.getMarkerClusterer();google.maps.event.trigger(t,"mouseover",r.cluster_)}),google.maps.event.addDomListener(this.div_,"mouseout",function(){var t=r.cluster_.getMarkerClusterer();google.maps.event.trigger(t,"mouseout",r.cluster_)})},ClusterIcon.prototype.onRemove=function(){this.div_&&this.div_.parentNode&&(this.hide(),google.maps.event.removeListener(this.boundsChangedListener_),google.maps.event.clearInstanceListeners(this.div_),this.div_.parentNode.removeChild(this.div_),this.div_=null)},ClusterIcon.prototype.draw=function(){var t;this.visible_&&(t=this.getPosFromLatLng_(this.center_),this.div_.style.top=t.y+"px",this.div_.style.left=t.x+"px")},ClusterIcon.prototype.hide=function(){this.div_&&(this.div_.style.display="none"),this.visible_=!1},ClusterIcon.prototype.show=function(){var t,e,i,s;this.div_&&(t="",i=this.backgroundPosition_.split(" "),e=parseInt(i[0].trim(),10),i=parseInt(i[1].trim(),10),s=this.getPosFromLatLng_(this.center_),this.div_.style.cssText=this.createCss(s),t="",this.sums_.html?this.div_.innerHTML=t+this.sums_.html:this.div_.innerHTML=t+"
"+this.sums_.text+"
",void 0===this.sums_.title||""===this.sums_.title?this.div_.title=this.cluster_.getMarkerClusterer().getTitle():this.div_.title=this.sums_.title,this.div_.style.display=""),this.visible_=!0},ClusterIcon.prototype.useStyle=function(t){this.sums_=t;t=Math.max(0,t.index-1),t=Math.min(this.styles_.length-1,t),t=this.styles_[t];this.url_=t.url,this.height_=t.height,this.width_=t.width,this.anchorText_=t.anchorText||[0,0],this.anchorIcon_=t.anchorIcon||[parseInt(this.height_/2,10),parseInt(this.width_/2,10)],this.textColor_=t.textColor||"black",this.textSize_=t.textSize||11,this.textDecoration_=t.textDecoration||"none",this.fontWeight_=t.fontWeight||"bold",this.fontStyle_=t.fontStyle||"normal",this.fontFamily_=t.fontFamily||"Arial,sans-serif",this.backgroundPosition_=t.backgroundPosition||"0 0"},ClusterIcon.prototype.setCenter=function(t){this.center_=t},ClusterIcon.prototype.createCss=function(t){var e=[];return e.push("cursor: pointer;"),e.push("position: absolute; top: "+t.y+"px; left: "+t.x+"px;"),e.push("width: "+this.width_+"px; height: "+this.height_+"px;"),e.join("")},ClusterIcon.prototype.getPosFromLatLng_=function(t){t=this.getProjection().fromLatLngToDivPixel(t);return t.x-=this.anchorIcon_[1],t.y-=this.anchorIcon_[0],t.x=parseInt(t.x,10),t.y=parseInt(t.y,10),t},Cluster.prototype.getSize=function(){return this.markers_.length},Cluster.prototype.getMarkers=function(){return this.markers_},Cluster.prototype.getCenter=function(){return this.center_},Cluster.prototype.getMap=function(){return this.map_},Cluster.prototype.getMarkerClusterer=function(){return this.markerClusterer_},Cluster.prototype.getBounds=function(){for(var t=new google.maps.LatLngBounds(this.center_,this.center_),e=this.getMarkers(),i=0;is)t.getMap()!==this.map_&&t.setMap(this.map_);else if(ie||t'),t){var i,s;"active"!=e&&((i=document.createElement("audio")).id="sound"+e.replace("url_",""),i.autoplay=!1,i.loop=!1,i.volume=1,i.preload="auto",document.getElementById("playSound").appendChild(i),(s=document.createElement("source")).src=t[e],s.type="audio/wav",i.appendChild(s))}},playSound:function(t){document.getElementById("sound"+t)&&document.getElementById("sound"+t).play()}})}(jQuery),"function"!=typeof openQuicksearch&&(waitForRequireJsAndInjectQuicksearchFunction=function(){"function"==typeof require?require(["Mika/Quicksearch","Mika/Tools"],function(i,s){jQuery(document).ready(function(){var t=new s,e=document.createElement("input");e.className="hidden",document.getElementsByTagName("body")[0].appendChild(e),openQuicksearch=new i({input:t.identify(e)}).openQuicksearchDetailDialog})}):setTimeout(arguments.callee,200)},waitForRequireJsAndInjectQuicksearchFunction());var results_tfd_global={},tfd_object;function MikaResultsSearch(){}function setMouse(t){mouseX=t.pointerX(),mouseY=t.pointerY()}function escapeHtml(t){var e=document.createElement("div");return e.appendChild(document.createTextNode(t)),e.innerHTML}function lax(vars,ids,options){if(async=0,"object"==typeof ids&&0!=ids.length||(ids={0:"main-content"}),"object"!=typeof options&&(options={}),"object"!=typeof vars&&(vars={}),options.confirm&&!confirm(options.confirm))return!1;var url="?",key,i;for(key in vars)url+="&"+key+"="+vars[key];for(i in ids){var str="var callback"+i+" = function(result) { this.jq('"+ids[i]+"').update(result); ",str_url=(options.popup&&(str+="if (this.jq('"+ids[i]+"').style.display == 'none') {",str+="this.jq('"+ids[i]+"').style.display = 'block';",str+="}",str+="this.jq('"+ids[i]+"').style.width = '"+options.popup_width+"px';",str+="this.jq('"+ids[i]+"').style.height = '"+options.popup_height+"px';",str+="this.jq('"+ids[i]+"').style.top = mouseY+'px';",str+="this.jq('"+ids[i]+"').style.top = mouseY+'px';",options.popup_align="R",str+="this.jq('"+ids[i]+"').style.left = (mouseX-"+options.popup_width+") +'px';",str+=""),options.focus&&(str+="document.getElementById('"+options.focus+"').focus();"),str+="};",encodeURI(url+"&ajax="+ids[i])),str_url=str_url.replace(/\'/g,"\\'");str+="HTML_AJAX.grab('"+str_url+"', callback"+i+");",eval(str)}return!0}function pax(t,e,i,s){if("object"!=typeof i&&(i={0:"main-content"}),"object"!=typeof e&&(e={}),(s="object"!=typeof s?{}:s).confirm&&!confirm(s.confirm))return!1;var o,a,r="?";for(o in e)r+="&"+o+"="+e[o];for(a in i){var n=encodeURI(r+"&ajax="+i[a]);document.forms[t].action=n,HTML_AJAX.formSubmit(t,i[a])}return!0}function open_popup(t,e){for(query="",i=0;i'+this.config.strings.pause+"":t+=''+this.config.strings.pause+"",t+=''+this.config.strings.fullscreen_toggle+"",this.only_favorites?t+=''+this.config.strings.only_favorites+"":t+=''+this.config.strings.only_favorites+"",this.config.sound&&(this.sound?t+=''+this.config.strings.sound+"":t+=''+this.config.strings.sound+""),t+=''+this.config.strings.reset_all_filters+""},renderFilterStatus:function(){var r,n,l="";return void 0!==this.result.filters&&(jQuery("#"+this.options.target+" #tfd-status-filters").addClass("num-filters-"+Object.keys(this.result.filters).length),r=this.options.obj,n=0,jQuery.each(this.result.filters,function(t,s){var e,i,o,a;"status-bar"==s.type&&(l=(l=(l+='
')+'
'+s.title+"
")+'
',e=(e=jQuery("#tfd-main .status.field-"+s.field).width())||jQuery("#tfd-main").width(),"fixed"==jQuery("#tfd-container").css("position")&&(e-=22),i=s.values.length,o='style="width:'+(e/(i=s.num_button_rows?Math.ceil(s.values.length/s.num_button_rows):i)*s.button_width_factor-.2)+'px;" ',a="",jQuery.each(s.values,function(t,e){a="",e.has_data&&(a+=" active");var i="",t=(e.fav_count&&(i=''+e.fav_count+""),e.selected&&(a+=" selected"),t==s.values.length-1&&(a+=" last"),s.classes&&(a+=" "+s.classes),"");e.subtext&&(t=""+e.subtext+""),l+="'+e.value+t+i+""}),l+="
",n++)}),l+='
'),l},updateFilterStatus:function(){jQuery("#"+this.options.target+" #tfd-status-filters").html(this.renderFilterStatus())},render:function(t){this.options_submit.last_seq||(this.ids_on_screen=[]);var i,c,u,g,m,f,_,v,y,b,k,e,s,o,w="",j="",C="",M=[],x=[],S=[];if(t||(w+='
'),void 0!==this.result.data&&("paused"==this.result.status?w+='
Stream pausiert. Wird automatisch fortgesetzt.
':this.result.data.length||"ok"!=this.result.status?(u=c=!1,this.options_submit.last_seq?this.result.data.length&&(jQuery("#"+this.options.target+" #tfd-content").removeClass("initial"),c=this.result.data.length):(void 0!==this.prev_result.data&&this.prev_result.data.length?(i=this.prev_result.data[0].seq,jQuery.each(this.result.data,function(t,e){if(e.seq==i)return c=t,!1})):i=!1,jQuery("#"+this.options.target+" #tfd-content").addClass("initial")),u=jQuery("#"+this.options.target+" .tfd-row").first().hasClass("highlight")?!(c%2):!!(c%2),g=this.config,m=this.favorites,f=this.options_submit.last_seq,_=0,v={},y=this.ids_on_screen,b={},k=this.options.obj,h=this.options,jQuery("#"+this.options.target+" .tfd-row").removeClass("created"),jQuery.each(this.result.data,function(t,s){if(void 0===s.seq)return!0;var e="",i="",o=!1,a="",r="",n="",l="",d=!1;if(b.row=!0,g.update_on_duplicates){var h=!1;for(p in y)if(y[p]==s.id){b.update=d=!0;break}}if(-1!=jQuery.inArray(s.id,m)?(o=!0,e+=" favorite"):s.fav&&(e+=" favorite",b.favorite=!0),s.css_class&&(e+=" "+s.css_class),u?(e+=" highlight",u=!1):(u=!0,e+=""),(c||f)&&(tACK
"),_++,j='
",l&&(j+=l),void 0!==s.g.marker&&(j+='
",jQuery.each(s.g.marker,function(t,e){j+='
',e.v,"cutoff"==e.n&&void 0!==e.o&&void 0!==e.o.cutoff_discipline&&null!=e.o.cutoff_discipline&&(j+='
'+e.o.cutoff_discipline+"
"),j+="
",void 0!==e.o&&(v[s.id]={field:e.n.toLowerCase(),options:e.o})}),j+="
"),void 0!==s.g.primary&&(j+='
",jQuery.each(s.g.primary,function(t,e){var i;i=void 0!==e.o&&void 0!==e.o.width?'style="width:'+e.o.width+'"':"",j+="
',e.v&&(j+=e.v),j+="
",void 0!==e.o&&(v[s.id]={field:e.n.toLowerCase(),options:e.o})}),j+="
",t="",void 0!==s.g.marker&&s.g.marker.length&&(t+=" has-marker marker-"+s.g.marker.length),C='
',jQuery.each(s.g.primary,function(t,e){var i;i=void 0!==e.o&&void 0!==e.o.width?'style="width:'+e.o.width+'"':"",C+="
',e.n&&(C+=e.n),C+="
"}),C+="
"),void 0!==s.g.secondary&&(j+='
",jQuery.each(s.g.secondary,function(t,e){var i;i=void 0!==e.o&&void 0!==e.o.width?'style="width:'+e.o.width+'"':"",j=(j=(j+="
')+'
'+e.n+"
")+e.v+"
",void 0!==e.o&&(v[s.id]={field:e.n.toLowerCase(),options:e.o})}),j+="
"),void 0!==s.g.tertiary&&(j+='
",jQuery.each(s.g.tertiary,function(t,e){j=(j=(j+='
')+'
'+e.n+"
")+e.v+"
",void 0!==e.o&&(v[s.id]={field:e.n.toLowerCase(),options:e.o})}),j+="
"),j=j+'
'+"
",g.update_on_duplicates){h=!1;for(p in y)if(y[p]==s.id){x.push({id:s.id,content:j}),h=!0;break}h||(M.push(j),w+=j)}else M.push(j),w+=j;if(y.push(s.id),g.close_on_duplicates&&is_close)for(var p in y)y[p]==s.id&&delete y[p]})):w=(w+='
')+'
'+this.config.strings.no_results+"
"),t||(w+='
'),this.options_submit.last_seq){if(void 0!==g&&"overview"==g.mode)for(var a in S)if(jQuery("#"+this.options.target+" .index-"+S[a]).replaceWith(M[a]).length)jQuery("#"+this.options.target+" .index-"+S[a]).removeClass("newentry"),jQuery("#"+this.options.target+" .index-"+S[a]).addClass("updated");else{var r=[];if(jQuery("#"+this.options.target+" .tfd-row").each(function(t){var e=jQuery(this).attr("class"),e=(e=e.substr(e.indexOf("index-")+6)).replace(" updated","");r.push(e)}),r.length){var n,l=r;for(n in l.push(S[a]),isNaN(l[0])?l.sort():l.sort(function(t,e){return t-e}),l)l[n]==S[a]&&(0<(n=parseInt(n))?jQuery("#"+this.options.target+" .index-"+l[n-1]).after(M[a]):jQuery("#"+this.options.target+" .index-"+l[n+1]).before(M[a]),jQuery("#"+this.options.target+" .index-"+S[a]).addClass("updated"))}else jQuery("#"+this.options.target+" #tfd-content").append(M[a])}else if(jQuery("#"+this.options.target+" #tfd-content").prepend(M.join("")),jQuery("#"+this.options.target+" #tfd-content div.tfd-row").length>this.result.max_entries)for(a=0;a<_;a++)jQuery("#"+this.options.target+" #tfd-content .tfd-row:last").remove();if(this.config.sound.active&&this.sound)for(a in b)void 0!==this.config.sound["url_"+a]&&this.config.sound["url_"+a]&&jQuery.playSound(a)}else(t?jQuery("#"+this.options.target+" #tfd-content"):jQuery("#"+this.options.target)).html(w);for(e in C&&jQuery("#"+this.options.target+" .tfd-legend-row").html(C),void 0!==g&&void 0!==g.highlight_animations&&void 0!==g.highlight_animations.created&&(o=g.highlight_animations.created,jQuery("#"+h.target+" .tfd-row.created .field.message").animate({width:"show"},{duration:5e3,complete:function(){jQuery(this).animate({color:o.color},{duration:o.speed})}})),v)for(var d in v[e].options)switch(d){case"start_clock":v[e].options[d]&&this.clockStartForId(e,v[e].field);break;case"stop_clock":v[e].options[d]&&this.clockStopForId(e,v[e].field);break;case"call_trigger":s=!this.result.from_seq,this.callTrigger(v[e].options[d],e,{init:s});break;case"timer":s=this.result.from_seq?"false":"true",v[e].options[d].call_trigger&&v[e].options[d].timeout&&(this.timer["timer_"+e]=window.setTimeout(this.options.obj+".callTrigger('"+v[e].options[d].call_trigger+"', '"+e+"', {init:"+s+"});",v[e].options[d].timeout))}for(a in x)jQuery("#"+this.options.target+" #id-"+x[a].id).replaceWith(x[a].content);this.config.animation_speed&&("customTrigger"!==this.config.animation&&(jQuery("#"+this.options.target+" .newentry").slideDown(this.config.animation_speed),jQuery("#"+this.options.target+" .closed").hide()),this.config.highlight_animations)&&!(o=void 0!==this.config.highlight_animations.updated?this.config.highlight_animations.updated:this.config.highlight_animations.default).disabled&&jQuery("#"+this.options.target+" .updated").css({display:"block"}).effect("highlight",{color:o.color},o.speed),jQuery("#"+this.options.target+" .newentry").removeClass("newentry"),jQuery("#"+this.options.target+" .updated").removeClass("updated"),t||jQuery("#"+this.options.target+" #tfd-status-buttons").html(this.renderStatusButtons());var h=!1;jQuery("#"+this.options.target+" .status-container").length||(h=!0),this.hash_filters!=this.result.filters_hash&&(this.updateFilterStatus(),this.hash_filters=this.result.filters_hash),h&&this.updateFilterStatus(),this.reloadAckFavoritesMark(),MikaResultsRenderTrigger()},callTrigger:function(t,e,i){switch(t){case"open":this.config.highlight_animations&&(s=void 0!==this.config.highlight_animations.opened?this.config.highlight_animations.opened:this.config.highlight_animations.default,o=this.options.obj,i.init||jQuery("#"+this.options.target+" #id-"+e).animate({width:"show"},{duration:window[o].config.animation_speed,complete:function(){jQuery(this).effect("highlight",{color:s.color,duration:s.speed})}}));break;case"update1":this.config.highlight_animations&&(s=void 0!==this.config.highlight_animations.update1?this.config.highlight_animations.update1:this.config.highlight_animations.default,o=this.options.obj,i.init||jQuery("#"+this.options.target+" #id-"+e).animate({width:"show"},{duration:window[o].config.animation_speed,complete:function(){jQuery(this).effect("highlight",{color:s.color,duration:s.speed})}}));break;case"update2":this.config.highlight_animations&&(s=void 0!==this.config.highlight_animations.update2?this.config.highlight_animations.update2:this.config.highlight_animations.default,o=this.options.obj,i.init||jQuery("#"+this.options.target+" #id-"+e).animate({width:"show"},{duration:window[o].config.animation_speed,complete:function(){jQuery(this).effect("highlight",{color:s.color,duration:s.speed})}}));break;case"update3":this.config.highlight_animations&&(s=void 0!==this.config.highlight_animations.update3?this.config.highlight_animations.update3:this.config.highlight_animations.default,o=this.options.obj,i.init||jQuery("#"+this.options.target+" #id-"+e).animate({width:"show"},{duration:window[o].config.animation_speed,complete:function(){jQuery(this).effect("highlight",{color:s.color,duration:s.speed})}}));break;case"close":this.config.highlight_animations&&(s=void 0!==this.config.highlight_animations.closed?this.config.highlight_animations.closed:this.config.highlight_animations.default,o=this.options.obj,i.init?jQuery("#"+this.options.target+" #id-"+e).remove():jQuery("#"+this.options.target+" #id-"+e).effect("highlight",{color:s.color,duration:s.speed,complete:function(){jQuery(this).animate({width:"hide"},{duration:window[o].config.animation_speed,complete:function(){jQuery(this).remove()}})}}));break;case"close_timeout":var s,o;this.config.highlight_animations&&(s=void 0!==this.config.highlight_animations.closed_timeout?this.config.highlight_animations.closed_timeout:this.config.highlight_animations.default,o=this.options.obj,i.init?jQuery("#"+this.options.target+" #id-"+e).remove():jQuery("#"+this.options.target+" #id-"+e).effect("highlight",{color:s.color,duration:s.speed,complete:function(){jQuery(this).animate({width:"hide"},{duration:window[o].config.animation_speed,complete:function(){jQuery(this).remove()}})}}))}},clockStartForId:function(t,e){this.clocks[t]={field:e,time:0},this.clockUpdate(t),void 0!==this.timer[t]&&window.clearInterval(this.timer[t]),this.timer[t]=window.setInterval(this.options.obj+".clockUpdate('"+t+"')",100)},clockStopForId:function(t){delete this.clocks[t],window.clearInterval(this.timer[t]),delete this.timer[t]},clockUpdate:function(t){var e,i,s;void 0!==this.clocks[t]&&((e=jQuery("#"+this.options.target+" #id-"+t+" .field."+this.clocks[t].field)).length?(this.clocks[t].time+=100,(i=this.parseSeconds(this.clocks[t].time,!0)).hours<10&&(i.hours="0"+i.hours),i.minutes<10&&(i.minutes="0"+i.minutes),i.seconds<10&&(i.seconds="0"+i.seconds),i.milliseconds=i.milliseconds/10,0==i.milliseconds&&(i.milliseconds="00"),s="",s=(s=(s=(s+=i.hours+":")+i.minutes+":")+i.seconds+".")+i.milliseconds/10,e.html(s)):this.clockStopForId(t))},clockClearTimers:function(){for(var t in this.clocks)window.clearInterval(this.timer[t]),delete this.timer[t];this.clocks=[]},setOptions:function(t){this.options=t},parseSeconds:function(t,e){var i={},e=(e||(t*=1e3),i.days=Math.floor(t/864e5),t%864e5);return i.hours=Math.floor(e/36e5),e%=36e5,i.minutes=Math.floor(e/6e4),e%=6e4,i.seconds=Math.floor(e/1e3),i.milliseconds=e%1e3,i}},MikaResultsSearch.prototype={jq:{},options:{},requester:{},data:{},targetElement:{},strings:{},timer:{},options_submit:{},branches:{},setOptions:function(t){this.options=t},setJQ:function(t){this.jq=t},createSearchFields:function(t){if("function"!=typeof this.jq&&"function"==typeof jQuery)this.jq=jQuery.noConflict();else if("function"!=typeof this.jq)return void console.log("no jQuery found!");this.reload()},makeRequest:function(t,e,i){this.requester[t]=this.jq.ajax({type:"GET",url:"index.php",data:{content:"ajax2",func:t,options:e},success:i,complete:function(){res2.unlockForm()}})},load:function(){var e=new this.jq.Deferred;return this.options_submit.lang=this.options.lang,this.options_submit.pid=this.options.pid,this.makeRequest("getSearchFields",this.options_submit,function(t){res2.setData(t),e.resolve()}),e.promise()},reload:function(t,e,i,s){var o,a=new this.jq.Deferred;if(this.options_submit.b={},t&&"event_main_group"==t.attr("name"))for(var e in this.options.mapping)for(var r in this.options.mapping[e]){var n=this.options.mapping[e][r],l=this.jq(n.parent+" "+n.element);"event"!=n.field&&"event_main_group"!=n.field&&"%"!=l.val()&&""!=l.val()&&(l.is("select")?l.val("%"):l.val(""))}for(o in this.options.mapping){for(var r in this.options_submit.b[o]={},this.options.mapping[o]){n=this.options.mapping[o][r];if(e==o||!i||i==n.parent){l=this.jq(n.parent+" "+n.element);if("%"!=l.val()&&""!=l.val()){if("event_main_group"==n.field&&t&&"event_main_group"==t.attr("name"))for(var d in this.options.mapping)for(var h in this.options.mapping[d]){var h=this.options.mapping[d][h];"event_main_group"==h.field&&0<(h=this.jq(h.parent+" "+h.element)).find('option[value="'+s.value+'"]').length&&h.val(s.value)}"event"==n.field&&t&&"event_main_group"==t.attr("name")?this.options_submit.b[o][n.field]="":this.options_submit.b[o][n.field]=l.val()}}}this.lockForm(o)}return this.load().then(function(){a.resolve()}),a.promise()},setData:function(t){this.branches=t.branches,this.strings=t.strings,this.render()},render:function(){for(var t in this.options.mapping)if(this.options.mapping.hasOwnProperty(t))for(var e in this.options.mapping[t]){var i,s;this.options.mapping[t].hasOwnProperty(e)&&(e=this.options.mapping[t][e],i=this.jq(e.parent+" "+e.element),"ok"==(s=this.branches[t].fields[e.field]).state&&s.data.length?this.generateSelectFromField(i,s.data,i.val(),e,t):this.generateField(i,i.val()),1==this.branches[t].fields[e.field].data.length)&&this.branches[t].fields[e.field].data[0].v[0]}},lockForm:function(t){for(var e in this.options.mapping)if(this.options.mapping.hasOwnProperty(e)){for(var i in this.options.mapping[e]){i=this.options.mapping[e][i];this.jq(i.parent+" "+i.element).attr("disabled","disabled")}window.clearTimeout(res2.timer[t]),res2.timer[t]=window.setTimeout("res2.showIndicator('"+t+"')",400)}},showIndicator:function(t){jQuery(".branch-"+t+" .box-content");jQuery(".panel-loading").css("display","block")},unlockForm:function(){for(var t in jQuery(".panel-loading").css("display","none"),res2.timer)window.clearTimeout(res2.timer[t])},generateSelectFromField:function(t,e,i,s,o){t.attr("placeholder")||t.attr("placeholder","");var a,r=this.jq("");for(a in r.attr({placeholder:t.attr("placeholder"),class:t.attr("class"),name:t.attr("name"),id:t.attr("id")}),i=i||"%",e){var n,l="object"==typeof e[a].v?(n=e[a].v[0],1!=e[a].n&&e[a].n&&null!=e[a].n?e[a].v[1]+" ("+e[a].n+")":e[a].v[1]):(n=e[a].v,1!=e[a].n&&e[a].n&&null!=e[a].n?e[a].v+" ("+e[a].n+")":e[a].v),d=this.jq("