var thickboxL10n={next:"Következő >",prev:"< Előző",image:"Image",of:"of",close:"Bezár",closeImage:"http://happycube.hu/wp-includes/js/thickbox/tb-close.png"};function tb_init(a){jQuery(a).live("click",tb_click)}function tb_click(){var a=this.title||this.name||null;var b=this.href||this.alt;var c=this.rel||false;tb_show(a,b,c);this.blur();return false}function tb_show(a,b,c){try{if(typeof document.body.style.maxHeight==="undefined"){jQuery("body","html").css({height:"100%",width:"100%"});jQuery("html").css("overflow","hidden");if(document.getElementById("TB_HideSelect")===null){jQuery("body").append("<iframe id='TB_HideSelect'>"+thickboxL10n.noiframes+"</iframe><div id='TB_overlay'></div><div id='TB_window'></div>");jQuery("#TB_overlay").click(tb_remove)}}else{if(document.getElementById("TB_overlay")===null){jQuery("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");jQuery("#TB_overlay").click(tb_remove)}}if(tb_detectMacXFF()){jQuery("#TB_overlay").addClass("TB_overlayMacFFBGHack")}else{jQuery("#TB_overlay").addClass("TB_overlayBG")}if(a===null){a=""}jQuery("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");jQuery("#TB_load").show();var d;if(b.indexOf("?")!==-1){d=b.substr(0,b.indexOf("?"))}else{d=b}var e=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;var f=d.toLowerCase().match(e);if(f==".jpg"||f==".jpeg"||f==".png"||f==".gif"||f==".bmp"){TB_PrevCaption="";TB_PrevURL="";TB_PrevHTML="";TB_NextCaption="";TB_NextURL="";TB_NextHTML="";TB_imageCount="";TB_FoundURL=false;if(c){TB_TempArray=jQuery("a[rel="+c+"]").get();for(TB_Counter=0;TB_Counter<TB_TempArray.length&&TB_NextHTML==="";TB_Counter++){var g=TB_TempArray[TB_Counter].href.toLowerCase().match(e);if(!(TB_TempArray[TB_Counter].href==b)){if(TB_FoundURL){TB_NextCaption=TB_TempArray[TB_Counter].title;TB_NextURL=TB_TempArray[TB_Counter].href;TB_NextHTML="<span id='TB_next'>  <a href='#'>"+thickboxL10n.next+"</a></span>"}else{TB_PrevCaption=TB_TempArray[TB_Counter].title;TB_PrevURL=TB_TempArray[TB_Counter].href;TB_PrevHTML="<span id='TB_prev'>  <a href='#'>"+thickboxL10n.prev+"</a></span>"}}else{TB_FoundURL=true;TB_imageCount=thickboxL10n.image+" "+(TB_Counter+1)+" "+thickboxL10n.of+" "+TB_TempArray.length}}}imgPreloader=new Image;imgPreloader.onload=function(){imgPreloader.onload=null;var d=tb_getPageSize();var e=d[0]-150;var f=d[1]-150;var g=imgPreloader.width;var h=imgPreloader.height;if(g>e){h=h*(e/g);g=e;if(h>f){g=g*(f/h);h=f}}else if(h>f){g=g*(f/h);h=f;if(g>e){h=h*(e/g);g=e}}TB_WIDTH=g+30;TB_HEIGHT=h+60;jQuery("#TB_window").append("<a href='' id='TB_ImageOff' title='"+thickboxL10n.close+"'><img id='TB_Image' src='"+b+"' width='"+g+"' height='"+h+"' alt='"+a+"'/></a>"+"<div id='TB_caption'>"+a+"<div id='TB_secondLine'>"+TB_imageCount+TB_PrevHTML+TB_NextHTML+"</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='"+thickboxL10n.close+"'><img src='"+tb_closeImage+"' /></a></div>");jQuery("#TB_closeWindowButton").click(tb_remove);if(!(TB_PrevHTML==="")){function i(){if(jQuery(document).unbind("click",i)){jQuery(document).unbind("click",i)}jQuery("#TB_window").remove();jQuery("body").append("<div id='TB_window'></div>");tb_show(TB_PrevCaption,TB_PrevURL,c);return false}jQuery("#TB_prev").click(i)}if(!(TB_NextHTML==="")){function j(){jQuery("#TB_window").remove();jQuery("body").append("<div id='TB_window'></div>");tb_show(TB_NextCaption,TB_NextURL,c);return false}jQuery("#TB_next").click(j)}jQuery(document).bind("keydown.thickbox",function(a){a.stopImmediatePropagation();if(a.which==27){if(!jQuery(document).triggerHandler("wp_CloseOnEscape",[{event:a,what:"thickbox",cb:tb_remove}]))tb_remove()}else if(a.which==190){if(!(TB_NextHTML=="")){jQuery(document).unbind("thickbox");j()}}else if(a.which==188){if(!(TB_PrevHTML=="")){jQuery(document).unbind("thickbox");i()}}return false});tb_position();jQuery("#TB_load").remove();jQuery("#TB_ImageOff").click(tb_remove);jQuery("#TB_window").css({display:"block"})};imgPreloader.src=b}else{var h=b.replace(/^[^\?]+\??/,"");var i=tb_parseQuery(h);TB_WIDTH=i["width"]*1+30||630;TB_HEIGHT=i["height"]*1+40||440;ajaxContentW=TB_WIDTH-30;ajaxContentH=TB_HEIGHT-45;if(b.indexOf("TB_iframe")!=-1){urlNoQuery=b.split("TB_");jQuery("#TB_iframeContent").remove();if(i["modal"]!="true"){jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+a+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='"+thickboxL10n.close+"'><img src='"+tb_closeImage+"' /></a></div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1e3)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;' >"+thickboxL10n.noiframes+"</iframe>")}else{jQuery("#TB_overlay").unbind();jQuery("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1e3)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;'>"+thickboxL10n.noiframes+"</iframe>")}}else{if(jQuery("#TB_window").css("display")!="block"){if(i["modal"]!="true"){jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+a+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'><img src='"+tb_closeImage+"' /></a></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>")}else{jQuery("#TB_overlay").unbind();jQuery("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>")}}else{jQuery("#TB_ajaxContent")[0].style.width=ajaxContentW+"px";jQuery("#TB_ajaxContent")[0].style.height=ajaxContentH+"px";jQuery("#TB_ajaxContent")[0].scrollTop=0;jQuery("#TB_ajaxWindowTitle").html(a)}}jQuery("#TB_closeWindowButton").click(tb_remove);if(b.indexOf("TB_inline")!=-1){jQuery("#TB_ajaxContent").append(jQuery("#"+i["inlineId"]).children());jQuery("#TB_window").unload(function(){jQuery("#"+i["inlineId"]).append(jQuery("#TB_ajaxContent").children());});tb_position();jQuery("#TB_load").remove();jQuery("#TB_window").css({display:"block"})}else if(b.indexOf("TB_iframe")!=-1){tb_position();if(jQuery.browser.safari){jQuery("#TB_load").remove();jQuery("#TB_window").css({display:"block"})}}else{jQuery("#TB_ajaxContent").load(b+="&random="+(new Date).getTime(),function(){tb_position();jQuery("#TB_load").remove();tb_init("#TB_ajaxContent a.thickbox");jQuery("#TB_window").css({display:"block"})})}}if(!i["modal"]){jQuery(document).bind("keyup.thickbox",function(a){if(a.which==27){a.stopImmediatePropagation();if(!jQuery(document).triggerHandler("wp_CloseOnEscape",[{event:a,what:"thickbox",cb:tb_remove}]))tb_remove();return false}})}}catch(j){}}function tb_showIframe(){jQuery("#TB_load").remove();jQuery("#TB_window").css({display:"block"})}function tb_remove(){jQuery(".videoToHide").show();jQuery("#TB_imageOff").unbind("click");jQuery("#TB_closeWindowButton").unbind("click");jQuery("#TB_window").fadeOut("fast",function(){jQuery("#TB_window,#TB_overlay,#TB_HideSelect").trigger("unload").unbind().remove();});jQuery("#TB_load").remove();if(typeof document.body.style.maxHeight=="undefined"){jQuery("body","html").css({height:"auto",width:"auto"});jQuery("html").css("overflow","")}jQuery(document).unbind(".thickbox");return false}function tb_position(){var a=typeof document.body.style.maxHeight==="undefined";jQuery("#TB_window").css({marginLeft:"-"+parseInt(TB_WIDTH/2,10)+"px",width:TB_WIDTH+"px"});if(!a){jQuery("#TB_window").css({marginTop:"-"+parseInt(TB_HEIGHT/2,10)+"px"})}}function tb_parseQuery(a){var b={};if(!a){return b}var c=a.split(/[;&]/);for(var d=0;d<c.length;d++){var e=c[d].split("=");if(!e||e.length!=2){continue}var f=unescape(e[0]);var g=unescape(e[1]);g=g.replace(/\+/g," ");b[f]=g}return b}function tb_getPageSize(){var a=document.documentElement;var b=window.innerWidth||self.innerWidth||a&&a.clientWidth||document.body.clientWidth;var c=window.innerHeight||self.innerHeight||a&&a.clientHeight||document.body.clientHeight;arrayPageSize=[b,c];return arrayPageSize}function tb_detectMacXFF(){var a=navigator.userAgent.toLowerCase();if(a.indexOf("mac")!=-1&&a.indexOf("firefox")!=-1){return true}}if(typeof tb_pathToImage!="string"){var tb_pathToImage=thickboxL10n.loadingAnimation}if(typeof tb_closeImage!="string"){var tb_closeImage=thickboxL10n.closeImage}jQuery(document).ready(function(){tb_init("a.thickbox, area.thickbox, input.thickbox");imgLoader=new Image;imgLoader.src=tb_pathToImage})
