typeof Function.prototype.bind!="function"&&(Function.prototype.bind=function(a){var b=Array.prototype.slice.call(arguments,1),c=this;return function(){b.push.apply(b,arguments);return c.apply(a,b)}}),function(a,b){a.onload=function(){b("#register").addClass("active"),/mobile/i.test(navigator.userAgent)&&!pageYOffset&&!location.hash&&setTimeout(function(){a.scrollTo(0,1)},1)}}(window,jQuery),function(a){window.log=function(){var b=Array.prototype.slice.call(arguments);log.history=log.history||[],log.history.push(arguments);!this.console||(arguments.callee.caller&&a.browser.mozilla&&console.info("called from function:",arguments.callee.caller),this.console.log||a.each(b,function(a,b){console.debug(b)}),a.each(b,function(a,b){console.log(b)}))}}(jQuery),function(a){function d(a){a=a.replace(/left|top/g,"0px"),a=a.replace(/right|bottom/g,"100%"),a=a.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");var b=a.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);return[parseFloat(b[1],10),b[2],parseFloat(b[3],10),b[4]]}if(!document.defaultView||!document.defaultView.getComputedStyle){var b=a.curCSS;a.curCSS=function(a,c,d){c==="background-position"&&(c="backgroundPosition");if(c!=="backgroundPosition"||!a.currentStyle||a.currentStyle[c])return b.apply(this,arguments);var e=a.style;if(!d&&e&&e[c])return e[c];return b(a,"backgroundPositionX",d)+" "+b(a,"backgroundPositionY",d)}}var c=a.fn.animate;a.fn.animate=function(a){"background-position"in a&&(a.backgroundPosition=a["background-position"],delete a["background-position"]),"backgroundPosition"in a&&(a.backgroundPosition="("+a.backgroundPosition);return c.apply(this,arguments)},a.fx.step.backgroundPosition=function(b){if(!b.bgPosReady){var c=a.curCSS(b.elem,"backgroundPosition");c||(c="0px 0px"),c=d(c),b.start=[c[0],c[2]];var e=d(b.end);b.end=[e[0],e[2]],b.unit=[e[1],e[3]],b.bgPosReady=!0}var f=[];f[0]=(b.end[0]-b.start[0])*b.pos+b.start[0]+b.unit[0],f[1]=(b.end[1]-b.start[1])*b.pos+b.start[1]+b.unit[1],b.elem.style.backgroundPosition=f[0]+" "+f[1]}}(jQuery),function(a,b,c){function j(a){a=a||location.href;return"#"+a.replace(/^[^#]*#?(.*)$/,"$1")}var d="hashchange",e=document,f,g=a.event.special,h=e.documentMode,i="on"+d in b&&(h===c||h>7);a.fn[d]=function(a){return a?this.bind(d,a):this.trigger(d)},a.fn[d].delay=50,g[d]=a.extend(g[d],{setup:function(){if(i)return!1;a(f.start)},teardown:function(){if(i)return!1;a(f.stop)}}),f=function(){function n(){var c=j(),e=m(h);c!==h?(l(h=c,e),a(b).trigger(d)):e!==h&&(location.href=location.href.replace(/#.*/,"")+e),g=setTimeout(n,a.fn[d].delay)}var f={},g,h=j(),k=function(a){return a},l=k,m=k;f.start=function(){g||n()},f.stop=function(){g&&clearTimeout(g),g=c},a.browser.msie&&!i&&function(){var b,c;f.start=function(){b||(c=a.fn[d].src,c=c&&c+j(),b=a('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){c||l(j()),n()}).attr("src",c||"javascript:0").insertAfter("body")[0].contentWindow,e.onpropertychange=function(){try{event.propertyName==="title"&&(b.document.title=e.title)}catch(a){}})},f.stop=k,m=function(){return j(b.location.href)},l=function(c,f){var g=b.document,h=a.fn[d].domain;c!==f&&(g.title=e.title,g.open(),h&&g.write('<script>document.domain="'+h+'"</script>'),g.close(),b.location.hash=c)}}();return f}()}(jQuery,this),function(a){var b=1,c=function(){var c=a(this),d=a("body"),e,f,g,h,i;try{if(!1===c.data("ajax"))return;e=window.innerWidth<1?document.documentElement.offsetWidth:window.innerWidth,i=d.css("backgroundPosition").split(" "),g=i[0],h=i.length>0?i[1]:0,g=parseInt(g,10),h=parseInt(h,10),g=isNaN(g)?0:g,h=isNaN(h)?0:h,f=b&&b>0?g-2/3*e:g+2/3*e,f=parseInt(f,10),f=f.toString()+"px",h=" "+parseInt(h,10)+"px",a("body").animate({backgroundPosition:f+h},200)}catch(j){log(j)}};a(function(){var d=a("html"),e=a("body"),f=a("#pagecontainer"),g=a("#navi"),h=d.hasClass("csstransforms"),i=g.find("ul li"),j=a("#left"),k=a("#right"),l,m,n,o;l=function(){f.find(".thumb").imgpreview({position:{my:"left+50 center-50",at:"left center",collision:"none",using:function(b){a(this).css({top:b.top,left:b.left})}}})},l(),m=function(){!!jwplayer("videoplayer")&&jwplayer("videoplayer").setup({flashplayer:"/jwplayer/player.swf",file:"/video/trailer.f4v",image:"/video/preview.jpg",height:350,width:622}).getPlugin("display").hide()},m(),n=function(d){if(!d)var d="index.php";!!jwplayer("videoplayer")&&jwplayer("videoplayer").stop(),f.html(['<div class="wrapper">','<img src="/img/ajax-loader.gif" />',"</div>"].join()).find(".gallery").find(".thumb").imgpreview("destroy"),a.ajax({url:d,dataType:"html",cache:!0}).success(function(a){f.html(a),b!==0&&c(),m(),l(),o()}).error(function(){location.href=d})},o=function(){var a=g.find(".selected").parent(),b;b=i.index(a);switch(b){case-1:return;case 0:j.hide();break;case 4:k.hide();break;default:j.show(),k.show()}},o(),g.find("li a").not("#register").bind("focus mouseenter",function(){g.find("a.selected").removeClass("selected").addClass("rememberme")}).bind("blur mouseleave",function(){g.find("a.rememberme").removeClass("rememberme").addClass("selected")}).click(function(c){c.preventDefault();var d=a(this),e=d.attr("href").match(/action=.*/),f=g.find(".rememberme"),h,j;f.length<1&&(f=g.find(".selected"));f.get(0)!==this&&(f.removeClass("rememberme").removeClass("selected"),d.addClass("selected"),e=e!=null?e[0].split("=")[1]:"#",h=i.index(f.parent()),j=i.index(d.parent()),b=h<j?1:-1,location.hash=e)}),f.delegate(".more a","click",function(c){var d=a(this);b=0;d.hasClass("next")||d.hasClass("back")?(c.preventDefault(),n(d.attr("href"))):(f.find(".wrapper").not(".bottom").hide(200),f.find(".bottom").hide().removeClass("hidden").show(220))}).delegate(".gallery a","click",function(b){b.preventDefault(),a.fancybox(function(){var a=[],b=this;a.push(this),f.find("a").not(".more").not(".back").each(function(){b!==this&&a.push(this)});return a}.bind(this)(),{transitionIn:"elastic",transitionOut:"elastic",speedIn:600,speedOut:200,titlePosition:"over",titleFormat:function(b,c,d,e){return['<span id="fancybox-title-over">',a(c[d]).find("img").attr("rel"),"</span>"].join("")}})}),a.browser.msie&&a.browser.version<7&&a("#left, #right").remove(),k.click(function(){b=1;var a=g.find(".selected").parent().next().children();a.parent().children().not("#register").length<1&&(a=g.find("a").not("#register").first()),a.click()}),j.click(function(){b=-1;var a=g.find(".selected").parent().prev().children();a.parent().children().not("#register").length<1&&(a=g.find("a").not("#register").last()),a.click()}),a(window).hashchange(function(){var a=location.hash,b="/index.php";a!=null&&a.length>1&&(a=a.substr(1),b+="?action="+a),n(b)}),location.hash&&location.hash.length>1&&(a(window).trigger("hashchange"),g.find("a.selected").removeClass("selected").removeClass("rememberme").end().find("#a"+location.hash.substr(1)).addClass("selected"))})}(jQuery)
