var APP=function(){var k,g;return{getInstance:function(){k||(g=APP,0<$(".map-widget").length&&g.Map.init(),0<$(".media-widget").length&&g.Media.init(),(0<$("#mainPageCounter").length||0<$("#subPageCounter").length)&&g.Counter.init(),k=void 0);return k}}}(); APP.Map=function(){function k(){e.find(".map-markers").remove();var c=g.find('response > states state[value="'+(h+1)+'"]'),a=c.find("markers marker"),c=c.find("regions region"),d=$(''),f,b;if(7').css({top:parseInt(a.eq(b).attr("coordy"),10)+5,left:parseInt(a.eq(b).attr("coordx"),10)-75}).data("url",a.eq(b).attr("url")),f.append('
'+a.eq(b).text()+"
"),d.append(f);else for(l= !0,b=0;b"+a.eq(b).attr("value")+"").css({top:parseInt(a.eq(b).attr("coordy"),10)-50,left:parseInt(a.eq(b).attr("coordx"),10)-85}),d.append(f);e.find(".map-names").after(d);for(b=0;b\u00fcgyf\u00e9lszolg\u00e1latunkat!")}}var g,e,h=0,l=!1;return{init:function(){e=$(".map-widget");e.find(".map-container map area").on("mouseover",function(){var c=$(this).attr("id");e.find(".map-parts").find("."+c).addClass("show").siblings().removeClass("show");l&&e.find(".map-markers li").eq($(this).index()).addClass("show").siblings().removeClass("show")});e.find(".map-container").on({click:function(){window.location= $(this).data("url")},mouseover:function(){$(this).addClass("show").css("z-index",30).siblings().removeClass("show").css("z-index",20)},mouseout:function(){$(".map-container .map-markers li").removeClass("show")}},".map-markers li");e.find(".menu").on({click:function(){$(this).addClass("active").siblings().removeClass("active");h=parseInt($(this).data("state"),10)-1;k()}},"li");$.ajax({url:"esemenyek_xml",dataType:"xml",success:function(c){g=$(c);var a=g.find("response > buttons");c=a.find("button"); a=a.attr("defaultstate");g.find("response > regions");var d=a-1,a=e.find(".menu li");a.eq(d).addClass("active");for(d=0;d'),d;l.find("channel item").each(function(){var a=$(this),c=a.contents().filter("media\\:thumbnail").attr("url"),e=a.contents().filter("media\\:content").attr("url"),f=a.contents().filter("media\\:content").attr("medium"),g=a.find("title").first().text(),a=a.find("guid").text();d=$('
  • ');b.append(d)}); f.append(b);a=l.find("channel item").length;g();e()}function g(){d.find(".bottom-section .arrow-wrapper").on("click",function(){if($(this).hasClass("left")){var a=d.find(".thumbnail-wrapper .thumbnail-list"),c;c=a.position().left;c=0');d.find(".media-wrapper").prepend(b);break;case "video":b=$(''), d.find(".media-wrapper").prepend(b),h.player=jwplayer("lightbox-video").setup({primary:"flash",autostart:!1,flashplayer:"redesign/swf/player.swf",file:b.data("videourl"),height:480,width:640}),h.player.play()}d.find(".header h1").text(a.data("title"));d.find(".header .download-button").attr("href",a.data("downloadurl"))}var h,l,c=0,a,d,f,b=300;return{init:function(){h=APP.Media;d=$(".media-widget");f=d.find(".thumbnail-wrapper");var a=d.data("url");$.ajax({url:a,dataType:"xml",success:function(a){l= $(a);k()}})}}}(); APP.Counter=function(){function k(){var a;f=c.toString().split(/(?=(?:\d{3})+(?:\.|$))/g).join(".");a=g();e(a.join(""));$({current:c}).animate({current:parseInt(c+d,10)},{duration:m,step:function(b){f=parseInt(b,10).toString().split(/(?=(?:\d{3})+(?:\.|$))/g).join(".");a=g();e(a.join(""))},complete:function(){c+=d;f=parseInt(c,10).toString().split(/(?=(?:\d{3})+(?:\.|$))/g).join(".");a=g();e(a.join(""))},easing:"linear"})}function g(){var a=[];for(b=0;b'+ f.charAt(b)+"":a[b]=""+f.charAt(b)+"",b===f.length-1&&(a[b]=Math.floor(10*Math.random()));return a}function e(a){$(".counterBody .numbers").html(a)}function h(b){c=parseInt($(b).find("umft_kifiz_ft").attr("startvalue"),10);d=parseFloat($(b).find("umft_kifiz_ft").attr("speed"));a=parseInt($(b).find("umft_kifiz_ft").attr("endvalue"),10);l()}function l(){var b=(new Date).getHours();window.clearTimeout(n);n=window.setTimeout(function(){if(18<=b||8>b||c>a||0==d){var h;f=a.toString().split(/(?=(?:\d{3})+(?:\.|$))/g).join("."); h=g();e(h)}else k(),l()},m)}var c,a,d,f,b,m=1E3,n=0;return{init:function(){$.ajax({type:"GET",dataType:"xml",url:$(".pageCounter").data("xmlurl"),success:h})}}}();$(document).on("ready",function(){APP.getInstance()});