var Hyphenator=function(){var I="cs, da, bn, de, en, es, fi, fr, gu, hi, hu, it, kn, ml, nl, or, pa, pl, pt, ru, sv, ta, te, tr, uk",y=function(){for(var b,a=0,d=I.split(", "),c={};b=d[a++];)c[b]=true;return c}(),z={cs:"Jazyk t\u00e9to internetov\u00e9 str\u00e1nky nebyl automaticky rozpozn\u00e1n. Ur\u010dete pros\u00edm jej\u00ed jazyk:",da:"Denne websides sprog kunne ikke bestemmes. Angiv venligst sprog:",de:"Die Sprache dieser Webseite konnte nicht automatisch bestimmt werden. Bitte Sprache angeben:", en:"The language of this website could not be determined automatically. Please indicate the main language:",es:"El idioma del sitio no pudo determinarse autom%E1ticamente. Por favor, indique el idioma principal:",fi:"Sivun kielt%E4 ei tunnistettu automaattisesti. M%E4%E4rit%E4 sivun p%E4%E4kieli:",fr:"La langue de ce site n%u2019a pas pu %EAtre d%E9termin%E9e automatiquement. Veuillez indiquer une langue, s.v.p.%A0:",hu:"A weboldal nyelv\u00e9t nem siker\u00fclt automatikusan meg\u00e1llap\u00edtani. K\u00e9rem adja meg a nyelvet:", it:"Lingua del sito sconosciuta. Indicare una lingua, per favore:",ml:"\u0d08 \u0d35\u0d46%u0D2C%u0D4D%u200C\u0d38\u0d48\u0d31\u0d4d\u0d31\u0d3f\u0d28\u0d4d\u0d31\u0d46 \u0d2d\u0d3e\u0d37 \u0d15\u0d23\u0d4d\u0d1f\u0d41\u0d2a\u0d3f\u0d1f\u0d3f\u0d2f\u0d4d\u0d15\u0d4d\u0d15\u0d3e%u0D28%u0D4D%u200D \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d3f\u0d32\u0d4d\u0d32. \u0d2d\u0d3e\u0d37 \u0d0f\u0d24\u0d3e\u0d23\u0d46\u0d28\u0d4d\u0d28\u0d41 \u0d24\u0d3f\u0d30\u0d1e\u0d4d\u0d1e\u0d46\u0d1f\u0d41\u0d15\u0d4d\u0d15\u0d41\u0d15:", nl:"De taal van deze website kan niet automatisch worden bepaald. Geef de hoofdtaal op:",pt:"A l\u00edngua deste site n\u00e3o p\u00f4de ser determinada automaticamente. Por favor indique a l\u00edngua principal:",ru:"\u042f\u0437\u044b\u043a \u044d\u0442\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u044f\u0437\u044b\u043a:", sv:"Spr%E5ket p%E5 den h%E4r webbplatsen kunde inte avg%F6ras automatiskt. V%E4nligen ange:",tr:"Bu web sitesinin dilini otomatik olarak tespit edilememi\u015ftir. L\u00fctfen ana dili g\u00f6sterir:",uk:"\u041c\u043e\u0432\u0430 \u0446\u044c\u043e\u0433\u043e \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0443 \u043d\u0435 \u043c\u043e\u0436\u0435 \u0431\u0443\u0442\u0438 \u0432\u0438\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e. \u0411\u0443\u0434\u044c \u043b\u0430\u0441\u043a\u0430, \u0432\u043a\u0430\u0436\u0456\u0442\u044c \u0433\u043e\u043b\u043e\u0432\u043d\u0443 \u043c\u043e\u0432\u0443:"}, J=function(){for(var b=document.getElementsByTagName("script"),a=0,d,c;d=b[a++];)if(d.src){c=d.src;d=c.indexOf("Hyphenator.js");if(d!==-1)return c.substring(0,d)}return"http://hyphenator.googlecode.com/svn/trunk/"}(),$=function(){var b=false;if(window.location.href.indexOf(J)!==-1)b=true;return b}(),o=false,aa={script:true,code:true,pre:true,img:true,br:true,samp:true,kbd:true,"var":true,abbr:true,acronym:true,sub:true,sup:true,button:true,option:true,label:true,textarea:true},r=true,K=true,L=false, A="hyphenate",s="donthyphenate",t=6,M=function(){var b=null,a=false,d=document.getElementsByTagName("script"),c,e;c=0;for(e=d.length;c0&&C.appendDataForElem(p[p.length-1],{isLast:true})}function ea(b){var a,d,c,e,f,g={};c=Hyphenator.languages[b].patterns;for(a in c)if(c.hasOwnProperty(a)){a=parseInt(a,10);for(d=0;e=c[a].substr(d,a);){f=e.replace(/\d/g,"");g[f]=e;d+=a}}Hyphenator.languages[b].patterns= g;Hyphenator.languages[b].patternsConverted=true}function fa(b){b=b.split(", ");var a={},d,c,e;d=0;for(c=b.length;d=t)e.data=e.data.replace(Hyphenator.languages[d].genRegExp,c)}if(a.isHidden&&B==="hidden"){b.style.visibility="visible";if(a.hasOwnStyle)if(b.style.removeProperty)b.style.removeProperty("visibility");else b.style.removeAttribute&&b.style.removeAttribute("visibility");else{b.setAttribute("style","");b.removeAttribute("style")}}if(a.isLast){m=3;R()}}function Y(b){var a,d=0,c;switch(q){case "|":a="\\|";break;case "+":a="\\+"; break;case "*":a="\\*";break;default:a=q}for(;c=b.childNodes[d++];)if(c.nodeType===3){c.data=c.data.replace(new RegExp(a,"g"),"");c.data=c.data.replace(new RegExp(Q,"g"),"")}else c.nodeType===1&&Y(c)}function Z(){function b(c,e){return function(){return c(e)}}for(var a=0,d;d=p[a++];)window.setTimeout(b(ia,d),0)}function ja(){for(var b=0,a;a=p[b++];)Y(a);m=4}return{version:"2.4.0",languages:{},config:function(b){function a(c,e){if(typeof b[c]===e)return true;else{n(new Error("Config onError: "+c+" must be of type "+ e));return false}}var d;for(d in b)if(b.hasOwnProperty(d))switch(d){case "classname":if(a("classname","string"))A=b.classname;break;case "donthyphenateclassname":if(a("donthyphenateclassname","string"))s=b.donthyphenateclassname;break;case "minwordlength":if(a("minwordlength","number"))t=b.minwordlength;break;case "hyphenchar":if(a("hyphenchar","string")){if(b.hyphenchar==="­")b.hyphenchar=String.fromCharCode(173);q=b.hyphenchar}break;case "urlhyphenchar":if(b.hasOwnProperty("urlhyphenchar"))if(a("urlhyphenchar", "string"))T=b.urlhyphenchar;break;case "togglebox":if(a("togglebox","function"))u=b.togglebox;break;case "displaytogglebox":if(a("displaytogglebox","boolean"))L=b.displaytogglebox;break;case "remoteloading":if(a("remoteloading","boolean"))K=b.remoteloading;break;case "enablecache":if(a("enablecache","boolean"))r=b.enablecache;break;case "onhyphenationdonecallback":if(a("onhyphenationdonecallback","function"))R=b.onhyphenationdonecallback;break;case "onerrorhandler":if(a("onerrorhandler","function"))n= b.onerrorhandler;break;case "intermediatestate":if(a("intermediatestate","string"))B=b.intermediatestate;break;case "selectorfunction":if(a("selectorfunction","function"))S=b.selectorfunction;break;default:n(new Error("Hyphenator.config: property "+d+" not known."))}},run:function(){function b(){try{ca();da();ha(Z);L&&u(true)}catch(a){n(a)}}o||ba(window,b);if(Hyphenator.isBookmarklet()||o)b()},addExceptions:function(b,a){if(b==="")b="global";if(i.hasOwnProperty[b])i[b]+=", "+a;else i[b]=a},hyphenate:function(b, a){var d,c,e;if(Hyphenator.languages.hasOwnProperty(a)){Hyphenator.languages[a].prepared||E(a);d=function(f){return P.test(f)?X(f):F(a,f)};if(typeof b==="string"||b.constructor===String)return b.replace(Hyphenator.languages[a].genRegExp,d);else if(typeof b==="object")for(e=0;c=b.childNodes[e++];)if(c.nodeType===3&&c.data.length>=t)c.data=c.data.replace(Hyphenator.languages[a].genRegExp,d);else if(c.nodeType===1){if(c.lang!=="")a=c.lang;Hyphenator.hyphenate(c,a)}}else n(new Error('Language "'+a+'" is not loaded.'))}, isBookmarklet:function(){return M},toggleHyphenation:function(){switch(m){case 3:ja();u(false);break;case 4:Z();u(true);break}}}}();if(Hyphenator.isBookmarklet()){Hyphenator.config({displaytogglebox:true,intermediatestate:"visible"});Hyphenator.run()};/*-------------------------------------------------------------------- * jQuery Plugin: "Cookie" --------------------------------------------------------------------*/ jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options=$.extend({},options);options.expires=-1;} var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;} expires='; expires='+date.toUTCString();} var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery); /*-------------------------------------------------------------------- * jQuery Plugin: "Tablesorter 2.0" --------------------------------------------------------------------*/ (function($){$.extend({tablesorter:new function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'.',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}var rows=table.tBodies[0].rows;if(table.tBodies[0].rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;ib)?1:0));};function sortTextDesc(a,b){return((ba)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){$this.trigger("sortStart");var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){var $cell=$(this);var i=this.column;this.order=this.count++%2;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i 0 ) { var zIndexNumber = 0; $('div').each(function() { $(this).css('zIndex', zIndexNumber); zIndexNumber += 10; }); } }); /*-------------------------------------------------------------------- * jQuery Script: "IE Megamenu Border-right Fix" --------------------------------------------------------------------*/ $(function() { if ( $("nav#mainnav").length > 0 ) { $('nav#mainnav div>div:last-child').css('border-right', '0'); } }); /*-------------------------------------------------------------------- * jQuery Script: "Hyphenator" --------------------------------------------------------------------*/ $(function() { if ( $("section p").length > 0 ) { Hyphenator.run(); $("section p").addClass("hyphenate"); $("section li").addClass("hyphenate"); $("section td").addClass("hyphenate"); } }); /*-------------------------------------------------------------------- * jQuery Script: "Megamenu" --------------------------------------------------------------------*/ $(function() { if ( $("nav#mainnav").length > 0 ) { function addMega(){ $(this).addClass("hovering"); } function removeMega(){ $(this).removeClass("hovering"); } var megaConfig = { sensitivity: 3, interval: 50, over: addMega, timeout: 250, out: removeMega }; $("nav#mainnav li.first").hoverIntent(megaConfig) } }); /*-------------------------------------------------------------------- * jQuery Script: "Tabs" --------------------------------------------------------------------*/ $(function () { if ( $("#tabs").length > 0 ) { var tabContainers = $('div#tabs > div'); if(location.hash.length > 0) { var str = location.hash; str = str.replace("#", ""); $('div#tabs ul li.list' + str + ' a').addClass('selected'); tabContainers.hide(); $(location.hash).show(); $.scrollTo("header"); } else { $('div#tabs ul li.listceylon a').addClass('selected'); tabContainers.hide(); $("#ceylon").show(); } $('div#tabs ul a').click(function () { location.hash = $(this).attr('href') $.scrollTo("header"); tabContainers.hide().filter(this.hash).show(); $('div#tabs ul a').removeClass('selected'); $(this).addClass('selected'); return false; }); $(document.createElement("h3")).attr("class","ceylon oikea").appendTo("#ceylon"); $(document.createElement("a")).attr("href","#prague").click(function () { location.hash = $(this).attr('href') $.scrollTo("header"); tabContainers.hide().filter(this.hash).show(); $('div#tabs ul li.listceylon a').removeClass('selected'); $('div#tabs ul li.listprague a').addClass('selected'); return false; }).text("Prague »").appendTo('.ceylon'); $(document.createElement("h3")).attr("class","prague oikea").appendTo("#prague"); $(document.createElement("a")).attr("href","#istanbul").click(function () { location.hash = $(this).attr('href') $.scrollTo("header"); tabContainers.hide().filter(this.hash).show(); $('div#tabs ul li.listprague a').removeClass('selected'); $('div#tabs ul li.lististanbul a').addClass('selected'); return false; }).text("Istanbul »").appendTo('.prague'); $(document.createElement("h3")).attr("class","istanbul oikea").appendTo("#istanbul"); $(document.createElement("a")).attr("href","#hongkong").click(function () { location.hash = $(this).attr('href') $.scrollTo("header"); tabContainers.hide().filter(this.hash).show(); $('div#tabs ul li.lististanbul a').removeClass('selected'); $('div#tabs ul li.listhongkong a').addClass('selected'); return false; }).text("Hong Kong »").appendTo('.istanbul'); $(document.createElement("h3")).attr("class","hongkong oikea").appendTo("#hongkong"); $(document.createElement("a")).attr("href","#penglailagoon").click(function () { location.hash = $(this).attr('href') $.scrollTo("header"); tabContainers.hide().filter(this.hash).show(); $('div#tabs ul li.listhongkong a').removeClass('selected'); $('div#tabs ul li.listpenglailagoon a').addClass('selected'); return false; }).text("Peng Lai Lagoon »").appendTo('.hongkong'); $(document.createElement("h3")).attr("class","penglailagoon oikea").appendTo("#penglailagoon"); $(document.createElement("a")).attr("href","#penglaimountains").click(function () { location.hash = $(this).attr('href') $.scrollTo("header"); tabContainers.hide().filter(this.hash).show(); $('div#tabs ul li.listpenglailagoon a').removeClass('selected'); $('div#tabs ul li.listpenglaimountains a').addClass('selected'); return false; }).text("Peng Lai Mountains »").appendTo('.penglailagoon'); $(document.createElement("h3")).attr("class","penglaimountains oikea").appendTo("#penglaimountains"); $(document.createElement("a")).attr("href","#blackdragonfortress").click(function () { location.hash = $(this).attr('href') $.scrollTo("header"); tabContainers.hide().filter(this.hash).show(); $('div#tabs ul li.listpenglaimountains a').removeClass('selected'); $('div#tabs ul li.listblackdragonfortress a').addClass('selected'); return false; }).text("Black Dragon Fortress »").appendTo('.penglaimountains'); $(document.createElement("h3")).attr("class","blackdragonfortress oikea").appendTo("#blackdragonfortress"); $(document.createElement("a")).attr("href","#templeofkongtien").click(function () { location.hash = $(this).attr('href') $.scrollTo("header"); tabContainers.hide().filter(this.hash).show(); $('div#tabs ul li.listblackdragonfortress a').removeClass('selected'); $('div#tabs ul li.listtempleofkongtien a').addClass('selected'); return false; }).text("Temple of Kong Tien »").appendTo('.blackdragonfortress'); $(document.createElement("h3")).attr("class","templeofkongtien oikea").appendTo("#templeofkongtien"); $(document.createElement("a")).attr("href","#emperorstomb").click(function () { location.hash = $(this).attr('href') $.scrollTo("header"); tabContainers.hide().filter(this.hash).show(); $('div#tabs ul li.listtempleofkongtien a').removeClass('selected'); $('div#tabs ul li.listemperorstomb a').addClass('selected'); return false; }).text("Emperor's Tomb »").appendTo('.templeofkongtien'); $(document.createElement("h3")).attr("class","emperorstomb oikea").appendTo("#emperorstomb"); $(document.createElement("a")).attr("href","#netherworld").click(function () { location.hash = $(this).attr('href') $.scrollTo("header"); tabContainers.hide().filter(this.hash).show(); $('div#tabs ul li.listemperorstomb a').removeClass('selected'); $('div#tabs ul li.listnetherworld a').addClass('selected'); return false; }).text("The Netherworld »").appendTo('.emperorstomb'); } }); /*-------------------------------------------------------------------- * jQuery Script: "Nostopienennys" --------------------------------------------------------------------*/ $(function() { if ( $("#nostot").length > 0 ) { $(document.createElement("a")).attr("id","toggleNosto").attr("title","Piilota nostot").text("[Piilota]").click(function () { $("#nostot .nosto, #nostot h3").toggleClass("nakyy"); $("#nostot").toggleClass("pieni"); $("#uutiset").toggleClass("iso") }).insertBefore('#nostot h3'); $('#toggleNosto').toggle( function () { $(this).text("[Näytä]").attr("title","Näytä nostot"); $("#nostot .nosto, #nostot h3").addClass("nakyy"); $("#nostot").addClass("pieni"); $("#uutiset").addClass("iso"); $.cookie('naytaNosto', 'collapsed', {expires: 14}); }, function () { $(this).text("[Piilota]").attr("title","Piilota nostot"); $.cookie('naytaNosto', 'expanded', {expires: 14}); } ); // COOKIES var naytaNosto = $.cookie('naytaNosto'); if (naytaNosto == 'collapsed') { $('#toggleNosto').text("[Näytä]").attr("title","Näytä nostot"); $("#nostot .nosto, #nostot h3").addClass("nakyy"); $("#nostot").addClass("pieni"); $("#uutiset").addClass("iso"); }; if (naytaNosto == 'expanded') { $('#toggleNosto').text("[Piilota]").attr("title","Piilota nostot"); }; } }); /*-------------------------------------------------------------------- * jQuery Script: "Hakutyhjennys" --------------------------------------------------------------------*/ $(function() { if ( $("#haku").length > 0 ) { $('#haku input[type="text"]').click( function() { if (this.value == this.defaultValue) { this.value = ''; } } ); $('#haku input[type="text"]').blur(function() { if (this.value == '') { this.value = this.defaultValue; } } ); } }); /*-------------------------------------------------------------------- * jQuery Script: "Zebratables" --------------------------------------------------------------------*/ $(function() { if ( $(".soundtrack").length > 0 ) { $(".soundtrack tr:even").addClass("even"); } }); /*-------------------------------------------------------------------- * jQuery Script: "Takaisinlinkki" --------------------------------------------------------------------*/ $(function() { if ( $("body.naytajokin").length > 0 ) { $(document.createElement("a")).attr("href","javascript:history.go(-1)").attr("id","takaisin").appendTo('body.naytajokin header'); $(document.createElement("img")).attr("src","/kuvat/leiska/takaisin.png").attr("width","174").attr("height","45").attr("title","Takaisin edelliselle sivulle").attr("alt","takaisin").appendTo('#takaisin'); } }) /*-------------------------------------------------------------------- * jQuery Script: "Kuvan pienennys" --------------------------------------------------------------------*/ $(function() { if ( $("body.naytajokin #kuva").length > 0 ) { $(document.createElement("p")).text("Kuvaa pienennetty, klikkaa sitä nähdäksesi täysikokoisen version.").prependTo('#kuva').wrapInner(""); if (document.body.clientWidth > leveys) { $("#kuva img").toggleClass("large"); } else { $("#kuva img").toggleClass("pienennys"); $("#kuva p").toggleClass("nakyy"); $("#kuva img").click(function () { $("#kuva img").toggleClass("pienennys"); $("#kuva p").toggleClass("nakyy"); }); } } }); /*------------------------------------------------------------------- * jQuery Script: "Shadowbox" --------------------------------------------------------------------*/ if(typeof jQuery=="undefined"){throw"Unable to load Shadowbox, jQuery library not found"}var Shadowbox={};Shadowbox.lib={adapter:"jquery",getStyle:function(B,A){return jQuery(B).css(A)},setStyle:function(C,B,D){if(typeof B!="object"){var A={};A[B]=D;B=A}jQuery(C).css(B)},get:function(A){return(typeof A=="string")?document.getElementById(A):A},remove:function(A){jQuery(A).remove()},getTarget:function(A){return A.target},getPageXY:function(A){return[A.pageX,A.pageY]},preventDefault:function(A){A.preventDefault()},keyCode:function(A){return A.keyCode},addEvent:function(C,A,B){jQuery(C).bind(A,B)},removeEvent:function(C,A,B){jQuery(C).unbind(A,B)},append:function(B,A){jQuery(B).append(A)}};(function(A){A.fn.shadowbox=function(B){return this.each(function(){var E=A(this);var D=A.extend({},B||{},A.metadata?E.metadata():A.meta?E.data():{});var C=this.className||"";D.width=parseInt((C.match(/w:(\d+)/)||[])[1])||D.width;D.height=parseInt((C.match(/h:(\d+)/)||[])[1])||D.height;Shadowbox.setup(E,D)})}})(jQuery); if(typeof Shadowbox=="undefined"){throw"Unable to load Shadowbox, no base library adapter found"}(function(){var version="2.0";var options={animate:true,animateFade:true,animSequence:"wh",flvPlayer:"flvplayer.swf",modal:false,overlayColor:"#000",overlayOpacity:0.8,flashBgColor:"#000000",autoplayMovies:true,showMovieControls:true,slideshowDelay:0,resizeDuration:0.55,fadeDuration:0.35,displayNav:true,continuous:false,displayCounter:true,counterType:"default",counterLimit:10,viewportPadding:20,handleOversize:"resize",handleException:null,handleUnsupported:"link",initialHeight:160,initialWidth:320,enableKeys:true,onOpen:null,onFinish:null,onChange:null,onClose:null,skipSetup:false,errors:{fla:{name:"Flash",url:"http://www.adobe.com/products/flashplayer/"},qt:{name:"QuickTime",url:"http://www.apple.com/quicktime/download/"},wmp:{name:"Windows Media Player",url:"http://www.microsoft.com/windows/windowsmedia/"},f4m:{name:"Flip4Mac",url:"http://www.flip4mac.com/wmv_download.htm"}},ext:{img:["png","jpg","jpeg","gif","bmp"],swf:["swf"],flv:["flv"],qt:["dv","mov","moov","movie","mp4"],wmp:["asf","wm","wmv"],qtwmp:["avi","mpg","mpeg"],iframe:["asp","aspx","cgi","cfm","htm","html","pl","php","php3","php4","php5","phtml","rb","rhtml","shtml","txt","vbs"]}};var SB=Shadowbox;var SL=SB.lib;var default_options;var RE={domain:/:\/\/(.*?)[:\/]/,inline:/#(.+)$/,rel:/^(light|shadow)box/i,gallery:/^(light|shadow)box\[(.*?)\]/i,unsupported:/^unsupported-(\w+)/,param:/\s*([a-z_]*?)\s*=\s*(.+)\s*/,empty:/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i};var cache=[];var gallery;var current;var content;var content_id="shadowbox_content";var dims;var initialized=false;var activated=false;var slide_timer;var slide_start;var slide_delay=0;var ua=navigator.userAgent.toLowerCase();var client={isStrict:document.compatMode=="CSS1Compat",isOpera:ua.indexOf("opera")>-1,isIE:ua.indexOf("msie")>-1,isIE7:ua.indexOf("msie 7")>-1,isSafari:/webkit|khtml/.test(ua),isWindows:ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1,isMac:ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1,isLinux:ua.indexOf("linux")!=-1};client.isBorderBox=client.isIE&&!client.isStrict;client.isSafari3=client.isSafari&&!!(document.evaluate);client.isGecko=ua.indexOf("gecko")!=-1&&!client.isSafari;var ltIE7=client.isIE&&!client.isIE7;var plugins;if(navigator.plugins&&navigator.plugins.length){var detectPlugin=function(plugin_name){var detected=false;for(var i=0,len=navigator.plugins.length;i-1){detected=true;break}}return detected};var f4m=detectPlugin("Flip4Mac");plugins={fla:detectPlugin("Shockwave Flash"),qt:detectPlugin("QuickTime"),wmp:!f4m&&detectPlugin("Windows Media"),f4m:f4m}}else{var detectPlugin=function(plugin_name){var detected=false;try{var axo=new ActiveXObject(plugin_name);if(axo){detected=true}}catch(e){}return detected};plugins={fla:detectPlugin("ShockwaveFlash.ShockwaveFlash"),qt:detectPlugin("QuickTime.QuickTime"),wmp:detectPlugin("wmplayer.ocx"),f4m:false}}var apply=function(o,e){for(var p in e){o[p]=e[p]}return o};var isLink=function(el){return el&&typeof el.tagName=="string"&&(el.tagName.toUpperCase()=="A"||el.tagName.toUpperCase()=="AREA")};SL.getViewportHeight=function(){var h=window.innerHeight;var mode=document.compatMode;if((mode||client.isIE)&&!client.isOpera){h=client.isStrict?document.documentElement.clientHeight:document.body.clientHeight}return h};SL.getViewportWidth=function(){var w=window.innerWidth;var mode=document.compatMode;if(mode||client.isIE){w=client.isStrict?document.documentElement.clientWidth:document.body.clientWidth}return w};SL.createHTML=function(obj){var html="<"+obj.tag;for(var attr in obj){if(attr=="tag"||attr=="html"||attr=="children"){continue}if(attr=="cls"){html+=' class="'+obj.cls+'"'}else{html+=" "+attr+'="'+obj[attr]+'"'}}if(RE.empty.test(obj.tag)){html+="/>"}else{html+=">";var cn=obj.children;if(cn){for(var i=0,len=cn.length;i"}return html};var ease=function(x){return 1+Math.pow(x-1,3)};var animate=function(el,p,to,d,cb){var from=parseFloat(SL.getStyle(el,p));if(isNaN(from)){from=0}if(from==to){if(typeof cb=="function"){cb()}return }var delta=to-from;var op=p=="opacity";var unit=op?"":"px";var fn=function(ease){SL.setStyle(el,p,from+ease*delta+unit)};if(!options.animate&&!op||op&&!options.animateFade){fn(1);if(typeof cb=="function"){cb()}return }d*=1000;var begin=new Date().getTime();var end=begin+d;var timer=setInterval(function(){var time=new Date().getTime();if(time>=end){clearInterval(timer);fn(1);if(typeof cb=="function"){cb()}}else{fn(ease((time-begin)/d))}},10)};var clearOpacity=function(el){var s=el.style;if(client.isIE){if(typeof s.filter=="string"&&(/alpha/i).test(s.filter)){s.filter=s.filter.replace(/[\w\.]*alpha\(.*?\);?/i,"")}}else{s.opacity="";s["-moz-opacity"]="";s["-khtml-opacity"]=""}};var getComputedHeight=function(el){var h=Math.max(el.offsetHeight,el.clientHeight);if(!h){h=parseInt(SL.getStyle(el,"height"),10)||0;if(!client.isBorderBox){h+=parseInt(SL.getStyle(el,"padding-top"),10)+parseInt(SL.getStyle(el,"padding-bottom"),10)+parseInt(SL.getStyle(el,"border-top-width"),10)+parseInt(SL.getStyle(el,"border-bottom-width"),10)}}return h};var getPlayer=function(url){var m=url.match(RE.domain);var d=m&&document.domain==m[1];if(url.indexOf("#")>-1&&d){return"inline"}var q=url.indexOf("?");if(q>-1){url=url.substring(0,q)}if(RE.img.test(url)){return"img"}if(RE.swf.test(url)){return plugins.fla?"swf":"unsupported-swf"}if(RE.flv.test(url)){return plugins.fla?"flv":"unsupported-flv"}if(RE.qt.test(url)){return plugins.qt?"qt":"unsupported-qt"}if(RE.wmp.test(url)){if(plugins.wmp){return"wmp"}if(plugins.f4m){return"qt"}if(client.isMac){return plugins.qt?"unsupported-f4m":"unsupported-qtf4m"}return"unsupported-wmp"}else{if(RE.qtwmp.test(url)){if(plugins.qt){return"qt"}if(plugins.wmp){return"wmp"}return client.isMac?"unsupported-qt":"unsupported-qtwmp"}else{if(!d||RE.iframe.test(url)){return"iframe"}}}return"unsupported"};var handleClick=function(ev){var link;if(isLink(this)){link=this}else{link=SL.getTarget(ev);while(!isLink(link)&&link.parentNode){link=link.parentNode}}if(link){SB.open(link);if(gallery.length){SL.preventDefault(ev)}}};var toggleNav=function(id,on){var el=SL.get("shadowbox_nav_"+id);if(el){el.style.display=on?"":"none"}};var buildBars=function(cb){var obj=gallery[current];var title_i=SL.get("shadowbox_title_inner");title_i.innerHTML=obj.title||"";var nav=SL.get("shadowbox_nav");if(nav){var c,n,pl,pa,p;if(options.displayNav){c=true;var len=gallery.length;if(len>1){if(options.continuous){n=p=true}else{n=(len-1)>current;p=current>0}}if(options.slideshowDelay>0&&hasNext()){pa=slide_timer!="paused";pl=!pa}}else{c=n=pl=pa=p=false}toggleNav("close",c);toggleNav("next",n);toggleNav("play",pl);toggleNav("pause",pa);toggleNav("previous",p)}var counter=SL.get("shadowbox_counter");if(counter){var co="";if(options.displayCounter&&gallery.length>1){if(options.counterType=="skip"){var i=0,len=gallery.length,end=len;var limit=parseInt(options.counterLimit);if(limitlen){end-=len}}while(i!=end){if(i==len){i=0}co+='"}}else{co=(current+1)+" "+SB.LANG.of+" "+len}}counter.innerHTML=co}cb()};var hideBars=function(anim,cb){var obj=gallery[current];var title=SL.get("shadowbox_title");var info=SL.get("shadowbox_info");var title_i=SL.get("shadowbox_title_inner");var info_i=SL.get("shadowbox_info_inner");var fn=function(){buildBars(cb)};var title_h=getComputedHeight(title);var info_h=getComputedHeight(info)*-1;if(anim){animate(title_i,"margin-top",title_h,0.35);animate(info_i,"margin-top",info_h,0.35,fn)}else{SL.setStyle(title_i,"margin-top",title_h+"px");SL.setStyle(info_i,"margin-top",info_h+"px");fn()}};var showBars=function(cb){var title_i=SL.get("shadowbox_title_inner");var info_i=SL.get("shadowbox_info_inner");var t=title_i.innerHTML!="";if(t){animate(title_i,"margin-top",0,0.35)}animate(info_i,"margin-top",0,0.35,cb)};var loadContent=function(){var obj=gallery[current];if(!obj){return }var changing=false;if(content){content.remove();changing=true}var p=obj.player=="inline"?"html":obj.player;if(typeof SB[p]!="function"){SB.raise("Unknown player "+obj.player)}content=new SB[p](content_id,obj);listenKeys(false);toggleLoading(true);hideBars(changing,function(){if(!content){return }if(!changing){SL.get("shadowbox").style.display=""}var fn=function(){resizeContent(function(){if(!content){return }showBars(function(){if(!content){return }SL.get("shadowbox_body_inner").innerHTML=SL.createHTML(content.markup(dims));toggleLoading(false,function(){if(!content){return }if(typeof content.onLoad=="function"){content.onLoad()}if(options.onFinish&&typeof options.onFinish=="function"){options.onFinish(gallery[current])}if(slide_timer!="paused"){SB.play()}listenKeys(true)})})})};if(typeof content.ready!="undefined"){var id=setInterval(function(){if(content){if(content.ready){clearInterval(id);id=null;fn()}}else{clearInterval(id);id=null}},100)}else{fn()}});if(gallery.length>1){var next=gallery[current+1]||gallery[0];if(next.player=="img"){var a=new Image();a.src=next.content}var prev=gallery[current-1]||gallery[gallery.length-1];if(prev.player=="img"){var b=new Image();b.src=prev.content}}};var setDimensions=function(height,width,resizable){resizable=resizable||false;var sb=SL.get("shadowbox_body");var h=height=parseInt(height);var w=width=parseInt(width);var view_h=SL.getViewportHeight();var view_w=SL.getViewportWidth();var border_w=parseInt(SL.getStyle(sb,"border-left-width"),10)+parseInt(SL.getStyle(sb,"border-right-width"),10);var extra_w=border_w+2*options.viewportPadding;if(w+extra_w>=view_w){w=view_w-extra_w}var border_h=parseInt(SL.getStyle(sb,"border-top-width"),10)+parseInt(SL.getStyle(sb,"border-bottom-width"),10);var bar_h=getComputedHeight(SL.get("shadowbox_title"))+getComputedHeight(SL.get("shadowbox_info"));var extra_h=border_h+2*options.viewportPadding+bar_h;if(h+extra_h>=view_h){h=view_h-extra_h}var drag=false;var resize_h=height;var resize_w=width;var handle=options.handleOversize;if(resizable&&(handle=="resize"||handle=="drag")){var change_h=(height-h)/height;var change_w=(width-w)/width;if(handle=="resize"){if(change_h>change_w){w=Math.round((width/height)*h)}else{if(change_w>change_h){h=Math.round((height/width)*w)}}resize_w=w;resize_h=h}else{var link=gallery[current];if(link){drag=link.player=="img"&&(change_h>0||change_w>0)}}}dims={height:h+border_h+bar_h,width:w+border_w,inner_h:h,inner_w:w,top:(view_h-(h+extra_h))/2+options.viewportPadding,resize_h:resize_h,resize_w:resize_w,drag:drag}};var resizeContent=function(cb){if(!content){return }setDimensions(content.height,content.width,content.resizable);if(cb){switch(options.animSequence){case"hw":adjustHeight(dims.inner_h,dims.top,true,function(){adjustWidth(dims.width,true,cb)});break;case"wh":adjustWidth(dims.width,true,function(){adjustHeight(dims.inner_h,dims.top,true,cb)});break;case"sync":default:adjustWidth(dims.width,true);adjustHeight(dims.inner_h,dims.top,true,cb)}}else{adjustWidth(dims.width,false);adjustHeight(dims.inner_h,dims.top,false);var c=SL.get(content_id);if(c){if(content.resizable&&options.handleOversize=="resize"){c.height=dims.resize_h;c.width=dims.resize_w}if(gallery[current].player=="img"&&options.handleOversize=="drag"){var top=parseInt(SL.getStyle(c,"top"));if(top+content.height1&&(current!=gallery.length-1||options.continuous)};var toggleVisible=function(cb){var els,v=(cb)?"hidden":"visible";var hide=["select","object","embed"];for(var i=0;i');document.write('