/**
 * Cryosoft.cz v1.0 - 4b570335b2b173a47c5cc9cfeaa223fc2ad2376f
 * --
 * copyright (c) 2011 Tomas Flekna 
 * compiled: 16.11.2011 
 **/
 
 /* FancyBox */(function(b){var m,u,x,g,D,i,z,A,B,p=0,e={},q=[],n=0,c={},j=[],E=null,s=new Image,G=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,S=/[^\.]\.(swf)\s*$/i,H,I=1,k,l,h=false,y=b.extend(b("<div/>")[0],{prop:0}),v=0,O=!b.support.opacity&&!window.XMLHttpRequest,J=function(){u.hide();s.onerror=s.onload=null;E&&E.abort();m.empty()},P=function(){b.fancybox('<p id="fancybox_error">The requested content cannot be loaded.<br />Please try again later.</p>',{scrolling:"no",padding:20,transitionIn:"none",transitionOut:"none"})},K=function(){return[b(window).width(),b(window).height(),b(document).scrollLeft(),b(document).scrollTop()]},T=function(){var a=K(),d={},f=c.margin,o=c.autoScale,t=(20+f)*2,w=(20+f)*2,r=c.padding*2;if(c.width.toString().indexOf("%")>-1){d.width=a[0]*parseFloat(c.width)/100-40;o=false}else d.width=c.width+r;if(c.height.toString().indexOf("%")>-1){d.height=a[1]*parseFloat(c.height)/100-40;o=false}else d.height=c.height+r;if(o&&(d.width>a[0]-t||d.height>a[1]-w))if(e.type=="image"||e.type=="swf"){t+=r;w+=r;o=Math.min(Math.min(a[0]-t,c.width)/c.width,Math.min(a[1]-w,c.height)/c.height);d.width=Math.round(o*(d.width-r))+r;d.height=Math.round(o*(d.height-r))+r}else{d.width=Math.min(d.width,a[0]-t);d.height=Math.min(d.height,a[1]-w)}d.top=a[3]+(a[1]-(d.height+40))*0.5;d.left=a[2]+(a[0]-(d.width+40))*0.5;if(c.autoScale===false){d.top=Math.max(a[3]+f,d.top);d.left=Math.max(a[2]+f,d.left)}return d},U=function(a){if(a&&a.length)switch(c.titlePosition){case "inside":return a;case "over":return'<span id="fancybox-title-over">'+a+"</span>";default:return'<span id="fancybox-title-wrap"><span id="fancybox-title-left"></span><span id="fancybox-title-main">'+a+'</span><span id="fancybox-title-right"></span></span>'}return false},V=function(){var a=c.title,d=l.width-c.padding*2,f="fancybox-title-"+c.titlePosition;b("#fancybox-title").remove();v=0;if(c.titleShow!==false){a=b.isFunction(c.titleFormat)?c.titleFormat(a,j,n,c):U(a);if(!(!a||a==="")){b('<div id="fancybox-title" class="'+f+'" />').css({width:d,paddingLeft:c.padding,paddingRight:c.padding}).html(a).appendTo("body");switch(c.titlePosition){case "inside":v=b("#fancybox-title").outerHeight(true)-c.padding;l.height+=v;break;case "over":b("#fancybox-title").css("bottom",c.padding);break;default:b("#fancybox-title").css("bottom",b("#fancybox-title").outerHeight(true)*-1);break}b("#fancybox-title").appendTo(D).hide()}}},W=function(){b(document).unbind("keydown.fb").bind("keydown.fb",function(a){if(a.keyCode==27&&c.enableEscapeButton){a.preventDefault();b.fancybox.close()}else if(a.keyCode==37){a.preventDefault();b.fancybox.prev()}else if(a.keyCode==39){a.preventDefault();b.fancybox.next()}});if(b.fn.mousewheel){g.unbind("mousewheel.fb");j.length>1&&g.bind("mousewheel.fb",function(a,d){a.preventDefault();h||d===0||(d>0?b.fancybox.prev():b.fancybox.next())})}if(c.showNavArrows){if(c.cyclic&&j.length>1||n!==0)A.show();if(c.cyclic&&j.length>1||n!=j.length-1)B.show()}},X=function(){var a,d;if(j.length-1>n){a=j[n+1].href;if(typeof a!=="undefined"&&a.match(G)){d=new Image;d.src=a}}if(n>0){a=j[n-1].href;if(typeof a!=="undefined"&&a.match(G)){d=new Image;d.src=a}}},L=function(){i.css("overflow",c.scrolling=="auto"?c.type=="image"||c.type=="iframe"||c.type=="swf"?"hidden":"auto":c.scrolling=="yes"?"auto":"visible");if(!b.support.opacity){i.get(0).style.removeAttribute("filter");g.get(0).style.removeAttribute("filter")}b("#fancybox-title").show();c.hideOnContentClick&&i.one("click",b.fancybox.close);c.hideOnOverlayClick&&x.one("click",b.fancybox.close);c.showCloseButton&&z.show();W();b(window).bind("resize.fb",b.fancybox.center);c.centerOnScroll?b(window).bind("scroll.fb",b.fancybox.center):b(window).unbind("scroll.fb");b.isFunction(c.onComplete)&&c.onComplete(j,n,c);h=false;X()},M=function(a){var d=Math.round(k.width+(l.width-k.width)*a),f=Math.round(k.height+(l.height-k.height)*a),o=Math.round(k.top+(l.top-k.top)*a),t=Math.round(k.left+(l.left-k.left)*a);g.css({width:d+"px",height:f+"px",top:o+"px",left:t+"px"});d=Math.max(d-c.padding*2,0);f=Math.max(f-(c.padding*2+v*a),0);i.css({width:d+"px",height:f+"px"});if(typeof l.opacity!=="undefined")g.css("opacity",a<0.5?0.5:a)},Y=function(a){var d=a.offset();d.top+=parseFloat(a.css("paddingTop"))||0;d.left+=parseFloat(a.css("paddingLeft"))||0;d.top+=parseFloat(a.css("border-top-width"))||0;d.left+=parseFloat(a.css("border-left-width"))||0;d.width=a.width();d.height=a.height();return d},Q=function(){var a=e.orig?b(e.orig):false,d={};if(a&&a.length){a=Y(a);d={width:a.width+c.padding*2,height:a.height+c.padding*2,top:a.top-c.padding-20,left:a.left-c.padding-20}}else{a=K();d={width:1,height:1,top:a[3]+a[1]*0.5,left:a[2]+a[0]*0.5}}return d},N=function(){u.hide();if(g.is(":visible")&&b.isFunction(c.onCleanup))if(c.onCleanup(j,n,c)===false){b.event.trigger("fancybox-cancel");h=false;return}j=q;n=p;c=e;i.get(0).scrollTop=0;i.get(0).scrollLeft=0;if(c.overlayShow){O&&b("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});x.css({"background-color":c.overlayColor,opacity:c.overlayOpacity}).unbind().show()}l=T();V();if(g.is(":visible")){b(z.add(A).add(B)).hide();var a=g.position(),d;k={top:a.top,left:a.left,width:g.width(),height:g.height()};d=k.width==l.width&&k.height==l.height;i.fadeOut(c.changeFade,function(){var f=function(){i.html(m.contents()).fadeIn(c.changeFade,L)};b.event.trigger("fancybox-change");i.empty().css("overflow","hidden");if(d){i.css({top:c.padding,left:c.padding,width:Math.max(l.width-c.padding*2,1),height:Math.max(l.height-c.padding*2-v,1)});f()}else{i.css({top:c.padding,left:c.padding,width:Math.max(k.width-c.padding*2,1),height:Math.max(k.height-c.padding*2,1)});y.prop=0;b(y).animate({prop:1},{duration:c.changeSpeed,easing:c.easingChange,step:M,complete:f})}})}else{g.css("opacity",1);if(c.transitionIn=="elastic"){k=Q();i.css({top:c.padding,left:c.padding,width:Math.max(k.width-c.padding*2,1),height:Math.max(k.height-c.padding*2,1)}).html(m.contents());g.css(k).show();if(c.opacity)l.opacity=0;y.prop=0;b(y).animate({prop:1},{duration:c.speedIn,easing:c.easingIn,step:M,complete:L})}else{i.css({top:c.padding,left:c.padding,width:Math.max(l.width-c.padding*2,1),height:Math.max(l.height-c.padding*2-v,1)}).html(m.contents());g.css(l).fadeIn(c.transitionIn=="none"?0:c.speedIn,L)}}},F=function(){m.width(e.width);m.height(e.height);if(e.width=="auto")e.width=m.width();if(e.height=="auto")e.height=m.height();N()},Z=function(){h=true;e.width=s.width;e.height=s.height;b("<img />").attr({id:"fancybox-img",src:s.src,alt:e.title}).appendTo(m);N()},C=function(){J();var a=q[p],d,f,o,t,w;e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data("fancybox")=="undefined"?e:b(a).data("fancybox"));o=a.title||b(a).title||e.title||"";if(a.nodeName&&!e.orig)e.orig=b(a).children("img:first").length?b(a).children("img:first"):b(a);if(o===""&&e.orig)o=e.orig.attr("alt");d=a.nodeName&&/^(?:javascript|#)/i.test(a.href)?e.href||null:e.href||a.href||null;if(e.type){f=e.type;if(!d)d=e.content}else if(e.content)f="html";else if(d)if(d.match(G))f="image";else if(d.match(S))f="swf";else if(b(a).hasClass("iframe"))f="iframe";else if(d.match(/#/)){a=d.substr(d.indexOf("#"));f=b(a).length>0?"inline":"ajax"}else f="ajax";else f="inline";e.type=f;e.href=d;e.title=o;if(e.autoDimensions&&e.type!=="iframe"&&e.type!=="swf"){e.width="auto";e.height="auto"}if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick=false;e.enableEscapeButton=false;e.showCloseButton=false}if(b.isFunction(e.onStart))if(e.onStart(q,p,e)===false){h=false;return}m.css("padding",20+e.padding+e.margin);b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){b(this).replaceWith(i.children())});switch(f){case "html":m.html(e.content);F();break;case "inline":b('<div class="fancybox-inline-tmp" />').hide().insertBefore(b(a)).bind("fancybox-cleanup",function(){b(this).replaceWith(i.children())}).bind("fancybox-cancel",function(){b(this).replaceWith(m.children())});b(a).appendTo(m);F();break;case "image":h=false;b.fancybox.showActivity();s=new Image;s.onerror=function(){P()};s.onload=function(){s.onerror=null;s.onload=null;Z()};s.src=d;break;case "swf":t='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+e.width+'" height="'+e.height+'"><param name="movie" value="'+d+'"></param>';w="";b.each(e.swf,function(r,R){t+='<param name="'+r+'" value="'+R+'"></param>';w+=" "+r+'="'+R+'"'});t+='<embed src="'+d+'" type="application/x-shockwave-flash" width="'+e.width+'" height="'+e.height+'"'+w+"></embed></object>";m.html(t);F();break;case "ajax":a=d.split("#",2);f=e.ajax.data||{};if(a.length>1){d=a[0];if(typeof f=="string")f+="&selector="+a[1];else f.selector=a[1]}h=false;b.fancybox.showActivity();E=b.ajax(b.extend(e.ajax,{url:d,data:f,error:P,success:function(r){if(E.status==200){m.html(r);F()}}}));break;case "iframe":b('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" scrolling="'+e.scrolling+'" src="'+e.href+'"></iframe>').appendTo(m);N();break}},$=function(){if(u.is(":visible")){b("div",u).css("top",I*-40+"px");I=(I+1)%12}else clearInterval(H)},aa=function(){if(!b("#fancybox-wrap").length){b("body").append(m=b('<div id="fancybox-tmp"></div>'),u=b('<div id="fancybox-loading"><div></div></div>'),x=b('<div id="fancybox-overlay"></div>'),g=b('<div id="fancybox-wrap"></div>'));if(!b.support.opacity){g.addClass("fancybox-ie");u.addClass("fancybox-ie")}D=b('<div id="fancybox-outer"></div>').append('<div class="fancy-bg" id="fancy-bg-n"></div><div class="fancy-bg" id="fancy-bg-ne"></div><div class="fancy-bg" id="fancy-bg-e"></div><div class="fancy-bg" id="fancy-bg-se"></div><div class="fancy-bg" id="fancy-bg-s"></div><div class="fancy-bg" id="fancy-bg-sw"></div><div class="fancy-bg" id="fancy-bg-w"></div><div class="fancy-bg" id="fancy-bg-nw"></div>').appendTo(g);D.append(i=b('<div id="fancybox-inner"></div>'),z=b('<a id="fancybox-close"></a>'),A=b('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),B=b('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));z.click(b.fancybox.close);u.click(b.fancybox.cancel);A.click(function(a){a.preventDefault();b.fancybox.prev()});B.click(function(a){a.preventDefault();b.fancybox.next()});if(O){x.get(0).style.setExpression("height","document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'");u.get(0).style.setExpression("top","(-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px'");D.prepend('<iframe id="fancybox-hide-sel-frame" src="javascript:\'\';" scrolling="no" frameborder="0" ></iframe>')}}};b.fn.fancybox=function(a){b(this).data("fancybox",b.extend({},a,b.metadata?b(this).metadata():{})).unbind("click.fb").bind("click.fb",function(d){d.preventDefault();if(!h){h=true;b(this).blur();q=[];p=0;d=b(this).attr("rel")||"";if(!d||d==""||d==="nofollow")q.push(this);else{q=b("a[rel="+d+"], area[rel="+d+"]");p=q.index(this)}C();return false}});return this};b.fancybox=function(a,d){if(!h){h=true;d=typeof d!=="undefined"?d:{};q=[];p=d.index||0;if(b.isArray(a)){for(var f=0,o=a.length;f<o;f++)if(typeof a[f]=="object")b(a[f]).data("fancybox",b.extend({},d,a[f]));else a[f]=b({}).data("fancybox",b.extend({content:a[f]},d));q=jQuery.merge(q,a)}else{if(typeof a=="object")b(a).data("fancybox",b.extend({},d,a));else a=b({}).data("fancybox",b.extend({content:a},d));q.push(a)}if(p>q.length||p<0)p=0;C()}};b.fancybox.showActivity=function(){clearInterval(H);u.show();H=setInterval($,66)};b.fancybox.hideActivity=function(){u.hide()};b.fancybox.next=function(){return b.fancybox.pos(n+1)};b.fancybox.prev=function(){return b.fancybox.pos(n-1)};b.fancybox.pos=function(a){if(!h){a=parseInt(a,10);if(a>-1&&j.length>a){p=a;C()}if(c.cyclic&&j.length>1&&a<0){p=j.length-1;C()}if(c.cyclic&&j.length>1&&a>=j.length){p=0;C()}}};b.fancybox.cancel=function(){if(!h){h=true;b.event.trigger("fancybox-cancel");J();e&&b.isFunction(e.onCancel)&&e.onCancel(q,p,e);h=false}};b.fancybox.close=function(){function a(){x.fadeOut("fast");g.hide();b.event.trigger("fancybox-cleanup");i.empty();b.isFunction(c.onClosed)&&c.onClosed(j,n,c);j=e=[];n=p=0;c=e={};h=false}if(!(h||g.is(":hidden"))){h=true;if(c&&b.isFunction(c.onCleanup))if(c.onCleanup(j,n,c)===false){h=false;return}J();b(z.add(A).add(B)).hide();b("#fancybox-title").remove();g.add(i).add(x).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");i.css("overflow","hidden");if(c.transitionOut=="elastic"){k=Q();var d=g.position();l={top:d.top,left:d.left,width:g.width(),height:g.height()};if(c.opacity)l.opacity=1;y.prop=1;b(y).animate({prop:0},{duration:c.speedOut,easing:c.easingOut,step:M,complete:a})}else g.fadeOut(c.transitionOut=="none"?0:c.speedOut,a)}};b.fancybox.resize=function(){var a,d;if(!(h||g.is(":hidden"))){h=true;a=i.wrapInner("<div style='overflow:auto'></div>").children();d=a.height();g.css({height:d+c.padding*2+v});i.css({height:d});a.replaceWith(a.children());b.fancybox.center()}};b.fancybox.center=function(){h=true;var a=K(),d=c.margin,f={};f.top=a[3]+(a[1]-(g.height()-v+40))*0.5;f.left=a[2]+(a[0]-(g.width()+40))*0.5;f.top=Math.max(a[3]+d,f.top);f.left=Math.max(a[2]+d,f.left);g.css(f);h=false};b.fn.fancybox.defaults={padding:10,margin:20,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.3,overlayColor:"#666",titleShow:true,titlePosition:"outside",titleFormat:null,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,onStart:null,onCancel:null,onComplete:null,onCleanup:null,onClosed:null};b(document).ready(function(){aa()})})(jQuery);/* CUFON script - Copyright (c) 2010 Simo Kinnunen., Licensed under the MIT license. */var Cufon = (function() {var api = function() {return api.replace.apply(null, arguments);};var DOM = api.DOM = {ready: (function() {var complete = false, readyStatus = { loaded: 1, complete: 1 };var queue = [], perform = function() {if (complete) return;complete = true;for (var fn; fn = queue.shift(); fn());};if (document.addEventListener) {document.addEventListener('DOMContentLoaded', perform, false);window.addEventListener('pageshow', perform, false);}if (!window.opera && document.readyState) (function() {readyStatus[document.readyState] ? perform() : setTimeout(arguments.callee, 10);})();if (document.readyState && document.createStyleSheet) (function() {try {document.body.doScroll('left');perform();}catch (e) {setTimeout(arguments.callee, 1);}})();addEvent(window, 'load', perform);return function(listener) {if (!arguments.length) perform();else complete ? listener() : queue.push(listener);};})(),root: function() {return document.documentElement || document.body;}};var CSS = api.CSS = {Size: function(value, base) {this.value = parseFloat(value);this.unit = String(value).match(/[a-z%]*$/)[0] || 'px';this.convert = function(value) {return value / base * this.value;};this.convertFrom = function(value) {return value / this.value * base;};this.toString = function() {return this.value + this.unit;};},addClass: function(el, className) {var current = el.className;el.className = current + (current && ' ') + className;return el;},color: cached(function(value) {var parsed = {};parsed.color = value.replace(/^rgba\((.*?),\s*([\d.]+)\)/, function($0, $1, $2) {parsed.opacity = parseFloat($2);return 'rgb(' + $1 + ')';});return parsed;}),fontStretch: cached(function(value) {if (typeof value == 'number') return value;if (/%$/.test(value)) return parseFloat(value) / 100;return {'ultra-condensed': 0.5,'extra-condensed': 0.625,condensed: 0.75,'semi-condensed': 0.875,'semi-expanded': 1.125,expanded: 1.25,'extra-expanded': 1.5,'ultra-expanded': 2}[value] || 1;}),getStyle: function(el) {var view = document.defaultView;if (view && view.getComputedStyle) return new Style(view.getComputedStyle(el, null));if (el.currentStyle) return new Style(el.currentStyle);return new Style(el.style);},gradient: cached(function(value) {var gradient = {id: value,type: value.match(/^-([a-z]+)-gradient\(/)[1],stops: []}, colors = value.substr(value.indexOf('(')).match(/([\d.]+=)?(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)/ig);for (var i = 0, l = colors.length, stop; i < l; ++i) {stop = colors[i].split('=', 2).reverse();gradient.stops.push([ stop[1] || i / (l - 1), stop[0] ]);}return gradient;}),quotedList: cached(function(value) {var list = [], re = /\s*((["'])([\s\S]*?[^\\])\2|[^,]+)\s*/g, match;while (match = re.exec(value)) list.push(match[3] || match[1]);return list;}),recognizesMedia: cached(function(media) {var el = document.createElement('style'), sheet, container, supported;el.type = 'text/css';el.media = media;try {el.appendChild(document.createTextNode('/**/'));} catch (e) {}container = elementsByTagName('head')[0];container.insertBefore(el, container.firstChild);sheet = (el.sheet || el.styleSheet);supported = sheet && !sheet.disabled;container.removeChild(el);return supported;}),removeClass: function(el, className) {var re = RegExp('(?:^|\\s+)' + className +  '(?=\\s|$)', 'g');el.className = el.className.replace(re, '');return el;},supports: function(property, value) {var checker = document.createElement('span').style;if (checker[property] === undefined) return false;checker[property] = value;return checker[property] === value;},textAlign: function(word, style, position, wordCount) {if (style.get('textAlign') == 'right') {if (position > 0) word = ' ' + word;}else if (position < wordCount - 1) word += ' ';return word;},textShadow: cached(function(value) {if (value == 'none') return null;var shadows = [], currentShadow = {}, result, offCount = 0;var re = /(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)|(-?[\d.]+[a-z%]*)|,/ig;while (result = re.exec(value)) {if (result[0] == ',') {shadows.push(currentShadow);currentShadow = {};offCount = 0;}else if (result[1]) {currentShadow.color = result[1];}else {currentShadow[[ 'offX', 'offY', 'blur' ][offCount++]] = result[2];}}shadows.push(currentShadow);return shadows;}),textTransform: (function() {var map = {uppercase: function(s) {return s.toUpperCase();},lowercase: function(s) {return s.toLowerCase();},capitalize: function(s) {return s.replace(/(?:^|\s)./g, function($0) {return $0.toUpperCase();});}};return function(text, style) {var transform = map[style.get('textTransform')];return transform ? transform(text) : text;};})(),whiteSpace: (function() {var ignore = {inline: 1,'inline-block': 1,'run-in': 1};var wsStart = /^\s+/, wsEnd = /\s+$/;return function(text, style, node, previousElement, simple) {if (simple) return text.replace(wsStart, '').replace(wsEnd, '');if (previousElement) {if (previousElement.nodeName.toLowerCase() == 'br') {text = text.replace(wsStart, '');}}if (ignore[style.get('display')]) return text;if (!node.previousSibling) text = text.replace(wsStart, '');if (!node.nextSibling) text = text.replace(wsEnd, '');return text;};})()};CSS.ready = (function() {var complete = !CSS.recognizesMedia('all'), hasLayout = false;var queue = [], perform = function() {complete = true;for (var fn; fn = queue.shift(); fn());};var links = elementsByTagName('link'), styles = elementsByTagName('style');function isContainerReady(el) {return el.disabled || isSheetReady(el.sheet, el.media || 'screen');}function isSheetReady(sheet, media) {if (!CSS.recognizesMedia(media || 'all')) return true;if (!sheet || sheet.disabled) return false;try {var rules = sheet.cssRules, rule;if (rules) {search: for (var i = 0, l = rules.length; rule = rules[i], i < l; ++i) {switch (rule.type) {case 2:break;case 3:if (!isSheetReady(rule.styleSheet, rule.media.mediaText)) return false;break;default:break search;}}}}catch (e) {}return true;}function allStylesLoaded() {if (document.createStyleSheet) return true;var el, i;for (i = 0; el = links[i]; ++i) {if (el.rel.toLowerCase() == 'stylesheet' && !isContainerReady(el)) return false;}for (i = 0; el = styles[i]; ++i) {if (!isContainerReady(el)) return false;}return true;}DOM.ready(function() {if (!hasLayout) hasLayout = CSS.getStyle(document.body).isUsable();if (complete || (hasLayout && allStylesLoaded())) perform();else setTimeout(arguments.callee, 10);});return function(listener) {if (complete) listener();else queue.push(listener);};})();function Font(data) {var face = this.face = data.face, wordSeparators = {'\u0020': 1,'\u00a0': 1,'\u3000': 1};this.glyphs = (function(glyphs) {var key, fallbacks = {'\u2011': '\u002d','\u00ad': '\u2011'};for (key in fallbacks) {if (!hasOwnProperty(fallbacks, key)) continue;if (!glyphs[key]) glyphs[key] = glyphs[fallbacks[key]];}return glyphs;})(data.glyphs);this.w = data.w;this.baseSize = parseInt(face['units-per-em'], 10);this.family = face['font-family'].toLowerCase();this.weight = face['font-weight'];this.style = face['font-style'] || 'normal';this.viewBox = (function () {var parts = face.bbox.split(/\s+/);var box = {minX: parseInt(parts[0], 10),minY: parseInt(parts[1], 10),maxX: parseInt(parts[2], 10),maxY: parseInt(parts[3], 10)};box.width = box.maxX - box.minX;box.height = box.maxY - box.minY;box.toString = function() {return [ this.minX, this.minY, this.width, this.height ].join(' ');};return box;})();this.ascent = -parseInt(face.ascent, 10);this.descent = -parseInt(face.descent, 10);this.height = -this.ascent + this.descent;this.spacing = function(chars, letterSpacing, wordSpacing) {var glyphs = this.glyphs, glyph,kerning, k,jumps = [],width = 0, w,i = -1, j = -1, chr;while (chr = chars[++i]) {glyph = glyphs[chr] || this.missingGlyph;if (!glyph) continue;if (kerning) {width -= k = kerning[chr] || 0;jumps[j] -= k;}w = glyph.w;if (isNaN(w)) w = +this.w;if (w > 0) {w += letterSpacing;if (wordSeparators[chr]) w += wordSpacing;}width += jumps[++j] = ~~w;kerning = glyph.k;}jumps.total = width;return jumps;};}function FontFamily() {var styles = {}, mapping = {oblique: 'italic',italic: 'oblique'};this.add = function(font) {(styles[font.style] || (styles[font.style] = {}))[font.weight] = font;};this.get = function(style, weight) {var weights = styles[style] || styles[mapping[style]]|| styles.normal || styles.italic || styles.oblique;if (!weights) return null;weight = {normal: 400,bold: 700}[weight] || parseInt(weight, 10);if (weights[weight]) return weights[weight];var up = {1: 1,99: 0}[weight % 100], alts = [], min, max;if (up === undefined) up = weight > 400;if (weight == 500) weight = 400;for (var alt in weights) {if (!hasOwnProperty(weights, alt)) continue;alt = parseInt(alt, 10);if (!min || alt < min) min = alt;if (!max || alt > max) max = alt;alts.push(alt);}if (weight < min) weight = min;if (weight > max) weight = max;alts.sort(function(a, b) {return (up? (a >= weight && b >= weight) ? a < b : a > b: (a <= weight && b <= weight) ? a > b : a < b) ? -1 : 1;});return weights[alts[0]];};}function HoverHandler() {function contains(node, anotherNode) {try {if (node.contains) return node.contains(anotherNode);return node.compareDocumentPosition(anotherNode) & 16;}catch(e) {}return false;}function onOverOut(e) {var related = e.relatedTarget;if (related && contains(this, related)) return;trigger(this, e.type == 'mouseover');}function onEnterLeave(e) {trigger(this, e.type == 'mouseenter');}function trigger(el, hoverState) {setTimeout(function() {var options = sharedStorage.get(el).options;api.replace(el, hoverState ? merge(options, options.hover) : options, true);}, 10);}this.attach = function(el) {if (el.onmouseenter === undefined) {addEvent(el, 'mouseover', onOverOut);addEvent(el, 'mouseout', onOverOut);}else {addEvent(el, 'mouseenter', onEnterLeave);addEvent(el, 'mouseleave', onEnterLeave);}};}function ReplaceHistory() {var list = [], map = {};function filter(keys) {var values = [], key;for (var i = 0; key = keys[i]; ++i) values[i] = list[map[key]];return values;}this.add = function(key, args) {map[key] = list.push(args) - 1;};this.repeat = function() {var snapshot = arguments.length ? filter(arguments) : list, args;for (var i = 0; args = snapshot[i++];) api.replace(args[0], args[1], true);};}function Storage() {var map = {}, at = 0;function identify(el) {return el.cufid || (el.cufid = ++at);}this.get = function(el) {var id = identify(el);return map[id] || (map[id] = {});};}function Style(style) {var custom = {}, sizes = {};this.extend = function(styles) {for (var property in styles) {if (hasOwnProperty(styles, property)) custom[property] = styles[property];}return this;};this.get = function(property) {return custom[property] != undefined ? custom[property] : style[property];};this.getSize = function(property, base) {return sizes[property] || (sizes[property] = new CSS.Size(this.get(property), base));};this.isUsable = function() {return !!style;};}function addEvent(el, type, listener) {if (el.addEventListener) {el.addEventListener(type, listener, false);}else if (el.attachEvent) {el.attachEvent('on' + type, function() {return listener.call(el, window.event);});}}function attach(el, options) {var storage = sharedStorage.get(el);if (storage.options) return el;if (options.hover && options.hoverables[el.nodeName.toLowerCase()]) {hoverHandler.attach(el);}storage.options = options;return el;}function cached(fun) {var cache = {};return function(key) {if (!hasOwnProperty(cache, key)) cache[key] = fun.apply(null, arguments);return cache[key];};}function getFont(el, style) {var families = CSS.quotedList(style.get('fontFamily').toLowerCase()), family;for (var i = 0; family = families[i]; ++i) {if (fonts[family]) return fonts[family].get(style.get('fontStyle'), style.get('fontWeight'));}return null;}function elementsByTagName(query) {return document.getElementsByTagName(query);}function hasOwnProperty(obj, property) {return obj.hasOwnProperty(property);}function merge() {var merged = {}, arg, key;for (var i = 0, l = arguments.length; arg = arguments[i], i < l; ++i) {for (key in arg) {if (hasOwnProperty(arg, key)) merged[key] = arg[key];}}return merged;}function process(font, text, style, options, node, el) {var fragment = document.createDocumentFragment(), processed;if (text === '') return fragment;var separate = options.separate;var parts = text.split(separators[separate]), needsAligning = (separate == 'words');if (needsAligning && HAS_BROKEN_REGEXP) {if (/^\s/.test(text)) parts.unshift('');if (/\s$/.test(text)) parts.push('');}for (var i = 0, l = parts.length; i < l; ++i) {processed = engines[options.engine](font,needsAligning ? CSS.textAlign(parts[i], style, i, l) : parts[i],style, options, node, el, i < l - 1);if (processed) fragment.appendChild(processed);}return fragment;}function replaceElement(el, options) {var name = el.nodeName.toLowerCase();if (options.ignore[name]) return;if (options.ignoreClass && options.ignoreClass.test(el.className)) return;if (options.onBeforeReplace) options.onBeforeReplace(el, options);var replace = !options.textless[name], simple = (options.trim === 'simple');var style = CSS.getStyle(attach(el, options)).extend(options);if (parseFloat(style.get('fontSize')) === 0) return;var font = getFont(el, style), node, type, next, anchor, text, lastElement;var isShy = options.softHyphens, anyShy = false, pos, shy, reShy = /\u00ad/g;var modifyText = options.modifyText;if (!font) return;for (node = el.firstChild; node; node = next) {type = node.nodeType;next = node.nextSibling;if (replace && type == 3) {if (isShy && el.nodeName.toLowerCase() != TAG_SHY) {pos = node.data.indexOf('\u00ad');if (pos >= 0) {node.splitText(pos);next = node.nextSibling;next.deleteData(0, 1);shy = document.createElement(TAG_SHY);shy.appendChild(document.createTextNode('\u00ad'));el.insertBefore(shy, next);next = shy;anyShy = true;}}if (anchor) {anchor.appendData(node.data);el.removeChild(node);}else anchor = node;if (next) continue;}if (anchor) {text = anchor.data;if (!isShy) text = text.replace(reShy, '');text = CSS.whiteSpace(text, style, anchor, lastElement, simple);if (modifyText) text = modifyText(text, anchor, el, options);el.replaceChild(process(font, text, style, options, node, el), anchor);anchor = null;}if (type == 1) {if (node.firstChild) {if (node.nodeName.toLowerCase() == 'cufon') {engines[options.engine](font, null, style, options, node, el);}else arguments.callee(node, options);}lastElement = node;}}if (isShy && anyShy) {updateShy(el);if (!trackingShy) addEvent(window, 'resize', updateShyOnResize);trackingShy = true;}if (options.onAfterReplace) options.onAfterReplace(el, options);}function updateShy(context) {var shys, shy, parent, glue, newGlue, next, prev, i;shys = context.getElementsByTagName(TAG_SHY);for (i = 0; shy = shys[i]; ++i) {shy.className = C_SHY_DISABLED;glue = parent = shy.parentNode;if (glue.nodeName.toLowerCase() != TAG_GLUE) {newGlue = document.createElement(TAG_GLUE);newGlue.appendChild(shy.previousSibling);parent.insertBefore(newGlue, shy);newGlue.appendChild(shy);}else {glue = glue.parentNode;if (glue.nodeName.toLowerCase() == TAG_GLUE) {parent = glue.parentNode;while (glue.firstChild) {parent.insertBefore(glue.firstChild, glue);}parent.removeChild(glue);}}}for (i = 0; shy = shys[i]; ++i) {shy.className = '';glue = shy.parentNode;parent = glue.parentNode;next = glue.nextSibling || parent.nextSibling;prev = (next.nodeName.toLowerCase() == TAG_GLUE) ? glue : shy.previousSibling;if (prev.offsetTop >= next.offsetTop) {shy.className = C_SHY_DISABLED;if (prev.offsetTop < next.offsetTop) {newGlue = document.createElement(TAG_GLUE);parent.insertBefore(newGlue, glue);newGlue.appendChild(glue);newGlue.appendChild(next);}}}}function updateShyOnResize() {if (ignoreResize) return;CSS.addClass(DOM.root(), C_VIEWPORT_RESIZING);clearTimeout(shyTimer);shyTimer = setTimeout(function() {ignoreResize = true;CSS.removeClass(DOM.root(), C_VIEWPORT_RESIZING);updateShy(document);ignoreResize = false;}, 100);}var HAS_BROKEN_REGEXP = ' '.split(/\s+/).length == 0;var TAG_GLUE = 'cufonglue';var TAG_SHY = 'cufonshy';var C_SHY_DISABLED = 'cufon-shy-disabled';var C_VIEWPORT_RESIZING = 'cufon-viewport-resizing';var sharedStorage = new Storage();var hoverHandler = new HoverHandler();var replaceHistory = new ReplaceHistory();var initialized = false;var trackingShy = false;var shyTimer;var ignoreResize = false;var engines = {}, fonts = {}, defaultOptions = {autoDetect: false,engine: null,forceHitArea: false,hover: false,hoverables: {a: true},ignore: {applet: 1,canvas: 1,col: 1,colgroup: 1,head: 1,iframe: 1,map: 1,noscript: 1,optgroup: 1,option: 1,script: 1,select: 1,style: 1,textarea: 1,title: 1,pre: 1},ignoreClass: null,modifyText: null,onAfterReplace: null,onBeforeReplace: null,printable: true,selector: (window.Sizzle||	(window.jQuery && function(query) { return jQuery(query); })||	(window.dojo && dojo.query)||	(window.glow && glow.dom && glow.dom.get)||	(window.Ext && Ext.query)||	(window.YAHOO && YAHOO.util && YAHOO.util.Selector && YAHOO.util.Selector.query)||	(window.$$ && function(query) { return $$(query); })||	(window.$ && function(query) { return $(query); })||	(document.querySelectorAll && function(query) { return document.querySelectorAll(query); })||	elementsByTagName),separate: 'words',softHyphens: true,textless: {dl: 1,html: 1,ol: 1,table: 1,tbody: 1,thead: 1,tfoot: 1,tr: 1,ul: 1},textShadow: 'none',trim: 'advanced'};var separators = {words: /\s/.test('\u00a0') ? /[^\S\u00a0]+/ : /\s+/,characters: '',none: /^/};api.now = function() {DOM.ready();return api;};api.refresh = function() {replaceHistory.repeat.apply(replaceHistory, arguments);return api;};api.registerEngine = function(id, engine) {if (!engine) return api;engines[id] = engine;return api.set('engine', id);};api.registerFont = function(data) {if (!data) return api;var font = new Font(data), family = font.family;if (!fonts[family]) fonts[family] = new FontFamily();fonts[family].add(font);return api.set('fontFamily', '"' + family + '"');};api.replace = function(elements, options, ignoreHistory) {options = merge(defaultOptions, options);if (!options.engine) return api;if (!initialized) {CSS.addClass(DOM.root(), 'cufon-active cufon-loading');CSS.ready(function() {CSS.addClass(CSS.removeClass(DOM.root(), 'cufon-loading'), 'cufon-ready');});initialized = true;}if (options.hover) options.forceHitArea = true;if (options.autoDetect) delete options.fontFamily;if (typeof options.ignoreClass == 'string') {options.ignoreClass = new RegExp('(?:^|\\s)(?:' + options.ignoreClass.replace(/\s+/, '|') + ')(?:\\s|$)');}if (typeof options.textShadow == 'string') {options.textShadow = CSS.textShadow(options.textShadow);}if (typeof options.color == 'string' && /^-/.test(options.color)) {options.textGradient = CSS.gradient(options.color);}else delete options.textGradient;if (!ignoreHistory) replaceHistory.add(elements, arguments);if (elements.nodeType || typeof elements == 'string') elements = [ elements ];CSS.ready(function() {for (var i = 0, l = elements.length; i < l; ++i) {var el = elements[i];if (typeof el == 'string') api.replace(options.selector(el), options, true);else replaceElement(el, options);}});return api;};api.set = function(option, value) {defaultOptions[option] = value;return api;};return api;})();Cufon.registerEngine('vml', (function() {var ns = document.namespaces;if (!ns) return;ns.add('cvml', 'urn:schemas-microsoft-com:vml');ns = null;var check = document.createElement('cvml:shape');check.style.behavior = 'url(#default#VML)';if (!check.coordsize) return;check = null;var HAS_BROKEN_LINEHEIGHT = (document.documentMode || 0) < 8;document.write(('<style type="text/css">' +'cufoncanvas{text-indent:0;}' +'@media screen{' +'cvml\\:shape,cvml\\:rect,cvml\\:fill,cvml\\:shadow{behavior:url(#default#VML);display:block;antialias:true;position:absolute;}' +'cufoncanvas{position:absolute;text-align:left;}' +'cufon{display:inline-block;position:relative;vertical-align:' +(HAS_BROKEN_LINEHEIGHT? 'middle': 'text-bottom') +';}' +'cufon cufontext{position:absolute;left:-10000in;font-size:1px;text-align:left;}' +'cufonshy.cufon-shy-disabled,.cufon-viewport-resizing cufonshy{display:none;}' +'cufonglue{white-space:nowrap;display:inline-block;}' +'.cufon-viewport-resizing cufonglue{white-space:normal;}' +'a cufon{cursor:pointer}' +'}' +'@media print{' +'cufon cufoncanvas{display:none;}' +'}' +'</style>').replace(/;/g, '!important;'));function getFontSizeInPixels(el, value) {return getSizeInPixels(el, /(?:em|ex|%)$|^[a-z-]+$/i.test(value) ? '1em' : value);}function getSizeInPixels(el, value) {if (!isNaN(value) || /px$/i.test(value)) return parseFloat(value);var style = el.style.left, runtimeStyle = el.runtimeStyle.left;el.runtimeStyle.left = el.currentStyle.left;el.style.left = value.replace('%', 'em');var result = el.style.pixelLeft;el.style.left = style;el.runtimeStyle.left = runtimeStyle;return result;}function getSpacingValue(el, style, size, property) {var key = 'computed' + property, value = style[key];if (isNaN(value)) {value = style.get(property);style[key] = value = (value == 'normal') ? 0 : ~~size.convertFrom(getSizeInPixels(el, value));}return value;}var fills = {};function gradientFill(gradient) {var id = gradient.id;if (!fills[id]) {var stops = gradient.stops, fill = document.createElement('cvml:fill'), colors = [];fill.type = 'gradient';fill.angle = 180;fill.focus = '0';fill.method = 'none';fill.color = stops[0][1];for (var j = 1, k = stops.length - 1; j < k; ++j) {colors.push(stops[j][0] * 100 + '% ' + stops[j][1]);}fill.colors = colors.join(',');fill.color2 = stops[k][1];fills[id] = fill;}return fills[id];}return function(font, text, style, options, node, el, hasNext) {var redraw = (text === null);if (redraw) text = node.alt;var viewBox = font.viewBox;var size = style.computedFontSize || (style.computedFontSize = new Cufon.CSS.Size(getFontSizeInPixels(el, style.get('fontSize')) + 'px', font.baseSize));var wrapper, canvas;if (redraw) {wrapper = node;canvas = node.firstChild;}else {wrapper = document.createElement('cufon');wrapper.className = 'cufon cufon-vml';wrapper.alt = text;canvas = document.createElement('cufoncanvas');wrapper.appendChild(canvas);if (options.printable) {var print = document.createElement('cufontext');print.appendChild(document.createTextNode(text));wrapper.appendChild(print);}if (!hasNext) wrapper.appendChild(document.createElement('cvml:shape'));}var wStyle = wrapper.style;var cStyle = canvas.style;var height = size.convert(viewBox.height), roundedHeight = Math.ceil(height);var roundingFactor = roundedHeight / height;var stretchFactor = roundingFactor * Cufon.CSS.fontStretch(style.get('fontStretch'));var minX = viewBox.minX, minY = viewBox.minY;cStyle.height = roundedHeight;cStyle.top = Math.round(size.convert(minY - font.ascent));cStyle.left = Math.round(size.convert(minX));wStyle.height = size.convert(font.height) + 'px';var color = style.get('color');var chars = Cufon.CSS.textTransform(text, style).split('');var jumps = font.spacing(chars,getSpacingValue(el, style, size, 'letterSpacing'),getSpacingValue(el, style, size, 'wordSpacing'));if (!jumps.length) return null;var width = jumps.total;var fullWidth = -minX + width + (viewBox.width - jumps[jumps.length - 1]);var shapeWidth = size.convert(fullWidth * stretchFactor), roundedShapeWidth = Math.round(shapeWidth);var coordSize = fullWidth + ',' + viewBox.height, coordOrigin;var stretch = 'r' + coordSize + 'ns';var fill = options.textGradient && gradientFill(options.textGradient);var glyphs = font.glyphs, offsetX = 0;var shadows = options.textShadow;var i = -1, j = 0, chr;while (chr = chars[++i]) {var glyph = glyphs[chars[i]] || font.missingGlyph, shape;if (!glyph) continue;if (redraw) {shape = canvas.childNodes[j];while (shape.firstChild) shape.removeChild(shape.firstChild);}else {shape = document.createElement('cvml:shape');canvas.appendChild(shape);}shape.stroked = 'f';shape.coordsize = coordSize;shape.coordorigin = coordOrigin = (minX - offsetX) + ',' + minY;shape.path = (glyph.d ? 'm' + glyph.d + 'xe' : '') + 'm' + coordOrigin + stretch;shape.fillcolor = color;if (fill) shape.appendChild(fill.cloneNode(false));var sStyle = shape.style;sStyle.width = roundedShapeWidth;sStyle.height = roundedHeight;if (shadows) {var shadow1 = shadows[0], shadow2 = shadows[1];var color1 = Cufon.CSS.color(shadow1.color), color2;var shadow = document.createElement('cvml:shadow');shadow.on = 't';shadow.color = color1.color;shadow.offset = shadow1.offX + ',' + shadow1.offY;if (shadow2) {color2 = Cufon.CSS.color(shadow2.color);shadow.type = 'double';shadow.color2 = color2.color;shadow.offset2 = shadow2.offX + ',' + shadow2.offY;}shadow.opacity = color1.opacity || (color2 && color2.opacity) || 1;shape.appendChild(shadow);}offsetX += jumps[j++];}var cover = shape.nextSibling, coverFill, vStyle;if (options.forceHitArea) {if (!cover) {cover = document.createElement('cvml:rect');cover.stroked = 'f';cover.className = 'cufon-vml-cover';coverFill = document.createElement('cvml:fill');coverFill.opacity = 0;cover.appendChild(coverFill);canvas.appendChild(cover);}vStyle = cover.style;vStyle.width = roundedShapeWidth;vStyle.height = roundedHeight;}else if (cover) canvas.removeChild(cover);wStyle.width = Math.max(Math.ceil(size.convert(width * stretchFactor)), 0);if (HAS_BROKEN_LINEHEIGHT) {var yAdjust = style.computedYAdjust;if (yAdjust === undefined) {var lineHeight = style.get('lineHeight');if (lineHeight == 'normal') lineHeight = '1em';else if (!isNaN(lineHeight)) lineHeight += 'em';style.computedYAdjust = yAdjust = 0.5 * (getSizeInPixels(el, lineHeight) - parseFloat(wStyle.height));}if (yAdjust) {wStyle.marginTop = Math.ceil(yAdjust) + 'px';wStyle.marginBottom = yAdjust + 'px';}}return wrapper;};})());Cufon.registerEngine('canvas', (function() {var check = document.createElement('canvas');if (!check || !check.getContext || !check.getContext.apply) return;check = null;var HAS_INLINE_BLOCK = Cufon.CSS.supports('display', 'inline-block');var HAS_BROKEN_LINEHEIGHT = !HAS_INLINE_BLOCK && (document.compatMode == 'BackCompat' || /frameset|transitional/i.test(document.doctype.publicId));var styleSheet = document.createElement('style');styleSheet.type = 'text/css';styleSheet.appendChild(document.createTextNode(('cufon{text-indent:0;}' +'@media screen,projection{' +'cufon{display:inline;display:inline-block;position:relative;vertical-align:middle;' +(HAS_BROKEN_LINEHEIGHT? '': 'font-size:1px;line-height:1px;') +'}cufon cufontext{display:-moz-inline-box;display:inline-block;width:0;height:0;text-align:left;text-indent:-10000in;}' +(HAS_INLINE_BLOCK? 'cufon canvas{position:relative;}': 'cufon canvas{position:absolute;}') +'cufonshy.cufon-shy-disabled,.cufon-viewport-resizing cufonshy{display:none;}' +'cufonglue{white-space:nowrap;display:inline-block;}' +'.cufon-viewport-resizing cufonglue{white-space:normal;}' +'}' +'@media print{' +'cufon{padding:0;}' +'cufon canvas{display:none;}' +'}').replace(/;/g, '!important;')));document.getElementsByTagName('head')[0].appendChild(styleSheet);function generateFromVML(path, context) {var atX = 0, atY = 0;var code = [], re = /([mrvxe])([^a-z]*)/g, match;generate: for (var i = 0; match = re.exec(path); ++i) {var c = match[2].split(',');switch (match[1]) {case 'v':code[i] = { m: 'bezierCurveTo', a: [ atX + ~~c[0], atY + ~~c[1], atX + ~~c[2], atY + ~~c[3], atX += ~~c[4], atY += ~~c[5] ] };break;case 'r':code[i] = { m: 'lineTo', a: [ atX += ~~c[0], atY += ~~c[1] ] };break;case 'm':code[i] = { m: 'moveTo', a: [ atX = ~~c[0], atY = ~~c[1] ] };break;case 'x':code[i] = { m: 'closePath' };break;case 'e':break generate;}context[code[i].m].apply(context, code[i].a);}return code;}function interpret(code, context) {for (var i = 0, l = code.length; i < l; ++i) {var line = code[i];context[line.m].apply(context, line.a);}}return function(font, text, style, options, node, el) {var redraw = (text === null);if (redraw) text = node.getAttribute('alt');var viewBox = font.viewBox;var size = style.getSize('fontSize', font.baseSize);var expandTop = 0, expandRight = 0, expandBottom = 0, expandLeft = 0;var shadows = options.textShadow, shadowOffsets = [];if (shadows) {for (var i = shadows.length; i--;) {var shadow = shadows[i];var x = size.convertFrom(parseFloat(shadow.offX));var y = size.convertFrom(parseFloat(shadow.offY));shadowOffsets[i] = [ x, y ];if (y < expandTop) expandTop = y;if (x > expandRight) expandRight = x;if (y > expandBottom) expandBottom = y;if (x < expandLeft) expandLeft = x;}}var chars = Cufon.CSS.textTransform(text, style).split('');var jumps = font.spacing(chars,~~size.convertFrom(parseFloat(style.get('letterSpacing')) || 0),~~size.convertFrom(parseFloat(style.get('wordSpacing')) || 0));if (!jumps.length) return null;var width = jumps.total;expandRight += viewBox.width - jumps[jumps.length - 1];expandLeft += viewBox.minX;var wrapper, canvas;if (redraw) {wrapper = node;canvas = node.firstChild;}else {wrapper = document.createElement('cufon');wrapper.className = 'cufon cufon-canvas';wrapper.setAttribute('alt', text);canvas = document.createElement('canvas');wrapper.appendChild(canvas);if (options.printable) {var print = document.createElement('cufontext');print.appendChild(document.createTextNode(text));wrapper.appendChild(print);}}var wStyle = wrapper.style;var cStyle = canvas.style;var height = size.convert(viewBox.height);var roundedHeight = Math.ceil(height);var roundingFactor = roundedHeight / height;var stretchFactor = roundingFactor * Cufon.CSS.fontStretch(style.get('fontStretch'));var stretchedWidth = width * stretchFactor;var canvasWidth = Math.ceil(size.convert(stretchedWidth + expandRight - expandLeft));var canvasHeight = Math.ceil(size.convert(viewBox.height - expandTop + expandBottom));canvas.width = canvasWidth;canvas.height = canvasHeight;cStyle.width = canvasWidth + 'px';cStyle.height = canvasHeight + 'px';expandTop += viewBox.minY;cStyle.top = Math.round(size.convert(expandTop - font.ascent)) + 'px';cStyle.left = Math.round(size.convert(expandLeft)) + 'px';var wrapperWidth = Math.max(Math.ceil(size.convert(stretchedWidth)), 0) + 'px';if (HAS_INLINE_BLOCK) {wStyle.width = wrapperWidth;wStyle.height = size.convert(font.height) + 'px';}else {wStyle.paddingLeft = wrapperWidth;wStyle.paddingBottom = (size.convert(font.height) - 1) + 'px';}var g = canvas.getContext('2d'), scale = height / viewBox.height;g.scale(scale, scale * roundingFactor);g.translate(-expandLeft, -expandTop);g.save();function renderText() {var glyphs = font.glyphs, glyph, i = -1, j = -1, chr;g.scale(stretchFactor, 1);while (chr = chars[++i]) {var glyph = glyphs[chars[i]] || font.missingGlyph;if (!glyph) continue;if (glyph.d) {g.beginPath();if (glyph.code) interpret(glyph.code, g);else glyph.code = generateFromVML('m' + glyph.d, g);g.fill();}g.translate(jumps[++j], 0);}g.restore();}if (shadows) {for (var i = shadows.length; i--;) {var shadow = shadows[i];g.save();g.fillStyle = shadow.color;g.translate.apply(g, shadowOffsets[i]);renderText();}}var gradient = options.textGradient;if (gradient) {var stops = gradient.stops, fill = g.createLinearGradient(0, viewBox.minY, 0, viewBox.maxY);for (var i = 0, l = stops.length; i < l; ++i) {fill.addColorStop.apply(fill, stops[i]);}g.fillStyle = fill;}else g.fillStyle = style.get('color');renderText();return wrapper;};})());/* Tooltips */this.tooltip = function(){/* CONFIG */xOffset = 10;yOffset = 25;/* IMG TOOLTIP */jQuery(".tooltip").hover(function(e){this.t = this.title;this.title = "";jQuery("body").append("<p id='tooltip'>"+ this.t +"</p>");jQuery("#tooltip").css("top",(e.pageY - xOffset) + "px").css("left",(e.pageX + yOffset) + "px").fadeIn("fast");},function(){this.title = this.t;jQuery("#tooltip").remove();});jQuery(".tooltip").mousemove(function(e){jQuery("#tooltip").css("top",(e.pageY - xOffset) + "px").css("left",(e.pageX + yOffset) + "px");});};jQuery.noConflict();var jpSndSong = 0;var jpSndPlay = 0;var playlist = pl;/* JS jQuery */jQuery(document).ready(function(){function activateFancy(){jQuery('img.fancyimage').fancybox({'type' : 'image','autoScale'	: false,'transitionIn' : 'fade','transitionOut'	: 'fade','overlayOpacity': 0.7,'overlayColor' : '#000','href' : this.href,'padding' : 2,'titlePosition' : 'over','titleFormat' : function(){ return jQuery(this).attr('title').length>0?'<div id="fancybox-title-cryocms"><span>'+jQuery(this).attr('title')+'</span></div>':''; }});jQuery('a.fancyimage').fancybox({'type' : 'image','autoScale'	: false,'transitionIn' : 'fade','transitionOut'	: 'fade','overlayOpacity': 0.7,'overlayColor' : '#000','href' : this.href,'padding' : 2,'titlePosition' : 'over','titleFormat' : function(){ return jQuery(this).attr('title').length>0?'<div id="fancybox-title-cryocms"><span>'+jQuery(this).attr('title')+'</span></div>':''; }});}activateFancy();tooltip();Cufon.replace('h1');Cufon.replace('#credo');Cufon.replace('#content h2.cfn', {textShadow:' #000 1px 1px'});Cufon.replace('div.noviDiv h3', {textShadow:' #111 1px 1px'});Cufon.replace('table.calendarBlock th.redYear');Cufon.replace('table.calendarBlock div.koncertYearPosition');Cufon.replace('#clenoveBlok div p.name', {hover: true});Cufon.replace('#clenoveBlok div p.pozice');var numcode = new Array();numcode['aktuality'] = ['Aktuality', 'aktuality', '_aktuality.php', 'bck_01.jpg', ['_aktuality_detail.php']];numcode['kapela'] = ['Kapela', 'kapela', '_kapela.php', 'bck_07.jpg', ['_kapela_detail.php']];numcode['alba'] = ['Alba', 'alba', '_alba.php', 'bckN_15.jpg'];numcode['fotogalerie'] = ['Fotogalerie', 'fotogalerie', '_fotogalerie.php', 'bckS_09.jpg'];numcode['videogalerie'] = ['Videogalerie', 'videogalerie', '_videogalerie.php', 'bck_05.jpg'];numcode['koncerty'] = ['Koncerty', 'koncerty', '_koncerty.php', 'bckS_16.jpg'];numcode['reference'] = ['Reference', 'reference', '_reference.php', 'bckS_08.jpg', ['_reference_detail.php']];numcode['kontakt'] = ['Kontakt', 'kontakt', '_kontakt.php', 'bck_01.jpg'];numcode['rss'] = ['Kanál RSS', 'rss', '_rss.php', 'bck_02.jpg'];function switchPage(page,strana){jQuery('#content').empty().load(numcode[page][2]+(strana.length>0?'?strana='+strana:''), function(response, status, xhr){if(status == "error"){ var msg = "Chyba 404: Stránka nenalezena."; jQuery("#content").html(msg); }else{location.hash = '#!'+page;jQuery('title').text(numcode[page][0]+" :: Lokomotiva - rock'n'rollová skupina");jQuery('body').css('background-image', "url('system/images/"+numcode[page][3]+"')");jQuery('.h1row h1').html('.'+numcode[page][1]);activateFancy();Cufon.refresh();clickEvents();}});}function switchSubPage(page,subpage){var parser = subpage.split('-');jQuery('#content').empty().load(numcode[page][4][0]+'?di='+parser[0], function(response, status, xhr){if(status == "error"){ var msg = "Chyba 404: Stránka nenalezena."; jQuery("#content").html(msg); }else{location.hash = '#!'+page+':'+subpage;jQuery.ajax({type: "GET",url: "ajax_title.php?di="+parser[0]+"&ds="+page,dataType: "html",success: function (data,status){jQuery('title').text(data+" :: Lokomotiva - rock'n'rollová skupina");}});jQuery('body').css('background-image', "url('system/images/"+numcode[page][3]+"')");jQuery('.h1row h1').attr('src', 'system/images/'+numcode[page][3]).attr('alt', numcode[page][0]);activateFancy();Cufon.refresh();clickEvents();}});}function clickEvents(){jQuery('#menu a, #logo, #rss').unbind('click').click(function(e){e.preventDefault();var id;id = jQuery(this).attr('href');id = id.substring(id.lastIndexOf('/'));id = id.substring(0,id.indexOf('.'));if(jQuery(this).hasClass('lang')){/* nic */}else{jQuery('#menu a').removeClass('active');if(jQuery(this).parent().parent().attr('id') == 'menu'){jQuery(this).addClass('active');}else if(jQuery(this).attr('id') == 'logo'){jQuery('#menu a.mn-aktuality').addClass('active');}else if(jQuery(this).attr('id') == 'rss'){  }Cufon.refresh();switchPage(id,'');}return false;});jQuery('a.mainjs').unbind('click').click(function(e){e.preventDefault();var alt = jQuery(this).attr('alt');var page = alt.indexOf('|')>0?alt.substring(0,alt.indexOf('|')):alt;var strana = alt.indexOf('|')>0?alt.substring(alt.indexOf('|')+1,alt.length):'';jQuery('#menu a').removeClass('active');jQuery('#menu a.mn-'+page).addClass('active');Cufon.refresh();switchPage(page,strana);return false;});jQuery('#content a.subjs, #panel a.subjs').unbind('click').click(function(e){e.preventDefault();var alt = jQuery(this).attr('alt');var page = alt.substring(0,alt.indexOf(':'));var subpage = alt.substring(alt.indexOf(':')+1,alt.length);jQuery('#menu a').removeClass('active');jQuery('#menu a.mn-'+page).addClass('active');Cufon.refresh();switchSubPage(page,subpage);return false;});jQuery('a.bl').click(function(e){e.preventDefault();var aID = jQuery(this).attr('id');if(aID.length > 0){aID = aID.split('_');if(jQuery('#blc_'+aID[1]+' div.collapseDiv:hidden').val() == null){jQuery('#bl_'+aID[1]+' img').attr('src','system/images/arrow_down.png');jQuery('#blc_'+aID[1]+' div.collapseDiv').slideUp(150);}else{jQuery('#bl_'+aID[1]+' img').attr('src','system/images/arrow_up.png');jQuery('#blc_'+aID[1]+' div.collapseDiv').slideDown(300);}}});jQuery('.photoCtrl').click(function(e){e.preventDefault();var fID = jQuery(this).attr('id');if(fID.length > 0){fID = fID.split('_');if(jQuery('#photo_'+fID[1]+'_slider:hidden').val() == null){jQuery('#photo_'+fID[1]).html('+ otevřít galerii');jQuery('#photo_'+fID[1]+'_slider').slideUp(150);}else{jQuery('#photo_'+fID[1]).html('- skrýt galerii');jQuery('#photo_'+fID[1]+'_slider').slideDown(300);}Cufon.refresh();}});jpMediaSound();}clickEvents();var lh = location.hash;jQuery('#menu a').removeClass('active');if((lh.substring(0,2) == '#!' && lh.indexOf(':') > 0 && numcode[lh.substring(2,lh.indexOf(':'))] === undefined) ||(lh.substring(0,2) == '#!' && lh.indexOf(':') == 0 && numcode[lh.substring(2,lh.length)] === undefined) ||(lh.substring(0,2) != '#!')){jQuery('#menu a.mn-aktuality').addClass('active');switchPage('aktuality','');}else if(lh.substring(0,2) === '#!' && lh.indexOf(':')>0 && numcode[lh.substring(2,lh.indexOf(':'))].length > 0){jQuery('#menu a.mn-'+lh.substring(2,lh.indexOf(':'))).addClass('active');switchSubPage(lh.substring(2,lh.indexOf(':')),lh.substring(lh.indexOf(':')+1,lh.length));}else{jQuery('#menu a.mn-'+lh.substring(2,lh.length)).addClass('active');switchPage(lh.substring(2,lh.length),'');}Cufon.refresh();function jpMediaSound(){jQuery("#jplayer_media").jPlayer({volume: 0.1,swfPath: "system/js",supplied: "mp3"});function playTrack(t){jQuery("#jquery_jplayer").jPlayer("stop");jpSndPlay = 0;checkBtnPrevNext();jQuery("#jplayer_media").jPlayer("setMedia", {mp3: t}).jPlayer("play");}jQuery('a.media_jplayer_play').click(function(e){e.preventDefault();var mID = jQuery(this).attr('id').split('_');var sAlt = jQuery(this).attr('alt').split('|');jQuery("#jplayer_media").jPlayer("stop");jQuery("#jplayer_media").jPlayer("clearMedia");playTrack("data/cs/musicgallery/"+sAlt[0]+"/songs/"+sAlt[1]);jQuery('.media_jplayer_stop').hide();jQuery('#jplayer_stop_'+mID[2]).show();setLyrics(sAlt[2]);});jQuery('a.media_jplayer_stop').click(function(e){e.preventDefault();var mID = jQuery(this).attr('id');jQuery("#jplayer_media").jPlayer("stop");jQuery("#jplayer_media").jPlayer("clearMedia");jQuery('.media_jplayer_stop').hide();jQuery('#jplayer_lyrics_cnt').empty().html('<p class="info">Pro zobrazení textu písně spusťte přehrávání vybrané písničky nebo klikněte na znak dokumentu vedle názvu písničky.</p>');});function checkBtnPrevNext(){jQuery('#jctrl_play').attr('class','');jQuery('#jctrl_stop').attr('class','');jQuery('#jctrl_back').attr('class','');jQuery('#jctrl_next').attr('class','');if(jpSndPlay){       jQuery('#jctrl_play').attr('class','jp-play-dis'); }else if(!jpSndPlay){ jQuery('#jctrl_stop').attr('class','jp-stop-dis'); }if(jpSndSong == 0){                      jQuery('#jctrl_back').attr('class','jp-previous-dis'); }else if(jpSndSong == playlist.length-1){ jQuery('#jctrl_next').attr('class','jp-next-dis'); }return false;}jQuery('img.lyricDoc').click(function(e){e.preventDefault();var sID = parseInt(jQuery(this).attr('id'));var relCnt = parseInt(jQuery(this).attr('rel'));setLyrics(sID,relCnt);});function setLyrics(sID,relCnt){if(sID > 0){jQuery.ajax({type: "GET",url: "ajax_lyrics.php?di="+sID+"&rel="+relCnt,dataType: "html",success: function (data,status){if(data.length > 0){jQuery('#jplayer_lyrics_cnt').empty().html(data);}}});}}}function jpSound(){jQuery('#pan_jukebox').show();jQuery('#h2juke').show();jQuery("#jquery_jplayer").jPlayer({ready: function (){setSongName(playlist[jpSndSong][0]);setSongProgress('00:00');checkBtnPrevNext();},ended: function(){if(jpSndSong < playlist.length-1){ jpSndSong++; }else{                              jpSndSong = 0; }playTrack(playlist[jpSndSong][1]);setSongName(playlist[jpSndSong][0]);checkBtnPrevNext();},volume:0.1,swfPath: "system/js",supplied: "mp3"});function setSongName(sname){ jQuery('#pan_jukebox div.jinfo').html(sname+'<span></span>'); }function setSongProgress(sprogress){ jQuery('#pan_jukebox div.jinfo span').html(sprogress); }function playTrack(t){jQuery("#jplayer_media").jPlayer("stop");jQuery("#jplayer_media").jPlayer("clearMedia");jQuery('.media_jplayer_stop').hide();jQuery("#jquery_jplayer").jPlayer("setMedia", {mp3: "data/mp3/"+t}).jPlayer("play");jpSndPlay = 1;}function checkBtnPrevNext(){jQuery('#jctrl_play').attr('class','');jQuery('#jctrl_stop').attr('class','');jQuery('#jctrl_back').attr('class','');jQuery('#jctrl_next').attr('class','');if(jpSndPlay){       jQuery('#jctrl_play').attr('class','jp-play-dis'); }else if(!jpSndPlay){ jQuery('#jctrl_stop').attr('class','jp-stop-dis'); }if(jpSndSong == 0){                      jQuery('#jctrl_back').attr('class','jp-previous-dis'); }else if(jpSndSong == playlist.length-1){ jQuery('#jctrl_next').attr('class','jp-next-dis'); }return false;}function playBack(){if(jpSndSong > 0){jpSndSong--;setSongName(playlist[jpSndSong][0]);if(jpSndPlay){ playTrack(playlist[jpSndSong][1]); }checkBtnPrevNext();}}function playNext(){if(jpSndSong < playlist.length-1){jpSndSong++;setSongName(playlist[jpSndSong][0]);if(jpSndPlay){ playTrack(playlist[jpSndSong][1]); }checkBtnPrevNext();}}jQuery("#jquery_jplayer").bind(jQuery.jPlayer.event.timeupdate, function(event){setSongProgress(jQuery.jPlayer.convertTime(event.jPlayer.status.currentTime));});jQuery("#jctrl_play").click(function(){if(!jpSndPlay){playTrack(playlist[jpSndSong][1]);jpSndPlay = 1;checkBtnPrevNext();}return false;});jQuery("#jctrl_stop").click(function(){if(jpSndPlay){jQuery("#jquery_jplayer").jPlayer("stop");jpSndPlay = 0;checkBtnPrevNext();}return false;});jQuery("#jctrl_back").click(function(){playBack();return false;});jQuery("#jctrl_next").click(function(){playNext();return false;});}jpSound();});

