/**
 * JS Library modules
 **/
 
/* Tooltips */
this.tooltip = function(){ xOffset = 25;yOffset = 15; 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 - yOffset) + "px").css("left",(e.pageX - (jQuery("#tooltip").width()+xOffset)) + "px").fadeIn("fast");},function(){this.title = this.t;jQuery("#tooltip").remove();});jQuery(".tooltip").mousemove(function(e){jQuery("#tooltip").css("top",(e.pageY - yOffset) + "px").css("left",(e.pageX - (jQuery("#tooltip").width()+xOffset)) + "px");});}; 

/* 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;};})());

/* jQuery UI Effects 1.8.1 (http://docs.jquery.com/UI/Effects/),  Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) - Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. */
jQuery.effects || (function($){$.effects = {};$.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor','borderRightColor', 'borderTopColor', 'color', 'outlineColor'],function(i, attr) {$.fx.step[attr] = function(fx) {if (!fx.colorInit) {fx.start = getColor(fx.elem, attr);fx.end = getRGB(fx.end);fx.colorInit = true;}fx.elem.style[attr] = 'rgb(' +Math.max(Math.min(parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0], 10), 255), 0) + ',' +Math.max(Math.min(parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1], 10), 255), 0) + ',' +Math.max(Math.min(parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2], 10), 255), 0) + ')';};});function getRGB(color) {var result;if ( color && color.constructor == Array && color.length == 3 )return color;if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))return [parseInt(result[1],10), parseInt(result[2],10), parseInt(result[3],10)];if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))return [parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55];if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)];if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];if (result = /rgba\(0, 0, 0, 0\)/.exec(color))return colors['transparent'];return colors[$.trim(color).toLowerCase()];}function getColor(elem, attr) {var color;do {color = $.curCSS(elem, attr);if ( color != '' && color != 'transparent' || $.nodeName(elem, "body") )break;attr = "backgroundColor";} while ( elem = elem.parentNode );return getRGB(color);};var colors = {aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent: [255,255,255]};var classAnimationActions = ['add', 'remove', 'toggle'],shorthandStyles = {border: 1,borderBottom: 1,borderColor: 1,borderLeft: 1,borderRight: 1,borderTop: 1,borderWidth: 1,margin: 1,padding: 1};function getElementStyles() {var style = document.defaultView? document.defaultView.getComputedStyle(this, null): this.currentStyle,newStyle = {},key,camelCase;if (style && style.length && style[0] && style[style[0]]) {var len = style.length;while (len--) {key = style[len];if (typeof style[key] == 'string') {camelCase = key.replace(/\-(\w)/g, function(all, letter){return letter.toUpperCase();});newStyle[camelCase] = style[key];}}} else {for (key in style) {if (typeof style[key] === 'string') {newStyle[key] = style[key];}}}return newStyle;}function filterStyles(styles) {var name, value;for (name in styles) {value = styles[name];if (value == null ||$.isFunction(value) ||name in shorthandStyles ||(/scrollbar/).test(name) ||(!(/color/i).test(name) && isNaN(parseFloat(value)))) {delete styles[name];}}return styles;}function styleDifference(oldStyle, newStyle) {var diff = { _: 0 },name;for (name in newStyle) {if (oldStyle[name] != newStyle[name]) {diff[name] = newStyle[name];}}return diff;}$.effects.animateClass = function(value, duration, easing, callback) {if ($.isFunction(easing)) {callback = easing;easing = null;}return this.each(function() {var that = $(this),originalStyleAttr = that.attr('style') || ' ',originalStyle = filterStyles(getElementStyles.call(this)),newStyle,className = that.attr('className');$.each(classAnimationActions, function(i, action) {if (value[action]) {that[action + 'Class'](value[action]);}});newStyle = filterStyles(getElementStyles.call(this));that.attr('className', className);that.animate(styleDifference(originalStyle, newStyle), duration, easing, function() {$.each(classAnimationActions, function(i, action) {if (value[action]) { that[action + 'Class'](value[action]); }});if (typeof that.attr('style') == 'object') {that.attr('style').cssText = '';that.attr('style').cssText = originalStyleAttr;} else {that.attr('style', originalStyleAttr);}if (callback) { callback.apply(this, arguments); }});});};$.fn.extend({_addClass: $.fn.addClass,addClass: function(classNames, speed, easing, callback) {return speed ? $.effects.animateClass.apply(this, [{ add: classNames },speed,easing,callback]) : this._addClass(classNames);},_removeClass: $.fn.removeClass,removeClass: function(classNames,speed,easing,callback) {return speed ? $.effects.animateClass.apply(this, [{ remove: classNames },speed,easing,callback]) : this._removeClass(classNames);},_toggleClass: $.fn.toggleClass,toggleClass: function(classNames, force, speed, easing, callback) {if ( typeof force == "boolean" || force === undefined ) {if ( !speed ) {return this._toggleClass(classNames, force);} else {return $.effects.animateClass.apply(this, [(force?{add:classNames}:{remove:classNames}),speed,easing,callback]);}} else {return $.effects.animateClass.apply(this, [{ toggle: classNames },force,speed,easing]);}},switchClass: function(remove,add,speed,easing,callback) {return $.effects.animateClass.apply(this, [{ add: add, remove: remove },speed,easing,callback]);}});$.extend($.effects, {version: "1.8.1",save: function(element, set) {for(var i=0; i < set.length; i++) {if(set[i] !== null) element.data("ec.storage."+set[i], element[0].style[set[i]]);}},restore: function(element, set) {for(var i=0; i < set.length; i++) {if(set[i] !== null) element.css(set[i], element.data("ec.storage."+set[i]));}},setMode: function(el, mode) {if (mode == 'toggle') mode = el.is(':hidden') ? 'show' : 'hide';return mode;},getBaseline: function(origin, original) {var y, x;switch (origin[0]) {case 'top': y = 0; break;case 'middle': y = 0.5; break;case 'bottom': y = 1; break;default: y = origin[0] / original.height;};switch (origin[1]) {case 'left': x = 0; break;case 'center': x = 0.5; break;case 'right': x = 1; break;default: x = origin[1] / original.width;};return {x: x, y: y};},createWrapper: function(element) {if (element.parent().is('.ui-effects-wrapper')) {return element.parent();}var props = {width: element.outerWidth(true),height: element.outerHeight(true),'float': element.css('float')},wrapper = $('<div></div>').addClass('ui-effects-wrapper').css({fontSize: '100%',background: 'transparent',border: 'none',margin: 0,padding: 0});element.wrap(wrapper);wrapper = element.parent();if (element.css('position') == 'static') {wrapper.css({ position: 'relative' });element.css({ position: 'relative' });} else {$.extend(props, {position: element.css('position'),zIndex: element.css('z-index')});$.each(['top', 'left', 'bottom', 'right'], function(i, pos) {props[pos] = element.css(pos);if (isNaN(parseInt(props[pos], 10))) {props[pos] = 'auto';}});element.css({position: 'relative', top: 0, left: 0 });}return wrapper.css(props).show();},removeWrapper: function(element) {if (element.parent().is('.ui-effects-wrapper'))return element.parent().replaceWith(element);return element;},setTransition: function(element, list, factor, value) {value = value || {};$.each(list, function(i, x){unit = element.cssUnit(x);if (unit[0] > 0) value[x] = unit[0] * factor + unit[1];});return value;}});function _normalizeArguments(effect, options, speed, callback) {if (typeof effect == 'object') {callback = options;speed = null;options = effect;effect = options.effect;}if ($.isFunction(options)) {callback = options;speed = null;options = {};}if ($.isFunction(speed)) {callback = speed;speed = null;}if (typeof options == 'number' || $.fx.speeds[options]) {callback = speed;speed = options;options = {};}options = options || {};speed = speed || options.duration;speed = $.fx.off ? 0 : typeof speed == 'number'? speed : $.fx.speeds[speed] || $.fx.speeds._default;callback = callback || options.complete;return [effect, options, speed, callback];}$.fn.extend({effect: function(effect, options, speed, callback) {var args = _normalizeArguments.apply(this, arguments),args2 = {options: args[1],duration: args[2],callback: args[3]},effectMethod = $.effects[effect];return effectMethod && !$.fx.off ? effectMethod.call(this, args2) : this;},_show: $.fn.show,show: function(speed) {if (!speed || typeof speed == 'number' || $.fx.speeds[speed]) {return this._show.apply(this, arguments);} else {var args = _normalizeArguments.apply(this, arguments);args[1].mode = 'show';return this.effect.apply(this, args);}},_hide: $.fn.hide,hide: function(speed) {if (!speed || typeof speed == 'number' || $.fx.speeds[speed]) {return this._hide.apply(this, arguments);} else {var args = _normalizeArguments.apply(this, arguments);args[1].mode = 'hide';return this.effect.apply(this, args);}},__toggle: $.fn.toggle,toggle: function(speed) {if (!speed || typeof speed == 'number' || $.fx.speeds[speed] ||typeof speed == 'boolean' || $.isFunction(speed)) {return this.__toggle.apply(this, arguments);} else {var args = _normalizeArguments.apply(this, arguments);args[1].mode = 'toggle';return this.effect.apply(this, args);}},cssUnit: function(key) {var style = this.css(key), val = [];$.each( ['em','px','%','pt'], function(i, unit){if(style.indexOf(unit) > 0)val = [parseFloat(style), unit];});return val;}});

/* jQuery Easing v1.3 (http://gsgd.co.uk/sandbox/jquery/easing/ | t: current time, b: begInnIng value, c: change In value, d: duration) - Copyright 2008 George McGinley Smith. Open source under the BSD License. */
$.easing.jswing = $.easing.swing;$.extend($.easing,{def: 'easeOutQuad',swing: function (x, t, b, c, d) {return $.easing[$.easing.def](x, t, b, c, d);},easeInQuad: function (x, t, b, c, d) {return c*(t/=d)*t + b;},easeOutQuad: function (x, t, b, c, d) {return -c *(t/=d)*(t-2) + b;},easeInOutQuad: function (x, t, b, c, d) {if ((t/=d/2) < 1) return c/2*t*t + b;return -c/2 * ((--t)*(t-2) - 1) + b;},easeInCubic: function (x, t, b, c, d) {return c*(t/=d)*t*t + b;},easeOutCubic: function (x, t, b, c, d) {return c*((t=t/d-1)*t*t + 1) + b;},easeInOutCubic: function (x, t, b, c, d) {if ((t/=d/2) < 1) return c/2*t*t*t + b;return c/2*((t-=2)*t*t + 2) + b;},easeInQuart: function (x, t, b, c, d) {return c*(t/=d)*t*t*t + b;},easeOutQuart: function (x, t, b, c, d) {return -c * ((t=t/d-1)*t*t*t - 1) + b;},easeInOutQuart: function (x, t, b, c, d) {if ((t/=d/2) < 1) return c/2*t*t*t*t + b;return -c/2 * ((t-=2)*t*t*t - 2) + b;},easeInQuint: function (x, t, b, c, d) {return c*(t/=d)*t*t*t*t + b;},easeOutQuint: function (x, t, b, c, d) {return c*((t=t/d-1)*t*t*t*t + 1) + b;},easeInOutQuint: function (x, t, b, c, d) {if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;return c/2*((t-=2)*t*t*t*t + 2) + b;},easeInSine: function (x, t, b, c, d) {return -c * Math.cos(t/d * (Math.PI/2)) + c + b;},easeOutSine: function (x, t, b, c, d) {return c * Math.sin(t/d * (Math.PI/2)) + b;},easeInOutSine: function (x, t, b, c, d) {return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;},easeInExpo: function (x, t, b, c, d) {return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;},easeOutExpo: function (x, t, b, c, d) {return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;},easeInOutExpo: function (x, t, b, c, d) {if (t==0) return b;if (t==d) return b+c;if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;},easeInCirc: function (x, t, b, c, d) {return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;},easeOutCirc: function (x, t, b, c, d) {return c * Math.sqrt(1 - (t=t/d-1)*t) + b;},easeInOutCirc: function (x, t, b, c, d) {if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;},easeInElastic: function (x, t, b, c, d) {var s=1.70158;var p=0;var a=c;if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;if (a < Math.abs(c)) { a=c; var s=p/4; }else var s = p/(2*Math.PI) * Math.asin (c/a);return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;},easeOutElastic: function (x, t, b, c, d) {var s=1.70158;var p=0;var a=c;if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;if (a < Math.abs(c)) { a=c; var s=p/4; }else var s = p/(2*Math.PI) * Math.asin (c/a);return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;},easeInOutElastic: function (x, t, b, c, d) {var s=1.70158;var p=0;var a=c;if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);if (a < Math.abs(c)) { a=c; var s=p/4; }else var s = p/(2*Math.PI) * Math.asin (c/a);if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;},easeInBack: function (x, t, b, c, d, s) {if (s == undefined) s = 1.70158;return c*(t/=d)*t*((s+1)*t - s) + b;},easeOutBack: function (x, t, b, c, d, s) {if (s == undefined) s = 1.70158;return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;},easeInOutBack: function (x, t, b, c, d, s) {if (s == undefined) s = 1.70158;if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;},easeInBounce: function (x, t, b, c, d) {return c - $.easing.easeOutBounce (x, d-t, 0, c, d) + b;},easeOutBounce: function (x, t, b, c, d) {if ((t/=d) < (1/2.75)) {return c*(7.5625*t*t) + b;} else if (t < (2/2.75)) {return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;} else if (t < (2.5/2.75)) {return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;} else {return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;}},easeInOutBounce: function (x, t, b, c, d) {if (t < d/2) return $.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;return $.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;}});})(jQuery);

/* jQuery UI Effects Slide 1.8.1 (http://docs.jquery.com/UI/Effects/Slide | Depends: jquery.effects.core.js), Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) - Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. */
(function($) {$.effects.slide = function(o) {return this.queue(function() {var el = $(this), props = ['position','top','left'];var mode = $.effects.setMode(el, o.options.mode || 'show');var direction = o.options.direction || 'left';$.effects.save(el, props); el.show();$.effects.createWrapper(el).css({overflow:'hidden'});var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) : el.outerWidth({margin:true}));if (mode == 'show') el.css(ref, motion == 'pos' ? -distance : distance);var animation = {};animation[ref] = (mode == 'show' ? (motion == 'pos' ? '+=' : '-=') : (motion == 'pos' ? '-=' : '+=')) + distance;el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {if(mode == 'hide') el.hide();$.effects.restore(el, props); $.effects.removeWrapper(el);if(o.callback) o.callback.apply(this, arguments);el.dequeue();}});});};})(jQuery);
 
/* FancyBox - Copyright (c) 2008 - 2010 Janis Skarnelis, Dual licensed under the MIT and GPL licenses */
(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);

 
/**
 * JS jQuery implementation
 **/
 jQuery(document).ready(function()
 {
    Cufon.replace('h2', {hover: true});
    Cufon.replace('h3');
    
    // Fancyimg
    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>':''; }
    });
    
    // Resize / scroll page
    jQuery(function()
    {
        jQuery('#panel').css({ 'height': (jQuery(window).height()), 'min-height': (jQuery(window).height()) });
        jQuery('#panel div.l0').css({ 'height': (jQuery(window).height()), 'min-height': (jQuery(window).height()) });
        jQuery('#panel div.l1').css({ 'height': (jQuery(window).height()), 'min-height': (jQuery(window).height()) });
        jQuery('#panel div.l2').css({ 'height': (jQuery(window).height()), 'min-height': (jQuery(window).height()) });
        jQuery('#panel div.l3').css({ 'height': (jQuery(window).height()), 'min-height': (jQuery(window).height()) });
        jQuery('#panel div.l4').css({ 'height': (jQuery(window).height()), 'min-height': (jQuery(window).height()) });
        
        jQuery(window).scroll(function()
        {
            jQuery('#panel').css({ 'height': (jQuery(window).height()+jQuery(window).scrollTop()), 'min-height': (jQuery(window).height()+jQuery(window).scrollTop()) });
            jQuery('#panel div.l0').css({ 'height': (jQuery(window).height()+jQuery(window).scrollTop()), 'min-height': (jQuery(window).height()+jQuery(window).scrollTop()) });
            jQuery('#panel div.l1').css({ 'height': (jQuery(window).height()+jQuery(window).scrollTop()), 'min-height': (jQuery(window).height()+jQuery(window).scrollTop()) });
            jQuery('#panel div.l2').css({ 'height': (jQuery(window).height()+jQuery(window).scrollTop()), 'min-height': (jQuery(window).height()+jQuery(window).scrollTop()) });
            jQuery('#panel div.l3').css({ 'height': (jQuery(window).height()+jQuery(window).scrollTop()), 'min-height': (jQuery(window).height()+jQuery(window).scrollTop()) });
            jQuery('#panel div.l4').css({ 'height': (jQuery(window).height()+jQuery(window).scrollTop()), 'min-height': (jQuery(window).height()+jQuery(window).scrollTop()) });
        });
        
        jQuery(window).resize(function()
        {
            jQuery('#panel').css({ 'height': (jQuery(window).height()), 'min-height': (jQuery(window).height()) });
            jQuery('#panel div.l0').css({ 'height': (jQuery(window).height()), 'min-height': (jQuery(window).height()) });
            jQuery('#panel div.l1').css({ 'height': (jQuery(window).height()), 'min-height': (jQuery(window).height()) });
            jQuery('#panel div.l2').css({ 'height': (jQuery(window).height()), 'min-height': (jQuery(window).height()) });
            jQuery('#panel div.l3').css({ 'height': (jQuery(window).height()), 'min-height': (jQuery(window).height()) });
            jQuery('#panel div.l4').css({ 'height': (jQuery(window).height()), 'min-height': (jQuery(window).height()) });
        });
    });
    
    // Show / hide content
    jQuery('#eyebtn').click(function(e)
    {
        e.preventDefault();
        
        if(jQuery('#body:hidden').val() == null)
        {
            jQuery('#footer').hide('slide', {direction:'up'}, 150, function(){ jQuery('#eyebtn').css('background-image', "url('./../../system/images/ico_moveleft.png')"); jQuery('#body').hide('slide', {direction:'right'}, 300); });
        }
        else
        {
            jQuery('#body').show('slide', {direction:'right'}, 300, function(){ jQuery('#eyebtn').css('background-image', "url('./../../system/images/ico_moveright.png')"); jQuery('#footer').show('slide', {direction:'up'}, 150); });
        }
    });
    
    // MMenu functions
    jQuery('.show_menu').click(function(e)
    {
        e.preventDefault();        
        var mid = jQuery(this).attr('id');
        
        if(mid.length > 0)
        {
            jQuery('#menu a').removeClass('active');
            jQuery('.show_submenu:visible').slideUp();
            
            if(jQuery('#'+mid+'_div:hidden').val() != null)
            {
                jQuery('#'+mid).addClass('active');
                jQuery('#'+mid+'_div').slideDown();
            }
            else
            {
                jQuery('#'+mid+'_div').slideUp();
                jQuery('#'+mid).removeClass('active');
            }
        }
    });
    
    jQuery('.show_block').click(function(e){ e.preventDefault(); });
    
    
    /* Images */
    
    jQuery('.photoCtrl').click(function(e)
    {
        e.preventDefault();
        var fID = jQuery(this).attr('id');
        var fAlt = jQuery(this).attr('alt').split('|'); 
        
        if(fID.length > 0)
        {
            fID = fID.split('_');
            
            if(jQuery('#fotob_'+fID[1]).hasClass('activeFoto'))
            {
                jQuery('#fotob_'+fID[1]).removeClass('activeFoto');
                jQuery('#photo_'+fID[1]).html('+ '+fAlt[0]);
                
                if(jQuery('#photo_'+fID[1]+'_slider').length > 0){ jQuery('#photo_'+fID[1]+'_slider').slideUp(250); }
                if(jQuery('#dscrtxt_'+fID[1]).length > 0){ jQuery('#dscrtxt_'+fID[1]).slideUp(100); }
            }
            else
            {
                jQuery('#fotob_'+fID[1]).addClass('activeFoto');
                jQuery('#photo_'+fID[1]).html('- '+fAlt[1]);
                
                if(jQuery('#photo_'+fID[1]+'_slider').length > 0){ jQuery('#photo_'+fID[1]+'_slider').slideDown(500); }
                if(jQuery('#dscrtxt_'+fID[1]).length > 0){ jQuery('#dscrtxt_'+fID[1]).slideDown(200); }
            }
            
            Cufon.refresh();
        }
    });
    
    if(jQuery('#videoHover').length > 0)
    {
        jQuery('#videoHover').hoverscroll({ vertical:false, fixedArrows:false, width:606, height:70 });
    }
    
    jQuery('.viPlay').click(function(e)
    {
        e.preventDefault();
        var viMeta = jQuery(this).attr('rel').split('|');
        
        if(viMeta[0].length > 0)
        {
            jQuery('#viPlayer').attr('src', 'http://www.youtube.com/embed/'+viMeta[0]+"?rel=0&autoplay=1&showinfo=0&theme=light&color=white");
            if(viMeta[1].length > 0){ jQuery('#viNazev').html(viMeta[1]).show(); }else{ jQuery('#viNazev').html('').hide(); }
            if(viMeta[2].length > 0){ jQuery('#viPopis').html(viMeta[2]).show(); }else{ jQuery('#viPopis').html('').hide(); }
            
            jQuery('.viPlay').removeClass('alink');
            jQuery(this).addClass('alink');
        }
    });
 });

