/*!
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
function inherits(a,b){function c(){}c.prototype=b.prototype,a.superClass_=b.prototype,a.prototype=new c,a.prototype.constructor=a}function MarkerLabel_(a,b,c){this.marker_=a,this.handCursorURL_=a.handCursorURL,this.labelDiv_=document.createElement("div"),this.labelDiv_.style.cssText="position: absolute; overflow: hidden;",this.eventDiv_=document.createElement("div"),this.eventDiv_.style.cssText=this.labelDiv_.style.cssText,this.eventDiv_.setAttribute("onselectstart","return false;"),this.eventDiv_.setAttribute("ondragstart","return false;"),this.crossDiv_=MarkerLabel_.getSharedCross(b)}function MarkerWithLabel(a){a=a||{},a.labelContent=a.labelContent||"",a.labelAnchor=a.labelAnchor||new google.maps.Point(0,0),a.labelClass=a.labelClass||"markerLabels",a.labelStyle=a.labelStyle||{},a.labelInBackground=a.labelInBackground||!1,"undefined"==typeof a.labelVisible&&(a.labelVisible=!0),"undefined"==typeof a.raiseOnDrag&&(a.raiseOnDrag=!0),"undefined"==typeof a.clickable&&(a.clickable=!0),"undefined"==typeof a.draggable&&(a.draggable=!1),"undefined"==typeof a.optimized&&(a.optimized=!1),a.crossImage=a.crossImage||"http"+("https:"===document.location.protocol?"s":"")+"://maps.gstatic.com/intl/en_us/mapfiles/drag_cross_67_16.png",a.handCursor=a.handCursor||"http"+("https:"===document.location.protocol?"s":"")+"://maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur",a.optimized=!1,this.label=new MarkerLabel_(this,a.crossImage,a.handCursor),google.maps.Marker.apply(this,arguments)}/*!
* MikaResults
* board component
* 2014
*
* otto.berger@mikatiming.de
*/
function MikaResultsBoard(){}function moveAlongPath(a,b,c){if(c=c||0,c=b){var g=!1;d.lng()e.lng()&&(g="w");var h=google.maps.geometry.spherical.computeOffset(d,b,google.maps.geometry.spherical.computeHeading(d,e));return h.direction=g,h}return moveAlongPath(a,b-f,c+1)}return null}function ClusterIcon(a,b){a.getMarkerClusterer().extend(ClusterIcon,google.maps.OverlayView),this.cluster_=a,this.className_=a.getMarkerClusterer().getClusterClass(),this.styles_=b,this.center_=null,this.div_=null,this.sums_=null,this.visible_=!1,this.setMap(a.getMap())}function Cluster(a){this.markerClusterer_=a,this.map_=a.getMap(),this.gridSize_=a.getGridSize(),this.minClusterSize_=a.getMinimumClusterSize(),this.averageCenter_=a.getAverageCenter(),this.markers_=[],this.center_=null,this.bounds_=null,this.clusterIcon_=new ClusterIcon(this,a.getStyles())}function MarkerClusterer(a,b,c){this.extend(MarkerClusterer,google.maps.OverlayView),b=b||[],c=c||{},this.markers_=[],this.clusters_=[],this.listeners_=[],this.activeMap_=null,this.ready_=!1,this.gridSize_=c.gridSize||60,this.minClusterSize_=c.minimumClusterSize||2,this.maxZoom_=c.maxZoom||null,this.styles_=c.styles||[],this.title_=c.title||"",this.zoomOnClick_=!0,void 0!==c.zoomOnClick&&(this.zoomOnClick_=c.zoomOnClick),this.averageCenter_=!1,void 0!==c.averageCenter&&(this.averageCenter_=c.averageCenter),this.ignoreHidden_=!1,void 0!==c.ignoreHidden&&(this.ignoreHidden_=c.ignoreHidden),this.enableRetinaIcons_=!1,void 0!==c.enableRetinaIcons&&(this.enableRetinaIcons_=c.enableRetinaIcons),this.imagePath_=c.imagePath||MarkerClusterer.IMAGE_PATH,this.imageExtension_=c.imageExtension||MarkerClusterer.IMAGE_EXTENSION,this.imageSizes_=c.imageSizes||MarkerClusterer.IMAGE_SIZES,this.calculator_=c.calculator||MarkerClusterer.CALCULATOR,this.batchSize_=c.batchSize||MarkerClusterer.BATCH_SIZE,this.batchSizeIE_=c.batchSizeIE||MarkerClusterer.BATCH_SIZE_IE,this.clusterClass_=c.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize_=this.batchSizeIE_),this.setupStyles_(),this.addMarkers(b,!0),this.setMap(a)}function MikaResultsRenderTrigger(){"undefined"!=typeof require&&require(["Mika/Mika"],function(a){(new a).emit("results/board.rendered")})}function MikaSwitchClass(a){a||(a=jQuery("#class-switcher").val());var b=jQuery("body").attr("class").split(/\s+/);jQuery.each(b,function(a,b){"class-switcher-"==b.substr(0,15)&&jQuery("body").removeClass(b)}),document.cookie="results_class_switcher="+a,jQuery("body").addClass("class-switcher-"+a)}function MikaResultsTfd(){}/*!
* MikaResults
* search component
* 2014
*
* otto.berger@mikatiming.de
*/
function MikaResultsSearch(){}function setMouse(a){mouseX=a.pointerX(),mouseY=a.pointerY()}function escapeHtml(a){var b=document.createElement("div");return b.appendChild(document.createTextNode(a)),b.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="?";for(var key in vars)url+="&"+key+"="+vars[key];for(var i in ids){var str="var callback"+i+" = function(result) { this.jq('"+ids[i]+"').update(result); ";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';",str+=(options.popup_align="R")?"this.jq('"+ids[i]+"').style.left = (mouseX-"+options.popup_width+") +'px';":"this.jq('"+ids[i]+"').style.left = mouseX+'px';",str+=""),options.focus&&(str+="document.getElementById('"+options.focus+"').focus();"),str+="};";var str_url=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(a,b,c,d){if("object"!=typeof c&&(c={0:"main-content"}),"object"!=typeof d&&(d={}),"object"!=typeof b&&(b={}),d.confirm&&!confirm(d.confirm))return!1;var e="?";for(var f in b)e+="&"+f+"="+b[f];for(var g in c){var h=encodeURI(e+"&ajax="+c[g]);document.forms[a].action=h,HTML_AJAX.formSubmit(a,c[g])}return!0}function open_popup(a,b){for(query="",i=0;i0&&d.length>0?b+=" - "+d:b=a("title").text(),encodeURIComponent(b)}function e(){var b=document.location.href,c=a("link[rel=canonical]").attr("href");return c&&c.length>0&&(c.indexOf("http")<0&&(c=document.location.protocol+"//"+document.location.host+c),b=c),b}function f(a,b,c,d,e){var f=new Date;f.setTime(f.getTime()+24*c*60*60*1e3),document.cookie=a+"="+b+"; expires="+f.toUTCString()+"; path="+d+"; domain="+e}function g(a,b,c,d){var e=new Date;e.setTime(e.getTime()-100),document.cookie=a+"="+b+"; expires="+e.toUTCString()+"; path="+c+"; domain="+d}a.fn.socialSharePrivacy=function(c){function h(){var b=a.Deferred();return a.getJSON(j.lang_path+j.language+".lang",function(a){o=a,b.resolve()}).fail(function(a){"undefined"!=typeof console&&console.log("Error "+a.status+" while loading the language file ("+j.lang_path+j.language+".lang)"),b.reject()}),b.promise()}var i={services:{facebook:{status:"on",dummy_img:"dummy_facebook.png",perma_option:"on",referrer_track:"",action:"recommend",layout:"button_count",sharer:{status:"off",dummy_img:"dummy_facebook_share_de.png",img:"dummy_facebook_share_active_de.png"}},twitter:{status:"on",dummy_img:"dummy_twitter.png",perma_option:"on",referrer_track:"",tweet_text:d,count:"horizontal"},gplus:{status:"on",dummy_img:"dummy_gplus.png",perma_option:"on",referrer_track:"",size:"medium"}},info_link:"http://www.heise.de/ct/artikel/2-Klicks-fuer-mehr-Datenschutz-1333879.html",cookie_path:"/",cookie_domain:document.location.host,cookie_expires:"365",css_path:"socialshareprivacy/socialshareprivacy.css",uri:e,language:"de",lang_path:"socialshareprivacy/lang/",skin:"light",alignment:"horizontal",switch_alignment:"left",perma_orientation:"down",image_path:""},j=a.extend(!0,i,c),k="on"===j.services.facebook.status,l="on"===j.services.facebook.sharer.status,m="on"===j.services.twitter.status,n="on"===j.services.gplus.status;if(k||m||n){j.css_path.length>0&&"1"!=a(window).data("socialshareprivacy_css")&&(document.createStyleSheet?document.createStyleSheet(j.css_path):a("head").append(''),a(window).data("socialshareprivacy_css","1"));var o;return this.each(function(){var c=this;a.when(h()).then(function(){a(c).prepend('
"),a(d).on("mouseenter",".help_info:not(.info_off)",function(){var b=a(this),c=window.setTimeout(function(){a(b).addClass("display")},500);a(this).data("timeout_id",c)}),a(d).on("mouseleave",".help_info",function(){var b=a(this).data("timeout_id");window.clearTimeout(b),a(this).hasClass("display")&&a(this).removeClass("display")});var F="on"===j.services.facebook.perma_option,G="on"===j.services.twitter.perma_option,H="on"===j.services.gplus.perma_option;if(k&&F||m&&G||n&&H){for(var I=document.cookie.split(";"),J="{",K=0;K'+o.settings+"");var N="r"+Math.floor(101*Math.random()),O=' checked="checked"';if(k&&F){var P="perma_on"===J.socialSharePrivacy_facebook?O:"";M.find("form fieldset").append('")}if(m&&G){var Q="perma_on"===J.socialSharePrivacy_twitter?O:"";M.find("form fieldset").append('")}if(n&&H){var R="perma_on"===J.socialSharePrivacy_gplus?O:"";M.find("form fieldset").append('")}a(d).on("click","li.settings_info .settings",function(b){b.preventDefault(),"on"==a(this).data("keyb")?(a("li.settings_info",d).trigger("mouseleave"),a(this).data("keyb","off")):(a("li.settings_info .settings",d).trigger("mouseenter"),a(this).data("keyb","on"))}),a(d).on("mouseenter","li.settings_info .settings",function(){var b=window.setTimeout(function(){M.find(".settings_info_menu").removeClass("off").addClass("on")},500);a(this).data("timeout_id",b)}),a(d).on("mouseleave","li.settings_info",function(){var b=a(this).data("timeout_id");window.clearTimeout(b),M.find(".settings_info_menu").removeClass("on").addClass("off")}),a(d).on("click","li.settings_info fieldset input",function(b){var c=b.target.id,e=c.substr(c.lastIndexOf("_")+1,c.length),h="socialSharePrivacy_"+e;a("#"+b.target.id+":checked").length?(f(h,"perma_on",j.cookie_expires,j.cookie_path,j.cookie_domain),a("form fieldset label[for="+c+"]",d).addClass("checked")):(g(h,"perma_on",j.cookie_path,j.cookie_domain),a("form fieldset label[for="+c+"]",d).removeClass("checked"))}),k&&F&&"perma_on"===J.socialSharePrivacy_facebook&&a("li.facebook .switch",d).click(),m&&G&&"perma_on"===J.socialSharePrivacy_twitter&&a("li.twitter .switch",d).click(),n&&H&&"perma_on"===J.socialSharePrivacy_gplus&&a("li.gplus .switch",d).click()}})})}}}(jQuery),/*!
jQuery Colorbox v1.4.15 - 2013-04-22
(c) 2013 Jack Moore - jacklmoore.com/colorbox
license: http://www.opensource.org/licenses/mit-license.php
*/
function(a,b,c){function d(c,d,e){var f=b.createElement(c);return d&&(f.id=aa+d),e&&(f.style.cssText=e),a(f)}function e(){return c.innerHeight?c.innerHeight:a(c).height()}function f(a){var b=z.length,c=(R+a)%b;return 0>c?b+c:c}function g(a,b){return Math.round((/%/.test(a)?("x"===b?A.width():e())/100:1)*parseInt(a,10))}function h(a,b){return a.photo||a.photoRegex.test(b)}function i(a,b){return a.retinaUrl&&c.devicePixelRatio>1?b.replace(a.photoRegex,a.retinaSuffix):b}function j(a){"contains"in s[0]&&!s[0].contains(a.target)&&(a.stopPropagation(),s.focus())}function k(){var b,c=a.data(Q,_);null==c?(L=a.extend({},$),console&&console.log&&console.log("Error: cboxElement missing settings object")):L=a.extend({},c);for(b in L)a.isFunction(L[b])&&"on"!==b.slice(0,2)&&(L[b]=L[b].call(Q));L.rel=L.rel||Q.rel||a(Q).data("rel")||"nofollow",L.href=L.href||a(Q).attr("href"),L.title=L.title||Q.title,"string"==typeof L.href&&(L.href=a.trim(L.href))}function l(c,d){a(b).trigger(c),ia.trigger(c),a.isFunction(d)&&d.call(Q)}function m(){var a,b,c,d,e,f=aa+"Slideshow_",g="click."+aa;L.slideshow&&z[1]?(b=function(){clearTimeout(a)},c=function(){(L.loop||z[R+1])&&(a=setTimeout(X.next,L.slideshowSpeed))},d=function(){G.html(L.slideshowStop).unbind(g).one(g,e),ia.bind(ea,c).bind(da,b).bind(fa,e),s.removeClass(f+"off").addClass(f+"on")},e=function(){b(),ia.unbind(ea,c).unbind(da,b).unbind(fa,e),G.html(L.slideshowStart).unbind(g).one(g,function(){X.next(),d()}),s.removeClass(f+"on").addClass(f+"off")},L.slideshowAuto?d():e()):s.removeClass(f+"off "+f+"on")}function n(c){V||(Q=c,k(),z=a(Q),R=0,"nofollow"!==L.rel&&(z=a("."+ba).filter(function(){var b,c=a.data(this,_);return c&&(b=a(this).data("rel")||c.rel||this.rel),b===L.rel}),R=z.index(Q),-1===R&&(z=z.add(Q),R=z.length-1)),r.css({opacity:parseFloat(L.opacity),cursor:L.overlayClose?"pointer":"auto",visibility:"visible"}).show(),Y&&s.add(r).removeClass(Y),L.className&&s.add(r).addClass(L.className),Y=L.className,J.html(L.close).show(),T||(T=U=!0,s.css({visibility:"hidden",display:"block"}),B=d(ja,"LoadedContent","width:0; height:0; overflow:hidden").appendTo(u),M=v.height()+y.height()+u.outerHeight(!0)-u.height(),N=w.width()+x.width()+u.outerWidth(!0)-u.width(),O=B.outerHeight(!0),P=B.outerWidth(!0),L.w=g(L.initialWidth,"x"),L.h=g(L.initialHeight,"y"),X.position(),m(),l(ca,L.onOpen),K.add(E).hide(),s.focus(),b.addEventListener&&(b.addEventListener("focus",j,!0),ia.one(ga,function(){b.removeEventListener("focus",j,!0)})),L.returnFocus&&ia.one(ga,function(){a(Q).focus()})),q())}function o(){!s&&b.body&&(Z=!1,A=a(c),s=d(ja).attr({id:_,"class":a.support.opacity===!1?aa+"IE":"",role:"dialog",tabindex:"-1"}).hide(),r=d(ja,"Overlay").hide(),D=d(ja,"LoadingOverlay").add(d(ja,"LoadingGraphic")),t=d(ja,"Wrapper"),u=d(ja,"Content").append(E=d(ja,"Title"),F=d(ja,"Current"),I=a('').attr({id:aa+"Previous"}),H=a('').attr({id:aa+"Next"}),G=d("button","Slideshow"),D,J=a('').attr({id:aa+"Close"})),t.append(d(ja).append(d(ja,"TopLeft"),v=d(ja,"TopCenter"),d(ja,"TopRight")),d(ja,!1,"clear:left").append(w=d(ja,"MiddleLeft"),u,x=d(ja,"MiddleRight")),d(ja,!1,"clear:left").append(d(ja,"BottomLeft"),y=d(ja,"BottomCenter"),d(ja,"BottomRight"))).find("div div").css({"float":"left"}),C=d(ja,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),K=H.add(I).add(F).add(G),a(b.body).append(r,s.append(t,C)))}function p(){function c(a){a.which>1||a.shiftKey||a.altKey||a.metaKey||a.control||(a.preventDefault(),n(this))}return s?(Z||(Z=!0,H.click(function(){X.next()}),I.click(function(){X.prev()}),J.click(function(){X.close()}),r.click(function(){L.overlayClose&&X.close()}),a(b).bind("keydown."+aa,function(a){var b=a.keyCode;T&&L.escKey&&27===b&&(a.preventDefault(),X.close()),T&&L.arrowKey&&z[1]&&!a.altKey&&(37===b?(a.preventDefault(),I.click()):39===b&&(a.preventDefault(),H.click()))}),a.isFunction(a.fn.on)?a(b).on("click."+aa,"."+ba,c):a("."+ba).live("click."+aa,c)),!0):!1}function q(){var b,e,f,j=X.prep,m=++ka;U=!0,S=!1,Q=z[R],k(),l(ha),l(da,L.onLoad),L.h=L.height?g(L.height,"y")-O-M:L.innerHeight&&g(L.innerHeight,"y"),L.w=L.width?g(L.width,"x")-P-N:L.innerWidth&&g(L.innerWidth,"x"),L.mw=L.w,L.mh=L.h,L.maxWidth&&(L.mw=g(L.maxWidth,"x")-P-N,L.mw=L.w&&L.w1&&(S.height=S.height/c.devicePixelRatio,S.width=S.width/c.devicePixelRatio),L.scalePhotos&&(e=function(){S.height-=S.height*b,S.width-=S.width*b},L.mw&&S.width>L.mw&&(b=(S.width-L.mw)/S.width,e()),L.mh&&S.height>L.mh&&(b=(S.height-L.mh)/S.height,e())),L.h&&(S.style.marginTop=Math.max(L.mh-S.height,0)/2+"px"),z[1]&&(L.loop||z[R+1])&&(S.style.cursor="pointer",S.onclick=function(){X.next()}),S.style.width=S.width+"px",S.style.height=S.height+"px",setTimeout(function(){j(S)},1))}),setTimeout(function(){S.src=b},1)):b&&C.load(b,L.data,function(b,c){m===ka&&j("error"===c?d(ja,"Error").html(L.xhrError):a(this).contents())})}var r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$={transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,className:!1,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",open:!1,returnFocus:!0,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp)((#|\?).*)?$/i,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0},_="colorbox",aa="cbox",ba=aa+"Element",ca=aa+"_open",da=aa+"_load",ea=aa+"_complete",fa=aa+"_cleanup",ga=aa+"_closed",ha=aa+"_purge",ia=a(""),ja="div",ka=0;a.colorbox||(a(o),X=a.fn[_]=a[_]=function(b,c){var d=this;if(b=b||{},o(),p()){if(a.isFunction(d))d=a(""),b.open=!0;else if(!d[0])return d;c&&(b.onComplete=c),d.each(function(){a.data(this,_,a.extend({},a.data(this,_)||$,b))}).addClass(ba),(a.isFunction(b.open)&&b.open.call(d)||b.open)&&n(d[0])}return d},X.position=function(a,b){function c(a){v[0].style.width=y[0].style.width=u[0].style.width=parseInt(a.style.width,10)-N+"px",u[0].style.height=w[0].style.height=x[0].style.height=parseInt(a.style.height,10)-M+"px"}var d,f,h,i=0,j=0,k=s.offset();A.unbind("resize."+aa),s.css({top:-9e4,left:-9e4}),f=A.scrollTop(),h=A.scrollLeft(),L.fixed?(k.top-=f,k.left-=h,s.css({position:"fixed"})):(i=f,j=h,s.css({position:"absolute"})),j+=L.right!==!1?Math.max(A.width()-L.w-P-N-g(L.right,"x"),0):L.left!==!1?g(L.left,"x"):Math.round(Math.max(A.width()-L.w-P-N,0)/2),i+=L.bottom!==!1?Math.max(e()-L.h-O-M-g(L.bottom,"y"),0):L.top!==!1?g(L.top,"y"):Math.round(Math.max(e()-L.h-O-M,0)/2),s.css({top:k.top,left:k.left,visibility:"visible"}),a=s.width()===L.w+P&&s.height()===L.h+O?0:a||0,t[0].style.width=t[0].style.height="9999px",d={width:L.w+P+N,height:L.h+O+M,top:i,left:j},0===a&&s.css(d),s.dequeue().animate(d,{duration:a,complete:function(){c(this),U=!1,t[0].style.width=L.w+P+N+"px",t[0].style.height=L.h+O+M+"px",L.reposition&&setTimeout(function(){A.bind("resize."+aa,X.position)},1),b&&b()},step:function(){c(this)}})},X.resize=function(a){T&&(a=a||{},a.width&&(L.w=g(a.width,"x")-P-N),a.innerWidth&&(L.w=g(a.innerWidth,"x")),B.css({width:L.w}),a.height&&(L.h=g(a.height,"y")-O-M),a.innerHeight&&(L.h=g(a.innerHeight,"y")),a.innerHeight||a.height||(B.css({height:"auto"}),L.h=B.height()),B.css({height:L.h}),X.position("none"===L.transition?0:L.speed))},X.prep=function(b){function c(){return L.w=L.w||B.width(),L.w=L.mw&&L.mw1?("string"==typeof L.current&&F.html(L.current.replace("{current}",R+1).replace("{total}",g)).show(),H[L.loop||g-1>R?"show":"hide"]().html(L.next),I[L.loop||R?"show":"hide"]().html(L.previous),L.slideshow&&G.show(),L.preloading&&a.each([f(-1),f(1)],function(){var b,c,d=z[this],e=a.data(d,_);e&&e.href?(b=e.href,a.isFunction(b)&&(b=b.call(d))):b=a(d).attr("href"),b&&h(e,b)&&(b=i(e,b),c=new Image,c.src=b)})):K.hide(),L.iframe?(c=d("iframe")[0],k in c&&(c[k]=0),m in c&&(c[m]="true"),L.scrolling||(c.scrolling="no"),a(c).attr({src:L.href,name:(new Date).getTime(),"class":aa+"Iframe",allowFullScreen:!0,webkitAllowFullScreen:!0,mozallowfullscreen:!0}).one("load",e).appendTo(B),ia.one(ha,function(){c.src="//about:blank"}),L.fastIframe&&a(c).trigger("load")):e(),"fade"===L.transition?s.fadeTo(j,1,b):b())},"fade"===L.transition?s.fadeTo(j,0,function(){X.position(0,g)}):X.position(j,g)}},X.next=function(){!U&&z[1]&&(L.loop||z[R+1])&&(R=f(1),n(z[R]))},X.prev=function(){!U&&z[1]&&(L.loop||R)&&(R=f(-1),n(z[R]))},X.close=function(){T&&!V&&(V=!0,T=!1,l(fa,L.onCleanup),A.unbind("."+aa),r.fadeTo(L.fadeOut||0,0),s.stop().fadeTo(L.fadeOut||0,0,function(){s.add(r).css({opacity:1,cursor:"auto"}).hide(),l(ha),B.empty().remove(),setTimeout(function(){V=!1,l(ga,L.onClosed)},1)}))},X.remove=function(){s&&(s.stop(),a.colorbox.close(),s.stop().remove(),r.remove(),V=!1,s=null,a("."+ba).removeData(_).removeClass(ba),a(b).unbind("click."+aa))},X.element=function(){return a(Q)},X.settings=$)}(jQuery,document,window),/**
* jQuery MD5 hash algorithm function
*
*
* Calculate the md5 hash of a String
* String $.md5 ( String str )
*
*
* Calculates the MD5 hash of str using the » RSA Data Security, Inc. MD5 Message-Digest Algorithm, and returns that hash.
* MD5 (Message-Digest algorithm 5) is a widely-used cryptographic hash function with a 128-bit hash value. MD5 has been employed in a wide variety of security applications, and is also commonly used to check the integrity of data. The generated hash is also non-reversable. Data cannot be retrieved from the message digest, the digest uniquely identifies the data.
* MD5 was developed by Professor Ronald L. Rivest in 1994. Its 128 bit (16 byte) message digest makes it a faster implementation than SHA-1.
* This script is used to process a variable length message into a fixed-length output of 128 bits using the MD5 algorithm. It is fully compatible with UTF-8 encoding. It is very useful when u want to transfer encrypted passwords over the internet. If you plan using UTF-8 encoding in your project don't forget to set the page encoding to UTF-8 (Content-Type meta tag).
* This function orginally get from the WebToolkit and rewrite for using as the jQuery plugin.
*
* Example
* Code
*
* $.md5("I'm Persian.");
*
* Result
*
* "b8c901d0f02223f9761016cfff9d68df"
*
*
* @alias Muhammad Hussein Fattahizadeh < muhammad [AT] semnanweb [DOT] com >
* @link http://www.semnanweb.com/jquery-plugin/md5.html
* @see http://www.webtoolkit.info/
* @license http://www.gnu.org/licenses/gpl.html [GNU General Public License]
* @param {jQuery} {md5:function(string))
* @return string
*/
function(a){var b=function(a,b){return a<>>32-b},c=function(a,b){var c,d,e,f,g;return e=2147483648&a,f=2147483648&b,c=1073741824&a,d=1073741824&b,g=(1073741823&a)+(1073741823&b),c&d?2147483648^g^e^f:c|d?1073741824&g?3221225472^g^e^f:1073741824^g^e^f:g^e^f},d=function(a,b,c){return a&b|~a&c},e=function(a,b,c){return a&c|b&~c},f=function(a,b,c){return a^b^c},g=function(a,b,c){return b^(a|~c)},h=function(a,e,f,g,h,i,j){return a=c(a,c(c(d(e,f,g),h),j)),c(b(a,i),e)},i=function(a,d,f,g,h,i,j){return a=c(a,c(c(e(d,f,g),h),j)),c(b(a,i),d)},j=function(a,d,e,g,h,i,j){return a=c(a,c(c(f(d,e,g),h),j)),c(b(a,i),d)},k=function(a,d,e,f,h,i,j){return a=c(a,c(c(g(d,e,f),h),j)),c(b(a,i),d)},l=function(a){for(var b,c=a.length,d=c+8,e=(d-d%64)/64,f=16*(e+1),g=Array(f-1),h=0,i=0;c>i;)b=(i-i%4)/4,h=i%4*8,g[b]=g[b]|a.charCodeAt(i)<>>29,g},m=function(a){var b,c,d="",e="";for(c=0;3>=c;c++)b=a>>>8*c&255,e="0"+b.toString(16),d+=e.substr(e.length-2,2);return d},n=function(a){a=a.replace(/\x0d\x0a/g,"\n");for(var b="",c=0;cd?b+=String.fromCharCode(d):d>127&&2048>d?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b};a.extend({md5:function(a){var b,d,e,f,g,o,p,q,r,s=Array(),t=7,u=12,v=17,w=22,x=5,y=9,z=14,A=20,B=4,C=11,D=16,E=23,F=6,G=10,H=15,I=21;for(a=n(a),s=l(a),o=1732584193,p=4023233417,q=2562383102,r=271733878,b=0;b'+d.html()+"")),d.css({width:d.width()+parseInt(d.css("padding-left").replace("px",""))+parseInt(d.css("padding-right").replace("px","")),height:d.height()+parseInt(d.css("padding-top").replace("px",""))+parseInt(d.css("padding-bottom").replace("px",""))}),d.append(''),this.isLoading=!0,d.addClass(b).addClass(c).attr(c,c)):(this.isLoading=!1,d.removeClass(b).removeClass(c).removeAttr(c),d.find(".loading-spinner").remove(),d.data("label-created")===!0&&d.html(d.find("loading-label").html())))},this),0)};var d=a.fn.mikaButton;a.fn.mikaButton=b,a.fn.mikaButton.Constructor=c,a.fn.mikaButton.noConflict=function(){return a.fn.mikaButton=d,this}}(jQuery),/*!
* JavaScript Cookie v2.0.4
* https://github.com/js-cookie/js-cookie
*
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
* Released under the MIT license
*/
function(a){if("function"==typeof define&&define.amd)define(a);else if("object"==typeof exports)module.exports=a();else{var b=window.Cookies,c=window.Cookies=a();c.noConflict=function(){return window.Cookies=b,c}}}(function(){function a(){for(var a=0,b={};a1){if(f=a({path:"/"},d.defaults,f),"number"==typeof f.expires){var h=new Date;h.setMilliseconds(h.getMilliseconds()+864e5*f.expires),f.expires=h}try{g=JSON.stringify(e),/^[\{\[]/.test(g)&&(e=g)}catch(i){}return e=c.write?c.write(e,b):encodeURIComponent(String(e)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),b=encodeURIComponent(String(b)),b=b.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),b=b.replace(/[\(\)]/g,escape),document.cookie=[b,"=",e,f.expires&&"; expires="+f.expires.toUTCString(),f.path&&"; path="+f.path,f.domain&&"; domain="+f.domain,f.secure?"; secure":""].join("")}b||(g={});for(var j=document.cookie?document.cookie.split("; "):[],k=/(%[0-9A-Z]{2})+/g,l=0;lf)throw new Error("Minimum 2 arguments must be given");if(a.isArray(i)){d={};for(var j in i){c=i[j];try{d[c]=JSON.parse(g.getItem(c))}catch(k){d[c]=g.getItem(c)}}return d}if(2!=f){try{d=JSON.parse(g.getItem(i))}catch(k){throw new ReferenceError(i+" is not defined in this storage")}for(var j=2;f-1>j;j++)if(d=d[h[j]],void 0===d)throw new ReferenceError([].slice.call(h,1,j+1).join(".")+" is not defined in this storage");if(a.isArray(h[j])){e=d,d={};for(var l in h[j])d[h[j][l]]=e[h[j][l]];return d}return d[h[j]]}try{return JSON.parse(g.getItem(i))}catch(k){return g.getItem(i)}}function c(b){var c,d,e=arguments.length,f=window[b],g=arguments,h=g[1],i=g[2],j={};if(2>e||!a.isPlainObject(h)&&3>e)throw new Error("Minimum 3 arguments must be given or second parameter must be an object");if(a.isPlainObject(h)){for(var k in h)c=h[k],a.isPlainObject(c)?f.setItem(k,JSON.stringify(c)):f.setItem(k,c);return h}if(3==e)return"object"==typeof i?f.setItem(h,JSON.stringify(i)):f.setItem(h,i),i;try{d=f.getItem(h),null!=d&&(j=JSON.parse(d))}catch(l){}d=j;for(var k=2;e-2>k;k++)c=g[k],d[c]&&a.isPlainObject(d[c])||(d[c]={}),d=d[c];return d[g[k]]=g[k+1],f.setItem(h,JSON.stringify(j)),j}function d(b){var c,d,e=arguments.length,f=window[b],g=arguments,h=g[1];if(2>e)throw new Error("Minimum 2 arguments must be given");if(a.isArray(h)){for(var i in h)f.removeItem(h[i]);return!0}if(2==e)return f.removeItem(h),!0;try{c=d=JSON.parse(f.getItem(h))}catch(j){throw new ReferenceError(h+" is not defined in this storage")}for(var i=2;e-1>i;i++)if(d=d[g[i]],void 0===d)throw new ReferenceError([].slice.call(g,1,i).join(".")+" is not defined in this storage");if(a.isArray(g[i]))for(var k in g[i])delete d[g[i][k]];else delete d[g[i]];return f.setItem(h,JSON.stringify(c)),!0}function e(b,c){var e=h(b);for(var f in e)d(b,e[f]);if(c)for(var f in a.namespaceStorages)i(f)}function f(c){var d=arguments.length,e=arguments,g=(window[c],e[1]);if(1==d)return 0==h(c).length;if(a.isArray(g)){for(var i=0;id)throw new Error("Minimum 2 arguments must be given");if(a.isArray(f)){for(var h=0;h1?b.apply(this,e):d,g&&g._cookie)for(var h in Cookies.get())""!=h&&f.push(h.replace(g._prefix,""));else for(var i in g)f.push(i);return f}function i(b){if(!b||"string"!=typeof b)throw new Error("First parameter must be a string");m?(window.localStorage.getItem(b)||window.localStorage.setItem(b,"{}"),window.sessionStorage.getItem(b)||window.sessionStorage.setItem(b,"{}")):(window.localCookieStorage.getItem(b)||window.localCookieStorage.setItem(b,"{}"),window.sessionCookieStorage.getItem(b)||window.sessionCookieStorage.setItem(b,"{}"));var c={localStorage:a.extend({},a.localStorage,{_ns:b}),sessionStorage:a.extend({},a.sessionStorage,{_ns:b})};return Cookies&&(window.cookieStorage.getItem(b)||window.cookieStorage.setItem(b,"{}"),c.cookieStorage=a.extend({},a.cookieStorage,{_ns:b})),a.namespaceStorages[b]=c,c}function j(a){var b="jsapi";try{return window[a]?(window[a].setItem(b,b),window[a].removeItem(b),!0):!1}catch(c){return!1}}var k="ls_",l="ss_",m=j("localStorage"),n={_type:"",_ns:"",_callMethod:function(a,b){var c=[this._type],b=Array.prototype.slice.call(b),d=b[0];return this._ns&&c.push(this._ns),"string"==typeof d&&-1!==d.indexOf(".")&&(b.shift(),[].unshift.apply(b,d.split("."))),[].push.apply(c,b),a.apply(this,c)},get:function(){return this._callMethod(b,arguments)},set:function(){var b=arguments.length,d=arguments,e=d[0];if(1>b||!a.isPlainObject(e)&&2>b)throw new Error("Minimum 2 arguments must be given or first parameter must be an object");if(a.isPlainObject(e)&&this._ns){for(var f in e)c(this._type,this._ns,f,e[f]);return e}var g=this._callMethod(c,d);return this._ns?g[e.split(".")[0]]:g},remove:function(){if(arguments.length<1)throw new Error("Minimum 1 argument must be given");return this._callMethod(d,arguments)},removeAll:function(a){return this._ns?(c(this._type,this._ns,{}),!0):e(this._type,a)},isEmpty:function(){return this._callMethod(f,arguments)},isSet:function(){if(arguments.length<1)throw new Error("Minimum 1 argument must be given");return this._callMethod(g,arguments)},keys:function(){return this._callMethod(h,arguments)}};if(Cookies){window.name||(window.name=Math.floor(1e8*Math.random()));var o={_cookie:!0,_prefix:"",_expires:null,_path:null,_domain:null,setItem:function(a,b){Cookies.set(this._prefix+a,b,{expires:this._expires,path:this._path,domain:this._domain})},getItem:function(a){return Cookies.get(this._prefix+a)},removeItem:function(a){return Cookies.remove(this._prefix+a)},clear:function(){for(var b in Cookies())""!=b&&(!this._prefix&&-1===b.indexOf(k)&&-1===b.indexOf(l)||this._prefix&&0===b.indexOf(this._prefix))&&a.removeCookie(b)},setExpires:function(a){return this._expires=a,this},setPath:function(a){return this._path=a,this},setDomain:function(a){return this._domain=a,this},setConf:function(a){return a.path&&(this._path=a.path),a.domain&&(this._domain=a.domain),a.expires&&(this._expires=a.expires),this},setDefaultConf:function(){this._path=this._domain=this._expires=null}};m||(window.localCookieStorage=a.extend({},o,{_prefix:k,_expires:3650}),window.sessionCookieStorage=a.extend({},o,{_prefix:l+window.name+"_"})),window.cookieStorage=a.extend({},o),a.cookieStorage=a.extend({},n,{_type:"cookieStorage",setExpires:function(a){return window.cookieStorage.setExpires(a),this},setPath:function(a){return window.cookieStorage.setPath(a),this},setDomain:function(a){return window.cookieStorage.setDomain(a),this},setConf:function(a){return window.cookieStorage.setConf(a),this},setDefaultConf:function(){return window.cookieStorage.setDefaultConf(),this}})}a.initNamespaceStorage=function(a){return i(a)},m?(a.localStorage=a.extend({},n,{_type:"localStorage"}),a.sessionStorage=a.extend({},n,{_type:"sessionStorage"})):(a.localStorage=a.extend({},n,{_type:"localCookieStorage"}),a.sessionStorage=a.extend({},n,{_type:"sessionCookieStorage"})),a.namespaceStorages={},a.removeAllStorages=function(b){a.localStorage.removeAll(b),a.sessionStorage.removeAll(b),a.cookieStorage&&a.cookieStorage.removeAll(b),b||(a.namespaceStorages={})}}),"object"==typeof google&&(inherits(MarkerLabel_,google.maps.OverlayView),MarkerLabel_.getSharedCross=function(a){var b;return"undefined"==typeof MarkerLabel_.getSharedCross.crossDiv&&(b=document.createElement("img"),b.style.cssText="position: absolute; z-index: 1000002; display: none;",b.style.marginLeft="-8px",b.style.marginTop="-9px",b.src=a,MarkerLabel_.getSharedCross.crossDiv=b),MarkerLabel_.getSharedCross.crossDiv},MarkerLabel_.prototype.onAdd=function(){var a,b,c,d,e,f,g,h=this,i=!1,j=!1,k=20,l="url("+this.handCursorURL_+")",m=function(a){a.preventDefault&&a.preventDefault(),a.cancelBubble=!0,a.stopPropagation&&a.stopPropagation()},n=function(){h.marker_.setAnimation(null)};this.getPanes().markerLayer.appendChild(this.labelDiv_),this.getPanes().overlayMouseTarget.appendChild(this.eventDiv_),"undefined"==typeof MarkerLabel_.getSharedCross.processed&&(this.getPanes().overlayImage.appendChild(this.crossDiv_),MarkerLabel_.getSharedCross.processed=!0),this.listeners_=[google.maps.event.addDomListener(this.eventDiv_,"mouseover",function(a){(h.marker_.getDraggable()||h.marker_.getClickable())&&(this.style.cursor="pointer",google.maps.event.trigger(h.marker_,"mouseover",a))}),google.maps.event.addDomListener(this.eventDiv_,"mouseout",function(a){!h.marker_.getDraggable()&&!h.marker_.getClickable()||j||(this.style.cursor=h.marker_.getCursor(),google.maps.event.trigger(h.marker_,"mouseout",a))}),google.maps.event.addDomListener(this.eventDiv_,"mousedown",function(a){j=!1,h.marker_.getDraggable()&&(i=!0,this.style.cursor=l),(h.marker_.getDraggable()||h.marker_.getClickable())&&(google.maps.event.trigger(h.marker_,"mousedown",a),m(a))}),google.maps.event.addDomListener(document,"mouseup",function(b){var c;if(i&&(i=!1,h.eventDiv_.style.cursor="pointer",google.maps.event.trigger(h.marker_,"mouseup",b)),j){if(e){c=h.getProjection().fromLatLngToDivPixel(h.marker_.getPosition()),c.y+=k,h.marker_.setPosition(h.getProjection().fromDivPixelToLatLng(c));try{h.marker_.setAnimation(google.maps.Animation.BOUNCE),setTimeout(n,1406)}catch(f){}}h.crossDiv_.style.display="none",h.marker_.setZIndex(a),d=!0,j=!1,b.latLng=h.marker_.getPosition(),google.maps.event.trigger(h.marker_,"dragend",b)}}),google.maps.event.addListener(h.marker_.getMap(),"mousemove",function(d){var l;i&&(j?(d.latLng=new google.maps.LatLng(d.latLng.lat()-b,d.latLng.lng()-c),l=h.getProjection().fromLatLngToDivPixel(d.latLng),e&&(h.crossDiv_.style.left=l.x+"px",h.crossDiv_.style.top=l.y+"px",h.crossDiv_.style.display="",l.y-=k),h.marker_.setPosition(h.getProjection().fromDivPixelToLatLng(l)),e&&(h.eventDiv_.style.top=l.y+k+"px"),google.maps.event.trigger(h.marker_,"drag",d)):(b=d.latLng.lat()-h.marker_.getPosition().lat(),c=d.latLng.lng()-h.marker_.getPosition().lng(),a=h.marker_.getZIndex(),f=h.marker_.getPosition(),g=h.marker_.getMap().getCenter(),e=h.marker_.get("raiseOnDrag"),j=!0,h.marker_.setZIndex(1e6),d.latLng=h.marker_.getPosition(),google.maps.event.trigger(h.marker_,"dragstart",d)))}),google.maps.event.addDomListener(document,"keydown",function(a){j&&27===a.keyCode&&(e=!1,h.marker_.setPosition(f),h.marker_.getMap().setCenter(g),google.maps.event.trigger(document,"mouseup",a))}),google.maps.event.addDomListener(this.eventDiv_,"click",function(a){(h.marker_.getDraggable()||h.marker_.getClickable())&&(d?d=!1:(google.maps.event.trigger(h.marker_,"click",a),m(a)))}),google.maps.event.addDomListener(this.eventDiv_,"dblclick",function(a){(h.marker_.getDraggable()||h.marker_.getClickable())&&(google.maps.event.trigger(h.marker_,"dblclick",a),m(a))}),google.maps.event.addListener(this.marker_,"dragstart",function(a){j||(e=this.get("raiseOnDrag"))}),google.maps.event.addListener(this.marker_,"drag",function(a){j||e&&(h.setPosition(k),h.labelDiv_.style.zIndex=1e6+(this.get("labelInBackground")?-1:1))}),google.maps.event.addListener(this.marker_,"dragend",function(a){j||e&&h.setPosition(0)}),google.maps.event.addListener(this.marker_,"position_changed",function(){h.setPosition()}),google.maps.event.addListener(this.marker_,"zindex_changed",function(){h.setZIndex()}),google.maps.event.addListener(this.marker_,"visible_changed",function(){h.setVisible()}),google.maps.event.addListener(this.marker_,"labelvisible_changed",function(){h.setVisible()}),google.maps.event.addListener(this.marker_,"title_changed",function(){h.setTitle()}),google.maps.event.addListener(this.marker_,"labelcontent_changed",function(){h.setContent()}),google.maps.event.addListener(this.marker_,"labelanchor_changed",function(){h.setAnchor()}),google.maps.event.addListener(this.marker_,"labelclass_changed",function(){h.setStyles()}),google.maps.event.addListener(this.marker_,"labelstyle_changed",function(){h.setStyles()})]},MarkerLabel_.prototype.onRemove=function(){var a;for(this.labelDiv_.parentNode.removeChild(this.labelDiv_),this.eventDiv_.parentNode.removeChild(this.eventDiv_),a=0;aa?(a=-1*a,b="-"):b="",f=Math.ceil(a/1e3),e=f/60,d=e/60,c=d/24,e>=1?(e=Math.floor(e),f-=60*e):e=0,d>=1?(d=Math.floor(d),e-=60*d):d=0,c>=1?(c=Math.floor(c),d-=24*c):c=0,10>d&&(d="0"+d),10>e&&(e="0"+e),10>f&&(f="0"+f),c?b+c+d+":"+e+":"+f:b+d+":"+e+":"+f},load:function(){this.log("load...","info"),this.log(this.options_submit,"debug"),this.options_submit.lang=this.options.lang,this.options_submit.pid=this.options.pid,this.options_submit.client_seconds=this.getClientSeconds(),this.options.event_default&&!this.options_submit.option_bar.event&&(this.options_submit.option_bar.event=this.options.event_default),this.options.addFavorite&&-1==this.favorites.indexOf(this.options.addFavorite)&&(this.favorites.push(this.options.addFavorite),this.options_submit.command={name:"addFavorite",id:this.options.addFavorite});var a=this.options.globalObjectName;this.makeRequest("getLeaderboard",this.options_submit,function(b){window[a].setData(b)})},addToRenderQueue:function(a){-1==this.renderQueue.indexOf(a)&&this.renderQueue.push(a)},clearRenderQueue:function(){this.renderQueue=[]},registerEvents:function(){var a;for(var b in this.eventsDelete)if(this.eventsDelete.hasOwnProperty(b))for(a in this.eventsDelete[b])this.eventsDelete[b].hasOwnProperty(a)&&jQuery(this.eventsDelete[b][a].selector).off(b);for(var b in this.events)if(this.events.hasOwnProperty(b)){if("click"==b)for(a in this.events[b])this.events[b].hasOwnProperty(a)&&("undefined"!=typeof this.events[b][a].data?jQuery(this.events[b][a].selector).click(this.events[b][a].data,this.events[b][a].func):jQuery(this.events[b][a].selector).click(this.events[b][a].func));if("mouseover"==b)for(a in this.events[b])this.events[b].hasOwnProperty(a)&&jQuery(this.events[b][a].selector).mouseover(this.events[b][a].func);if("mouseout"==b)for(a in this.events[b])this.events[b].hasOwnProperty(a)&&jQuery(this.events[b][a].selector).mouseout(this.events[b][a].func)}if(this.events.click=[],this.events.mouseover=[],this.events.mouseout=[],this.eventsDelete.click=[],this.eventsDelete.mouseover=[],this.eventsDelete.mouseout=[],this.data.global.options.shortcuts&&!this.shortcuts_registred){var c=this.options.globalObjectName;jQuery(document).keyup(function(a){16===a.keyCode&&(window[c].shift_pressed=!1),17===a.keyCode&&(window[c].ctrl_pressed=!1)}),jQuery(document).keydown(function(a){16===a.keyCode&&(window[c].shift_pressed=!0),17===a.keyCode&&(window[c].ctrl_pressed=!0),72===a.keyCode&&(window[c].shift_pressed?window[c].trigger("switchControlsExtended",{}):window[c].trigger("switchControls",{})),"88"===a.keyCode&&window[c].trigger("switchFullscreen")}),this.shortcuts_registred=!0}},setData:function(a){this.log("function: setData","info");var b,c=!1;"undefined"==typeof this.data.settings&&(c=!0);var d=!1;if("object"==typeof this.data.settings&&this.data.settings.global_event&&this.data.settings.global_event!=a.settings.global_event&&(d=!0),this.data.settings=a.settings,this.data.lastUpdateTs=a.lastUpdateTs,"undefined"!=typeof a.settings.time_offset&&"function"==typeof require&&require(["Mika/Timer"],function(a){}),this.options_submit.command={},a.settings.favorites){this.favorites=[];for(b in a.settings.favorites)a.settings.favorites.hasOwnProperty(b)&&this.favorites.push(a.settings.favorites[b])}"undefined"==typeof this.data.global&&(this.data.global={},this.data.global.meta={},this.options_submit.globalData={});for(b in a.globalData)a.globalData.hasOwnProperty(b)&&("ok"==a.globalData[b].state?(this.data.global[b]=a.globalData[b].data,this.data.global.meta[b]={},this.data.global.meta[b].state=a.globalData[b].state,this.data.global.meta[b].hash=a.globalData[b].hash):"nothing_changed"==a.globalData[b].state&&(this.data.global.meta[b].state="nothing_changed"),this.options_submit.globalData[b]={},this.options_submit.globalData[b].hash=a.globalData[b].hash);for(b in this.data.global)this.data.global.hasOwnProperty(b)&&"meta"!=b&&"undefined"==typeof a.globalData[b]&&delete this.data.global[b];if(c||"object"!=typeof this.data.containers)this.data.containers=a.containers;else{for(b in a.containers)if(a.containers.hasOwnProperty(b))if("ok"==a.containers[b].state){if(this.data.containers[b]=a.containers[b],!d)switch(a.containers[b].type){case"favorites":this.addToRenderQueue("favorites"),this.addToRenderQueue("list");break;case"list":this.addToRenderQueue("list");break;case"map":this.addToRenderQueue("map");break;case"overlays":this.addToRenderQueue("overlays")}}else"nothing_changed"==a.containers[b].state&&(this.data.containers[b].state="nothing_changed");for(b in this.data.containers)this.data.containers.hasOwnProperty(b)&&"undefined"==typeof a.containers[b]&&delete this.data.containers[b];d||this.renderFromQueue()}this.options_submit.containers={};for(b in this.data.containers)this.data.containers.hasOwnProperty(b)&&(this.options_submit.containers[b]={},this.options_submit.containers[b].hash=this.data.containers[b].hash);this.strings=this.data.global.strings,jQuery(".resultsboard-"+this.options.globalObjectName+" .lb-containers").length?(d&&(this.clearCols(),this.renderContainers()),"nothing_changed"!=this.data.global.meta.global_option_bar.state&&this.renderOptionBar(!0)):this.render(),this.refresh(),this.data.global.options.replay_mode&&this.mapInitSliders(),this.data.global.options.refresh&&(window.clearTimeout(this.timer.load),this.timer.load=window.setTimeout(this.options.globalObjectName+".load()",1e3*this.data.global.options.refresh)),"jqm"==this.options.theme&&(jQuery(".lb-containers").trigger("create"),applySizes()),c||"undefined"!=typeof this.data.global.global_option_bar.options.show_last_update&&this.data.global.global_option_bar.options.show_last_update===!0&&("undefined"!=typeof this.data.global.global_option_bar.options.last_update_count_up&&this.data.global.global_option_bar.options.last_update_count_up===!0?jQuery(".resultsboard-"+this.options.globalObjectName+' [data-type="lastupdatetimestamp"]').html(''):jQuery(".resultsboard-"+this.options.globalObjectName+' [data-type="lastupdatetimestamp"]').html(this.formatTime(new Date))),MikaResultsRenderTrigger()},formatTime:function(a){var b=a.getHours(),c=a.getMinutes(),d=a.getSeconds();return 10>c&&(c="0"+c),10>d&&(d="0"+d),b+":"+c+":"+d},microtime:function(){return(new Date).getTime()},getClientSeconds:function(){var a=new Date,b=3600*a.getHours();return b+=60*a.getMinutes(),b+=a.getSeconds()},refresh:function(){this.log("function: refresh","info",!0),this.refresh_counter||(this.refresh_counter=0),this.refresh_counter++;var a,b,c,d,e,f,g=0,h=0,i=0,j=this.getContainerByType("favorites");if(j.data){var k={},l={},m={},n={},o=0,p=0;for(var q in j.data.rows)if(j.data.rows.hasOwnProperty(q)){var r=j.data.rows[q];r.split_groups[r.global_info.active_group_key];"undefined"==typeof r.is_in_replay&&("F"==r.global_info.race_status&&this.data.global.options.replay_mode?r.is_in_replay=!0:r.is_in_replay=!1),b=!1,c=!1,z=!1,r.starttime_net_ms&&(r.starttime_net_ms=parseInt(r.starttime_net_ms),o||(o=r.starttime_net_ms),o=Math.min(o,r.starttime_net_ms));for(a in r.splits)r.splits.hasOwnProperty(a)&&(d=r.splits[a],r.is_in_replay?(p=this.data.global.options.replay_daytime?r.starttime_net_ms-o:0,this.replay_time&&d.time_ms&&d.time_ms+p<=this.replay_time&&(b=d,"undefined"!=typeof r.splits[parseInt(a)+1]?c=r.splits[parseInt(a)+1]:(c=b,z=!0)),d.time_ms&&(this.data.global.options.replay_daytime?this.replay_time_max=Math.max(this.replay_time_max,d.time_ms+p):this.replay_time_max=Math.max(this.replay_time_max,d.time_ms))):d.time_ms&&"-"!=d.time_ms&&(b=d,c=!1));if(!b&&r.is_in_replay){for(a in r.splits)if(r.splits.hasOwnProperty(a)){c=r.splits[a];break}b=c}if(c){for(e in r.split_groups)if(r.split_groups.hasOwnProperty(e))if(e==b.group)if("undefined"==typeof l[e]&&(l[e]={}),"undefined"==typeof k[e]&&(k[e]={}),r.is_in_replay&&this.data.global.options.replay_mode){r.split_groups[e].active=!0,r.global_info.active_group_key=e,h=0,this.data.global.options.replay_daytime?(i=(this.replay_time-p-b.time_ms)/c.ms_km_estimate,i+=b.km-r.split_groups[e].first_km):(i=(this.replay_time-b.time_ms)/c.ms_km_estimate,i+=b.km-r.split_groups[e].first_km),(isNaN(i)||0>i)&&(i=0),r.split_groups[e].estimated_pos=i;var s=this.replay_time-p;s>0&&!z?r.race_time=this.ms2time(s):z?r.race_time=b.time:r.race_time="00:00:00",r.split_groups[e].estimated_pos_string=i.toFixed(2),l[e][r.id]=i,r.split_groups[e].state="started",z&&(r.split_groups[e].estimated_pos="finished",r.split_groups[e].state="finished")}else isNaN(r.split_groups[e].estimated_pos)?k[e][r.id]=0:k[e][r.id]=r.split_groups[e].estimated_pos;else r.is_in_replay&&this.data.global.options.replay_mode&&(r.split_groups[e].active=!1)}else{if(!b)for(e in r.split_groups)if(r.split_groups.hasOwnProperty(e)){"S"==r.global_info.race_status?(r.split_groups[e].estimated_pos="not_started",r.split_groups[e].estimated_pos_string="not_started"):(r.split_groups[e].estimated_pos="started",r.split_groups[e].estimated_pos_string="started");break}var t=1e3*(this.getClientSeconds()+this.data.settings.time_offset),u=t-r.position_data.daytime_last_change,v=r.position_data.speed_kmh/3.6,w=u/1e3*v,x=1e3*r.position_data.pos_km+w,y=(x/1e3).toFixed(2);y=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 a="";return a+="fixed"!=jQuery(".cbox.left .list").css("position")?'
'),"undefined"!=typeof this.data.global.global_option_bar&&(a+=this.renderOptionBar());for(var b in this.data.global.options.cols)this.data.global.options.cols.hasOwnProperty(b)&&(a+='');return"jqm"==this.options.theme&&(a+="
"),a+="
",a+='"},clearCols:function(){jQuery(".lb-col").html("")},trigger:function(a,b){var c;switch(this.log("Trigger: "+a,"info"),a){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":b.key&&b.container&&(this.subSelectorState[b.container]=b.key,this.options.autoFollow=!1,this.renderContainers(b.container),jQuery(".resultsboard-"+this.options.globalObjectName+" .list-option-buttons").html(this.renderMainButtons()));break;case"autoFollow":b?(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":b?this.data.global.options.show_details=!0:this.data.global.options.show_details=!1,this.addToRenderQueue("favorites"),this.renderFromQueue();break;case"openFavoriteDetails":this.openFavoriteDetails(b.id_favorite,b);break;case"closeFavoriteDetails":this.closeFavoriteDetails(b.id_favorite,b);break;case"addFavorite":"none"!=this.data.global.options.favorites_mode&&-1==this.favorites.indexOf(b.id)&&(this.favorites.push(b.id),this.options_submit.command={name:"addFavorite",id:b.id},this.addToRenderQueue("list"),this.addToRenderQueue("map"),this.load());break;case"removeFavorite":if("none"!=this.data.global.options.favorites_mode){c=[];var d=this.favorites.indexOf(b.id);if(-1!=d){for(g in this.favorites)this.favorites.hasOwnProperty(g)&&this.favorites[g]!=b.id&&c.push(this.favorites[g]);this.favorites=c,this.options_submit.command={name:"removeFavorite",id:b.id},this.addToRenderQueue("list"),this.addToRenderQueue("map"),this.load()}}break;case"clearFavorites":this.favorites=[],this.options_submit.command={name:"clearFavorites",id:b.id},this.load(),this.renderContainers();break;case"selectFavoriteToggle":var d=this.favorites.indexOf(b.id);-1!=d&&(-1!=this.favoritesSelected.indexOf(b.id)?this.trigger("deselectFavorite",{id:b.id}):this.trigger("selectFavorite",{id:b.id}));break;case"selectFavorite":var d=this.favorites.indexOf(b.id);-1!==d&&this.favoritesSelected.push(b.id);break;case"deselectFavorite":var d=this.favorites.indexOf(b.id);if(-1!==d){var e=this.favorites[d],c=[];for(g in this.favoritesSelected)this.favoritesSelected.hasOwnProperty(g)&&e!=this.favoritesSelected[g]&&c.push(this.favoritesSelected[g]);this.favoritesSelected=c}break;case"submitOptions":var c=[];jQuery(".resultsboard-"+this.options.globalObjectName+" form").each(function(a,b){"lb"==b.name&&(c=jQuery(this).serializeArray())});var f={};for(var g in c)c.hasOwnProperty(g)&&("field_"==c[g].name.substr(0,6)&&(f[c[g].name.substr(6)]=c[g].value),"option_"==c[g].name.substr(0,7)&&(f[c[g].name.substr(7)]=c[g].value));this.replay_time_max=0,this.replay_time=0,this.replay_speed=0,this.options_submit.option_bar=f,this.load();break;case"centerMap":this.mapAutoZoom=!1,this.mapCenter(b.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":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"));for(var g in this.data.containers)this.data.containers.hasOwnProperty(g)&&"map"==this.data.containers[g].type&&this.mapUpdate(g);break;case"switchOverlayMenu":var h=jQuery(".resultsboard-"+this.options.globalObjectName+" .overlayMenu");h.css({display:"block"});var i=h.position(),j=h.offset(),k=i.top+(b.top-j.top),l=i.left+(b.left-j.left);h.css({display:"block",left:l+"px",top:k+"px"});break;case"switchOverlay":if(-1!==this.mapOverlays.indexOf(b.overlayId)){var c=[];for(var g in this.mapOverlays)this.mapOverlays.hasOwnProperty(g)&&this.mapOverlays[g]!=b.overlayId&&c.push(this.mapOverlays[g]);this.mapOverlays=c,jQuery(".overlayMenu #overlayButton-"+b.overlayId).removeClass("active")}else this.mapOverlays.push(b.overlayId),jQuery(".overlayMenu #overlayButton-"+b.overlayId).addClass("active");window.setTimeout(this.options.globalObjectName+'.trigger("closeOverlayMenu")',350);break;case"closeOverlayMenu":var h=jQuery(".resultsboard-"+this.options.globalObjectName+" .overlayMenu");h.css({display:"none"});for(var g in this.data.containers)this.data.containers.hasOwnProperty(g)&&"map"==this.data.containers[g].type&&this.mapUpdateOverlays(g);break;case"openInfoWindow":var h=jQuery(".resultsboard-"+this.options.globalObjectName+" .mapInfoWindow");h.css({display:"block"});var i=h.position(),j=h.offset(),k=b.top,l=b.left;h.css({display:"block",left:l+"px",top:k+"px"}),h.html(b.html);break;case"closeInfoWindow":var h=jQuery(".resultsboard-"+this.options.globalObjectName+" .mapInfoWindow");h.css({display:"none"})}},render:function(){jQuery(this.targetElement).html(this.renderMain()),this.renderContainers()},renderFromQueue:function(){for(var a in this.renderQueue)if(this.renderQueue.hasOwnProperty(a))for(var b in this.data.containers)this.data.containers.hasOwnProperty(b)&&this.data.containers[b].type==this.renderQueue[a]&&this.renderContainers(b);this.clearRenderQueue()},renderContainers:function(a){for(var b in this.data.containers)if(this.data.containers.hasOwnProperty(b)&&!(a&&b!=a||"map"!=this.data.containers[b].type&&"favorites"!=this.data.containers[b].type&&"list"!=this.data.containers[b].type&&"overlays"!=this.data.containers[b].type)){if("nothing_changed"==this.data.containers[b].state,"overlays"!=this.data.containers[b].type)if(jQuery(".resultsboard-"+this.options.globalObjectName+" .lb-container.container-id-"+b).length)if("favorites"==this.data.containers[b].type){var c=jQuery(".favorite-boxes .favorite-wrap").length,d=0;if("undefined"!=typeof this.data.containers[b].data.rows)for(var e in this.data.containers[b].data.rows)d++;c!=d?jQuery(".resultsboard-"+this.options.globalObjectName+" .lb-container.container-id-"+b).html(this.renderContainer(b,!0)):this.updateContainerContentTypeFavorites(b)}else jQuery(".resultsboard-"+this.options.globalObjectName+" .lb-container.container-id-"+b).html(this.renderContainer(b,!0));else{var f=this.renderContainer(b,!1);jQuery(".resultsboard-"+this.options.globalObjectName+" .lb-col.col-id-"+this.data.containers[b].col).append(f)}if("map"==this.data.containers[b].type&&this.mapInit(b),"favorites"==this.data.containers[b].type)for(var g in this.data.containers)this.data.containers.hasOwnProperty(g)&&"map"==this.data.containers[g].type&&this.mapUpdate(g);if("overlays"==this.data.containers[b].type)for(var g in this.data.containers)this.data.containers.hasOwnProperty(g)&&"map"==this.data.containers[g].type&&this.mapUpdateOverlays(g)}var h="";for(var i in this.data.global.options.cols)this.data.global.options.cols.hasOwnProperty(i)&&(h+=".lb-col.col-id-"+this.data.global.options.cols[i].id,i+1'+this.data.settings.global_event_official_string+"
');var r=0;for(d in g.data.fields.data)g.data.fields.data.hasOwnProperty(d)&&r++;var s=0;for(d in g.data.fields.data)g.data.fields.data.hasOwnProperty(d)&&(c=g.data.fields.data[d],c.width||(c.width="auto"),i="",c["class"]&&(i+=c["class"]),s+1==r&&(i+=" last"),i&&(i=' class="'+i+'"'),h+="
'+c.name+"
",s++);h+="
"}if(b.length){switch(this.options.theme){case"jqm":break;default:var t=0;for("undefined"!=typeof g.data.options.num_results&&b.lengthd;d++)b.push({})}for(d in b)if(b.hasOwnProperty(d)){f=b[d],k="",l="",n=!1;var u=!1;for(e in f)if(f.hasOwnProperty(e)){u=!0;break}switch(d%2&&(k+=" list-highlight"),-1!=this.favorites.indexOf(f.id)&&"none"!=this.data.global.options.favorites_mode&&(k+=" favorite",n=!0),k=' class="'+k+'"',this.options.theme){case"jqm":if("undefined"==typeof f.id)h+="