<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">/** GLOBAL jshint settings **/
/*jshint maxerr: 2000 */
/*jshint -W004 */
/*jshint -W060 */
/*jshint -W099 */
// page init
jQuery(function(){
    initLayout();
    initFixedNav();
    initRefreshHeight();
    initOpenClose();
    initPopups();
    initValidation();
    initInputs();
    initScrollToTop();
    initIframeResize();
    FontResize.init();
});

var menuScroll;

function plusScroll() {
    menuScroll = new IScroll('#plusWrapper', { mouseWheel: true });
}
function plusStopScroll() {
    menuScroll = jQuery('');
}

function initScrollToTop()
{
    jQuery('a[href=#top]').click(function(){
        jQuery('html, body').animate({scrollTop:0}, 'slow');
        return false;
    });
}

function initIframeResize() {
    jQuery(window).resize(function() {
        jQuery('.content-block iframe[src*="youtube.com"]').each(function() {
            jQuery(this).height(0.5625 * jQuery(this).width());
        });
    }).resize();
}

function initStretchNav(){
    jQuery('#header .header-holder').each(function(){
        var header = jQuery(this),
            logo = header.find('.logo'),
            navHolder = header.find('#nav'),
            nav = header.find('.nav'),
            items = nav.find('&gt;li');
            dropItem = nav.find('.more-nav'),
            itemsCount = 6,
            navMaxWidth = 0,
            win = jQuery(window),
            extraWidth = 50,
/*jshint -W030 */
            defaultHtml = navHolder.html();
/*jshint +W030 */

        function itemMove(){
            if (logo === undefined) {
                navMaxWidth = header.outerWidth() - extraWidth;
            } else {
                navMaxWidth = header.outerWidth() - logo.outerWidth() - extraWidth;
            }

            for (var i = 0; i &lt; items.length; i++) {
                items = nav.find('&gt;li');
                if(navMaxWidth &lt; navHolder.outerWidth() + extraWidth || itemsCount &lt; items.length) {
                    items.last().prev().prependTo(dropItem);
                } else {
                    if(navMaxWidth &gt; navHolder.outerWidth() + dropItem.find('&gt;li').first().outerWidth()) {
                        dropItem.find('&gt;li').first().insertBefore(items.last());
                    }
                }
            }
            var newItems = nav.find('&gt;li');
            for (var j = 0; j &lt; newItems.length-2; j++) {
                if(nav.find('&gt;li').length-1 &gt; itemsCount &amp;&amp; win.width() &lt; 1024) {
                    newItems.last().prev().prependTo(dropItem);
                }
            }
            if(!dropItem.children().length) {
                dropItem.parent().hide();
            } else {
                dropItem.parent().show();
            }
        }
        itemMove();
        header.bind('itemMove', itemMove);
        win.on('resize orientationchange load', itemMove);
        jQuery(window).bind('resize orientationchange fontresize', itemMove);

        function destroyStretchNav(){
            navHolder.unbind('destroyStretchNav', destroyStretchNav);
            // navHolder.html(defaultHtml);
        }
        navHolder.bind('destroyStretchNav', destroyStretchNav);
    });
}

function initSameHeight() {
    jQuery('.block-menu').sameHeight({
        elements: 'a.holder',
        flexible: true,
        multiLine: true,
        biggestHeight: true
    });
}

// initRefreshHeight
function initRefreshHeight(){
    var win = jQuery(window);
    var introBlock = jQuery('.intro-block');
    var minWidth = 599;
    jQuery('.search-form .form-slide').each(function(){
        var block = jQuery(this);
        if(!introBlock.length) return;
        function refresh(){
            if(win.width() &lt;= minWidth){
                block.css({height: introBlock.height()});
            } else {
                block.css({height: ''});
            }
        }
        win.bind('setHeight', function(){
            refresh();
        }).bind('resetHeight', function(){
            block.css({height: ''});
        }).bind('resize orientationchange', function(){
            refresh();
        });
    });

    /* show search form */
    jQuery('.search-form .form-slide').show();
}

function initSideBlock(){
    jQuery('.shedule-box').each(function(){
        var box = jQuery(this),
            opener = jQuery('.shedule-opener'),
            win = jQuery(window),
            activeClass = 'active',
            animSpeed = 300,
            body = jQuery('body'),
            isTouchDevice = /MSIE 10.*Touch/.test(navigator.userAgent) || ('ontouchstart' in window) || window.DocumentTouch &amp;&amp; document instanceof DocumentTouch,
            isWinPhoneDevice = navigator.msPointerEnabled &amp;&amp; /MSIE 10.*Touch/.test(navigator.userAgent);

        function defaultState(){
            box.css({
                width: win.outerWidth()*0.95,
                right: -win.outerWidth()*0.95 + opener.outerWidth()
            });
        }

        win.on('load orientationchange resize', defaultState);

        function showBox(){
            box.addClass(activeClass);
            box.stop().animate({
                right:0
            }, animSpeed);
        }
        function hideBox(){
            box.removeClass(activeClass);
            box.stop().animate({
                right:-win.outerWidth()*0.95 + opener.outerWidth()
            }, animSpeed);
        }
        opener.unbind(navigator.msPointerEnabled ? 'MSPointerDown' : 'touchstart click').bind(navigator.msPointerEnabled ? 'MSPointerDown' : 'touchstart click', function(e){
            e.preventDefault();
/*jshint -W030 */
            box.hasClass(activeClass) ? hideBox() : showBox();
/*jshint +W030 */
        });

        if (isTouchDevice &amp;&amp; !isWinPhoneDevice) {
            box.swipe({
                excludedElements: 'a, input',
                fallbackToMouseEvents: false,
                threshold: 15,
                allowPageScroll: 'vertical',
                swipe: function(event, direction) {
                    if(direction === 'left') {
                        showBox();
                    }
                    if(direction === 'right') {
                        hideBox();
                    }
                }
            });
        }

        function destroySideBox(){
            win.off('load orientationchange resize', defaultState);
            setTimeout(function(){
                opener.unbind(navigator.msPointerEnabled ? 'MSPointerDown' : 'touchstart click');
                box.unbind('destroySideBox', destroySideBox);
                box.removeClass(activeClass);
                box.removeAttr('style');
            }, 100);
        }

        box.bind('destroySideBox', destroySideBox);
    });
}

// form validation function
function initValidation() {
    var errorClass = 'error';
    var successClass = 'success';
    var regEmail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
    var regPhone = /^[0-9]+$/;

    jQuery('.popup-form').each(function(){
        var form = jQuery(this);
        var successFlag = true;
        var inputs = form.find('input:text, textarea, select');
        var errorBlock = form.find('.error-block');
        var errorBtnClose = errorBlock.find('.close-btn');

        // form validation function
        function validateForm() {
            successFlag = true;

            inputs.each(checkField);

            errorBtnClose.on('click', function(e){
                e.preventDefault();
                errorBlock.hide();
            });
            if(!successFlag) {
                errorBlock.show();
                return false;
            }
        }

        // check field
        function checkField(i, obj) {
            var currentObject = jQuery(obj);
            var currentParent = currentObject.parents('div.row');

            // not empty fields
            if(currentObject.hasClass('required')) {
                setState(currentParent, currentObject, !currentObject.val().length || currentObject.val() === currentObject.prop('defaultValue'));
            }
            // correct email fields
            if(currentObject.hasClass('required-email')) {
                setState(currentParent, currentObject, !regEmail.test(currentObject.val()));
            }
            // correct number fields
            if(currentObject.hasClass('required-number')) {
                setState(currentParent, currentObject, !regPhone.test(currentObject.val()));
            }
            // something selected
            if(currentObject.hasClass('required-select')) {
                setState(currentParent, currentObject, currentObject.get(0).selectedIndex === 0);
            }
        }

        // set state
        function setState(hold, field, error) {
            form.removeClass(errorClass).removeClass(successClass);
            if(error) {
                form.addClass(errorClass);
                field.one('focus',function(){hold.removeClass(errorClass).removeClass(successClass);});
                successFlag = false;
            } else {
                form.addClass(successClass);
            }
        }

        // form event handlers
        form.submit(validateForm);
    });
}

// fixed nav position
function initFixedNav(){
    jQuery('.intro-block').each(function(){
        var nav = jQuery(this),
            header = jQuery('#header'),
            navWrap = nav.find('.intro-wrap'),
            items = nav.find('.block-menu &gt;li &gt; a'),
            win = jQuery(window),
            page = jQuery('body, html'),
            fixedFlag = false,
            isTouchDevice = (('ontouchstart' in window) || window.DocumentTouch &amp;&amp; document instanceof DocumentTouch) &amp;&amp; !navigator.userAgent.match( /firefox/i ),
            isWinPhoneDevice = navigator.msPointerEnabled &amp;&amp; /MSIE 10.*Touch/.test(navigator.userAgent),
            maxHeight = 0,
            animSpeed = 300,
            mobileFlag = false;

        function getHeight(){
            for (var i = 0; i &lt; items.length; i++) {
                if(maxHeight &lt; items.eq(i).height()) {
                    maxHeight =  items.eq(i).height();
                }
            }
        }
        getHeight();

        items.each(function(){
            jQuery(this).css({
                height: maxHeight
            });
        });
        if(isTouchDevice || isWinPhoneDevice){
            return;
        }

        function fixedNav(){
            getHeight();
            if (win.scrollTop() + header.outerHeight() &gt; nav.offset().top) {
                navWrap.css({
                    top: header.outerHeight()
                });
                if(!fixedFlag) {
                    fixedFlag = true;
                    navWrap.css({
                        position: 'fixed',
                        left: 0,
                        width: '100%',
                        zIndex: 100
                    });
                    navWrap.addClass('fixed-state');

                    items.each(function(){
                        jQuery(this).stop().animate({
                            height: 0
                        }, {
                            duration: animSpeed
                        });
                    });
                }
            } else {
                if(fixedFlag) {
                    fixedFlag = false;
                    navWrap.css({
                        position: '',
                        left: '',
                        top: '',
                        width: '',
                        zIndex: ''
                    });
                    navWrap.removeClass('fixed-state');
                    items.each(function(){
                        jQuery(this).css({
                            height: maxHeight
                        });
                        getHeight();
                        jQuery(this).css({
                            height: 0
                        });
                        jQuery(this).stop().animate({
                            height: maxHeight
                        }, {
                            duration: animSpeed
                        });
                    });
                }
            }

            if(win.width() &lt; 599) {
                items.each(function(){
                    jQuery(this).stop().animate();
                    jQuery(this).css({
                        height: maxHeight
                    });
                });
            }
        }
        win.on('scroll resize orientationchange load', function(){
            if (jQuery('.block-menu').width() &gt; 599) {
                fixedNav();
            }
        });
    });
}

/*
 * jQuery SameHeight plugin
 */
;(function(){
    jQuery.fn.sameHeight = function(opt) {
        var options = jQuery.extend({
            skipClass: 'same-height-ignore',
            leftEdgeClass: 'same-height-left',
            rightEdgeClass: 'same-height-right',
            elements: '&gt;*',
            flexible: false,
            multiLine: false,
            useMinHeight: false,
            biggestHeight: false
        },opt);
        return this.each(function(){
            var holder = jQuery(this), postResizeTimer, ignoreResize;
            var elements = holder.find(options.elements).not('.' + options.skipClass);
            if(!elements.length) return;

            // resize handler
            function doResize() {
                elements.css(options.useMinHeight &amp;&amp; supportMinHeight ? 'minHeight' : 'height', '');
                if(options.multiLine) {
                    // resize elements row by row
                    resizeElementsByRows(elements, options);
                } else {
                    // resize elements by holder
                    resizeElements(elements, holder, options);
                }
            }
            doResize();

            // handle flexible layout / font resize
            var delayedResizeHandler = function() {
                if(!ignoreResize) {
                    ignoreResize = true;
                    doResize();
                    clearTimeout(postResizeTimer);
                    postResizeTimer = setTimeout(function() {
                        doResize();
                        setTimeout(function(){
                            ignoreResize = false;
                        }, 10);
                    }, 100);
                }
            };

            // handle flexible/responsive layout
            if(options.flexible) {
                jQuery(window).bind('resize orientationchange fontresize', delayedResizeHandler);
            }

            // handle complete page load including images and fonts
            jQuery(window).bind('load', delayedResizeHandler);
            function destroySameHeight(){
                holder.unbind('destroySameHeight', destroySameHeight);
                jQuery(window).unbind('resize orientationchange fontresize', delayedResizeHandler);
                jQuery(window).unbind('load', delayedResizeHandler);

                setTimeout(function(){
                    elements.filter(':first').removeClass(options.leftEdgeClass);
                    elements.filter(':last').removeClass(options.rightEdgeClass);
                    elements.css({height: ''});
                }, 10);
            }

            holder.bind('destroySameHeight', destroySameHeight);
        });
    };

    // detect css min-height support
    var supportMinHeight = typeof document.documentElement.style.maxHeight !== 'undefined';

    // get elements by rows
    function resizeElementsByRows(boxes, options) {
        var currentRow = jQuery(), maxHeight, maxCalcHeight = 0, firstOffset = boxes.eq(0).offset().top;

        boxes.each(function(ind){
            var curItem = jQuery(this);
            if(curItem.offset().top === firstOffset) {
                currentRow = currentRow.add(this);
            } else {
                maxHeight = getMaxHeight(currentRow);
                maxCalcHeight = Math.max(maxCalcHeight, resizeElements(currentRow, maxHeight, options));
                currentRow = curItem;
                firstOffset = curItem.offset().top;
            }
        });
        if(currentRow.length) {
            maxHeight = getMaxHeight(currentRow);
            maxCalcHeight = Math.max(maxCalcHeight, resizeElements(currentRow, maxHeight, options));
        }
        if(options.biggestHeight) {
            boxes.css(options.useMinHeight &amp;&amp; supportMinHeight ? 'minHeight' : 'height', maxCalcHeight);
        }
    }

    // calculate max element height
    function getMaxHeight(boxes) {
        var maxHeight = 0;
        boxes.each(function(){
            maxHeight = Math.max(maxHeight, jQuery(this).outerHeight());
        });
        return maxHeight;
    }

    // resize helper function
    function resizeElements(boxes, parent, options) {
        var calcHeight;
        var parentHeight = typeof parent === 'number' ? parent : parent.height();
        boxes.removeClass(options.leftEdgeClass).removeClass(options.rightEdgeClass).each(function(i){
            var element = jQuery(this);
            var depthDiffHeight = 0;
            var isBorderBox = element.css('boxSizing') === 'border-box';

            if(typeof parent !== 'number') {
                element.parents().each(function(){
                    var tmpParent = jQuery(this);
                    if(parent.is(this)) {
                        return false;
                    } else {
                        depthDiffHeight += tmpParent.outerHeight() - tmpParent.height();
                    }
                });
            }
            calcHeight = parentHeight - depthDiffHeight;
            calcHeight -= isBorderBox ? 0 : element.outerHeight() - element.height();

            if(calcHeight &gt; 0) {
                element.css(options.useMinHeight &amp;&amp; supportMinHeight ? 'minHeight' : 'height', calcHeight);
            }
        });
        boxes.filter(':first').addClass(options.leftEdgeClass);
        boxes.filter(':last').addClass(options.rightEdgeClass);
        return calcHeight;
    }
}(jQuery));

/*
 * jQuery FontResize Event
 */
jQuery.onFontResize = (function() {
    jQuery(function() {
        var randomID = 'font-resize-frame-' + Math.floor(Math.random() * 1000);
        var resizeFrame = jQuery('&lt;iframe&gt;').attr('id', randomID).addClass('font-resize-helper');

        // required styles
        resizeFrame.css({
            width: '100em',
            height: '10px',
            position: 'absolute',
            borderWidth: 0,
            top: '-9999px',
            left: '-9999px'
        }).appendTo('body');

        // use native IE resize event if possible
        if (window.attachEvent &amp;&amp; !window.addEventListener) {
            resizeFrame.bind('resize', function () {
                jQuery.onFontResize.trigger(resizeFrame[0].offsetWidth / 100);
            });
        }
        // use script inside the iframe to detect resize for other browsers
        else {
            var doc = resizeFrame[0].contentWindow.document;
            doc.open();
            doc.write('&lt;scri' + 'pt&gt;window.onload = function(){var em = parent.jQuery("#' + randomID + '")[0];window.onresize = function(){if(parent.jQuery.onFontResize){parent.jQuery.onFontResize.trigger(em.offsetWidth / 100);}}};&lt;/scri' + 'pt&gt;');
            doc.close();
        }
        this.initialSize = resizeFrame[0].offsetWidth / 100;
    });
    return {
        // public method, so it can be called from within the iframe
        trigger: function (em) {
            jQuery(window).trigger("fontresize", [em]);
        }
    };
}(jQuery));

// responsive layout handling
function initLayout() {
    (function( window, document, undefined )
    {
        jQuery.fn.doubleTapToGo = function( params )
        {
            //start DoubleTapToGo
            if( (!( 'ontouchstart' in window ) &amp;&amp;
                !navigator.msMaxTouchPoints &amp;&amp;
                !navigator.userAgent.toLowerCase().match( /windows phone os 7/i )
                ) ||
                navigator.userAgent.match( /firefox/i )
            ) {
                return false;
            }

            this.each( function()
            {
                var curItem = false;

                jQuery( this ).on( 'click', function( e )
                {
                    var item = jQuery( this );
                    if( item[ 0 ] != curItem[ 0 ] )
                    {
                        e.preventDefault(); 
                        curItem = item;
                    }
                });

                jQuery( document ).on( 'click touchstart MSPointerDown', function( e )
                {
                    var resetItem = true,
                        parents   = jQuery( e.target ).parents();
                    for( var i = 0; i &lt; parents.length; i++ )
                        if( parents[ i ] == curItem[ 0 ] )
                            resetItem = false;
                    if( resetItem )
                        curItem = false;
                });
            });
            return this;
        };
    })( window, document );

    // find elements
    var nav = jQuery('#nav');

    var clicked = false;

    // handle layout resize
    ResponsiveHelper.addRange({
        '..599': {
            on: function() {
                //set droplets where there is a submenu in dropmenu
                initMobileMenu();
                var dropletHolders = jQuery('#nav').find('.nav li:not(.more)').has('ul').find('&gt;a').append('&lt;span class="hasSubMenu"&gt;&amp;#9660;&lt;/span&gt;');
                dropletHolders.find('.hasSubMenu').each(function() {
                    jQuery(this).on('click touchend', function (e) {
                        console.log('Click click click');
                                e.stopPropagation();
                            e.preventDefault();

                            jQuery(this).closest('li').find('.sub-menu').toggle();
                    });
                });
            },
            off: function() {
                //remove droplets where there is a submenu in dropmenu
                nav.find('span.hasSubMenu').remove();
            }
        },
        '600..': {
            on: function() {
                // handle mobile phones using pure css
                initStretchNav();
                jQuery( '#nav li:has(.drop-holder):not(.more)' ).doubleTapToGo();
            },
            off: function() {
                // handle mobile phones using pure css
                jQuery('.drop-holder').each(function(){
                    jQuery(this).trigger('destroyStretchNav');
                });
            }
        },
        '601..990': {
            on: function() {
                initRepositionBox();
            },
            off: function() {
                jQuery('#main').trigger('destroyMoveBlocks');
            }
        }
    });

    /* show main menu, more menu and search popup */
    jQuery('.header-block').show();
}

function initRepositionBox(){
    var mainHolder = jQuery('#main'),
        moveBlocksHolder = jQuery('&lt;div class="move-block-holder"&gt;').appendTo(mainHolder);

    jQuery('.move-block').each(function(){
        var block = jQuery(this),
            cloneBlock = block.clone().addClass('move-active').appendTo(moveBlocksHolder);

        function destroyMoveBlocks(){
            moveBlocksHolder.remove();
        }
        mainHolder.bind('destroyMoveBlocks', destroyMoveBlocks);
    });
}

function initMobileMenu(){
    jQuery('#header').mobileNav({
        opener: '.nav-opener',
        nav: '.header-block',
        wrapper:'.page-frame',
        closeBtn: '.close',
        activeClass: 'active',
        animProp: 258,
        animSpeed: 500
    });

    // adjust padding of #main when there's 2 or less icons in the icon
    if( jQuery('.intro-block .block-menu &gt; li').size() &lt;= 2 ) {
        jQuery('#main').css('padding-top', '120px');
    }
}

jQuery.fn.mobileNav = function(options){
  var options = jQuery.extend({
    opener: '.btn-menu',
    nav: '.nav-holder',
    wrapper:'#wrapper',
    closeBtn: '.close',
    activeClass: 'active',
    animProp: 258,
    animSpeed: 500
  }, options);

  return this.each(function(){
    var holder = jQuery(this),
      opener = holder.find(options.opener),
      nav = holder. find(options.nav),
      wrapper = jQuery(options.wrapper),
      closeBtn = holder.find(options.closeBtn);

    nav.css({
      left: -options.animProp
    });
    // show navigation
    function showNav(e){
      holder.addClass(options.activeClass);
      wrapper.stop().animate({
        marginRight: -options.animProp,
        marginLeft: options.animProp
      }, options.animSpeed);
      jQuery(window).bind('click touchstart', outsideClickHandler);
    }
    // hide navigation
    function hideNav(){
      holder.removeClass(options.activeClass);
      wrapper.stop().animate({
        marginRight: 0,
        marginLeft: 0
      }, options.animSpeed);
      jQuery(window).unbind('click touchstart', outsideClickHandler);
    }
    // outside click handler
    function outsideClickHandler(e){
      if(!holder.has(e.target).length) {
        hideNav();
      }
    }
    jQuery(window).unbind('click touchstart', outsideClickHandler);

    // event handler
    opener.on('click', function(e){
      if (!holder.hasClass(options.activeClass)) {
        showNav();
      } else {
        hideNav();
      }
    });
    closeBtn.on('click', hideNav);

    // destroy
    function destroyMibileNav(){
      holder.unbind('destroyMibileNav', destroyMibileNav);
      wrapper.css({margin: ''});
      holder.removeClass(options.activeClass);
      opener.off('click');
      closeBtn.off('click');
    }

    holder.bind('destroyMibileNav', destroyMibileNav);
  });
};

// open-close init
function initOpenClose() {
    /*
     * jQuery Open/Close plugin
     */
    ;(function() {
        function OpenClose(options) {
            this.options = jQuery.extend({
                addClassBeforeAnimation: true,
                hideOnClickOutside: false,
                activeClass:'active',
                opener:'.opener',
                slider:'.slide',
                animSpeed: 400,
                effect:'fade',
                event:'click'
            }, options);
            this.init();
        }
        OpenClose.prototype = {
            init: function() {
                if(this.options.holder) {
                    this.findElements();
                    this.attachEvents();
                    this.makeCallback('onInit');
                }
            },
            findElements: function() {
                this.holder = jQuery(this.options.holder);
                this.opener = this.holder.find(this.options.opener);
                this.slider = this.holder.find(this.options.slider);
            },
            attachEvents: function() {
                // add handler
                var self = this;
                this.eventHandler = function(e) {
                    e.preventDefault();
                    if (self.slider.hasClass(slideHiddenClass)) {
                        self.showSlide();
                    } else {
                        self.hideSlide();
                    }
                };
                self.opener.bind(self.options.event, this.eventHandler);

                // hover mode handler
                if(self.options.event === 'over') {
                    self.opener.bind('mouseenter', function() {
                        self.showSlide();
                    });
                    self.holder.bind('mouseleave', function() {
                        self.hideSlide();
                    });
                }

                // outside click handler
                self.outsideClickHandler = function(e) {
                    if(self.options.hideOnClickOutside) {
                        var target = jQuery(e.target);
                        if (!target.is(self.holder) &amp;&amp; !target.closest(self.holder).length) {
                            self.hideSlide();
                        }
                    }
                };

                // set initial styles
                if (this.holder.hasClass(this.options.activeClass)) {
                    jQuery(document).bind('click touchstart', self.outsideClickHandler);
                } else {
                    this.slider.addClass(slideHiddenClass);
                }
            },
            showSlide: function() {
                var self = this;
                if (self.options.addClassBeforeAnimation) {
                    self.holder.addClass(self.options.activeClass);
                }
                self.slider.removeClass(slideHiddenClass);
                jQuery(document).bind('click touchstart', self.outsideClickHandler);

                self.makeCallback('animStart', true);
                toggleEffects[self.options.effect].show({
                    box: self.slider,
                    speed: self.options.animSpeed,
                    complete: function() {
                        if (!self.options.addClassBeforeAnimation) {
                            self.holder.addClass(self.options.activeClass);
                        }
                        self.makeCallback('animEnd', true);
                    }
                });
            },
            hideSlide: function() {
                var self = this;
                if (self.options.addClassBeforeAnimation) {
                    self.holder.removeClass(self.options.activeClass);
                }
                jQuery(document).unbind('click touchstart', self.outsideClickHandler);

                self.makeCallback('animStart', false);
                toggleEffects[self.options.effect].hide({
                    box: self.slider,
                    speed: self.options.animSpeed,
                    complete: function() {
                        if (!self.options.addClassBeforeAnimation) {
                            self.holder.removeClass(self.options.activeClass);
                        }
                        self.slider.addClass(slideHiddenClass);
                        self.makeCallback('animEnd', false);
                    }
                });
            },
            destroy: function() {
                this.slider.removeClass(slideHiddenClass).css({display:''});
                this.opener.unbind(this.options.event, this.eventHandler);
                this.holder.removeClass(this.options.activeClass).removeData('OpenClose');
                jQuery(document).unbind('click touchstart', this.outsideClickHandler);
            },
            makeCallback: function(name) {
                if(typeof this.options[name] === 'function') {
                    var args = Array.prototype.slice.call(arguments);
                    args.shift();
                    this.options[name].apply(this, args);
                }
            }
        };

        // add stylesheet for slide on DOMReady
        var slideHiddenClass = 'js-slide-hidden';
        jQuery(function() {
            var tabStyleSheet = jQuery('&lt;style type="text/css"&gt;')[0];
            var tabStyleRule = '.' + slideHiddenClass;
            tabStyleRule += '{position:absolute !important;left:-9999px !important;top:-9999px !important;display:block !important}';
            if (tabStyleSheet.styleSheet) {
                tabStyleSheet.styleSheet.cssText = tabStyleRule;
            } else {
                tabStyleSheet.appendChild(document.createTextNode(tabStyleRule));
            }
            jQuery('head').append(tabStyleSheet);
        });

        // animation effects
        var toggleEffects = {
            slide: {
                show: function(o) {
                    o.box.stop(true).hide().slideDown(o.speed, o.complete);
                },
                hide: function(o) {
                    o.box.stop(true).slideUp(o.speed, o.complete);
                }
            },
            fade: {
                show: function(o) {
                    o.box.stop(true).hide().fadeIn(o.speed, o.complete);
                },
                hide: function(o) {
                    o.box.stop(true).fadeOut(o.speed, o.complete);
                }
            },
            none: {
                show: function(o) {
                    o.box.hide().show(0, o.complete);
                },
                hide: function(o) {
                    o.box.hide(0, o.complete);
                }
            }
        };

		// jQuery plugin interface
        jQuery.fn.openClose = function(opt) {
			return this.each(function() {
				jQuery(this).data('OpenClose', new OpenClose(jQuery.extend(opt, {holder: this})));
			});
		};
	}());
	
	var win = jQuery(window);
	jQuery('.search-form').openClose({
		hideOnClickOutside: true,
		activeClass: 'active',
		opener: '.opener',
		slider: ' .form-slide',
		animSpeed: 400,
		effect: 'slide',
		animEnd: function(obj){
			if(obj){
				win.trigger('setHeight');
			} else {
				win.trigger('resetHeight');
			}
		}
	});
	jQuery('li.more').openClose({
		hideOnClickOutside: true,
		activeClass: 'active',
		opener: '.extra-open',
		slider: '.extra-nav',
		animSpeed: 400,
		effect: 'slide',
		event: 'mouseover touchstart',
		animEnd: function(obj){
			var windowHeight = jQuery(window).height();
			var headerHeight = jQuery('#header').height();
			var extraSpacing = 43; /* adjustment to fit the bottom exactly */
			var lineHeight = 22;
			var difference = jQuery('#plusMenuList').height() - ( windowHeight - headerHeight - extraSpacing);
			
			if( jQuery('#plusMenuList').hasClass('js-slide-hidden') === false &amp;&amp; difference &gt;= lineHeight) { /* more than about a line difference */
				jQuery('#plusMenuList').wrap('&lt;div id="plusMenu"&gt;&lt;/div&gt;');
				jQuery('#plusMenu').wrap('&lt;div id="plusWrapper" class="more-nav"&gt;&lt;/div&gt;');
				
				/* max height used instead of height, allows the openclose plugin to close the menu nicely too */
				jQuery('#plusWrapper').css('max-height', windowHeight - headerHeight - lineHeight + 'px');
				jQuery('#plusMenuList').removeClass('more-nav');
				plusScroll();
			} else {
				jQuery('#plusMenuList').addClass('more-nav');
				jQuery('#plusWrapper').contents().unwrap();
				jQuery('#plusMenu').contents().unwrap();
				plusStopScroll();
			}
			
			if(obj){
				win.trigger('setHeight');
			} else {
				win.trigger('resetHeight');
			}
		}
	});
	/*jQuery('.shedule-box').openClose({
		activeClass: 'active',
		opener: '.shedule-opener',
		slider: '.shedule-slide',
		hideOnClickOutside: true,
		animSpeed: 400,
		effect: 'slide'
	});*/
	
	/* show more menu */
	jQuery('.more .more-nav').show();
}

// popups init
function initPopups() {
    /*
     * Popups plugin
     */
    ;(function() {
        function ContentPopup(opt) {
            this.options = jQuery.extend({
                holder: null,
                popup: '.popup',
                btnOpen: '.open',
                btnClose: '.close',
                openClass: 'popup-active',
                clickEvent: 'click',
                mode: 'click',
                hideOnClickLink: true,
                hideOnClickOutside: true,
                delay: 50
            }, opt);
            if(this.options.holder) {
                this.holder = jQuery(this.options.holder);
                this.init();
            }
        }
        ContentPopup.prototype = {
            init: function() {
                this.findElements();
                this.attachEvents();
            },
            findElements: function() {
                this.popup = this.holder.find(this.options.popup);
                this.btnOpen = this.holder.find(this.options.btnOpen);
                this.btnClose = this.holder.find(this.options.btnClose);
            },
            attachEvents: function() {
                // handle popup openers
                var self = this;
                this.clickMode = isTouchDevice || (self.options.mode === self.options.clickEvent);

                if(this.clickMode) {
                    // handle click mode
                    this.btnOpen.bind(self.options.clickEvent, function(e) {
                        if(self.holder.hasClass(self.options.openClass)) {
                            if(self.options.hideOnClickLink) {
                                self.hidePopup();
                            }
                        } else {
                            self.showPopup();
                        }
                        e.preventDefault();
                    });

                    // prepare outside click handler
                    this.outsideClickHandler = this.bind(this.outsideClickHandler, this);
                } else {
                    // handle hover mode
                    var timer, delayedFunc = function(func) {
                        clearTimeout(timer);
                        timer = setTimeout(function() {
                            func.call(self);
                        }, self.options.delay);
                    };
                    this.btnOpen.bind('mouseover', function() {
                        delayedFunc(self.showPopup);
                    }).bind('mouseout', function() {
                        delayedFunc(self.hidePopup);
                    });
                    this.popup.bind('mouseover', function() {
                        delayedFunc(self.showPopup);
                    }).bind('mouseout', function() {
                        delayedFunc(self.hidePopup);
                    });
                }

                // handle close buttons
                this.btnClose.bind(self.options.clickEvent, function(e) {
                    self.hidePopup();
                    e.preventDefault();
                });
            },
            outsideClickHandler: function(e) {
                // hide popup if clicked outside
                var currentNode = (e.changedTouches ? e.changedTouches[0] : e).target;
                if(!jQuery(currentNode).parents().filter(this.holder).length) {
                    this.hidePopup();
                }
            },
            showPopup: function() {
                // reveal popup
                this.holder.addClass(this.options.openClass);
                this.popup.css({display:'block'});

                // outside click handler
                if(this.clickMode &amp;&amp; this.options.hideOnClickOutside &amp;&amp; !this.outsideHandlerActive) {
                    this.outsideHandlerActive = true;
                    jQuery(document).bind('click touchstart', this.outsideClickHandler);
                }
            },
            hidePopup: function() {
                // hide popup
                this.holder.removeClass(this.options.openClass);
                this.popup.css({display:'none'});

                // outside click handler
                if(this.clickMode &amp;&amp; this.options.hideOnClickOutside &amp;&amp; this.outsideHandlerActive) {
                    this.outsideHandlerActive = false;
                    jQuery(document).unbind('click touchstart', this.outsideClickHandler);
                }
            },
            bind: function(f, scope, forceArgs){
                return function() {return f.apply(scope, forceArgs ? [forceArgs] : arguments);};
            }
        };

        // detect touch devices
        var isTouchDevice = /MSIE 10.*Touch/.test(navigator.userAgent) || ('ontouchstart' in window) || window.DocumentTouch &amp;&amp; document instanceof DocumentTouch;

        // jQuery plugin interface
        jQuery.fn.contentPopup = function(opt) {
            return this.each(function() {
                new ContentPopup(jQuery.extend(opt, {holder: this}));
            });
        };
    }());

    jQuery('li.popup-holder').contentPopup({
        mode: 'click',
        popup: 'div.popup',
        btnOpen: 'a.open'
    });
}

// clear inputs on focus
function initInputs() {
    PlaceholderInput.replaceByOptions({
        // filter options
        clearInputs: true,
        clearTextareas: true,
        clearPasswords: true,
        skipClass: 'dzg-widget-searchForm-searchQuery',

        // input options
        wrapWithElement: true,
        showUntilTyping: false,
        getParentByClass: false,
        placeholderAttr: 'placeholder'
    });
}

/*
 * Responsive Layout helper
 */
ResponsiveHelper = (function(){
    // init variables
    var handlers = [];
    var win = jQuery(window), prevWinWidth;
    var scrollBarWidth = 0;

    // prepare resize handler
    function resizeHandler() {
        var winWidth = win.width() + scrollBarWidth;
        if(winWidth !== prevWinWidth) {
            prevWinWidth = winWidth;

            // loop through range groups
            jQuery.each(handlers, function(index, rangeObject){
                // disable current active area if needed
                jQuery.each(rangeObject.data, function(property, item) {
                    if((winWidth &lt; item.range[0] || winWidth &gt; item.range[1]) &amp;&amp; item.currentActive) {
                        item.currentActive = false;
                        if(typeof item.disableCallback === 'function') {
                            item.disableCallback();
                        }
                    }
                });

                // enable areas that match current width
                jQuery.each(rangeObject.data, function(property, item) {
                    if(winWidth &gt;= item.range[0] &amp;&amp; winWidth &lt;= item.range[1] &amp;&amp; !item.currentActive) {
                        // make callback
                        item.currentActive = true;
                        if(typeof item.enableCallback === 'function') {
                            item.enableCallback();
                        }
                    }
                });
            });
        }
    }
    win.bind('load', function(){
        if((jQuery.browser.mozilla || jQuery.browser.opera || jQuery.browser.msie) &amp;&amp; window.addEventListener) {
            scrollBarWidth = window.innerWidth - jQuery('body').width();
            resizeHandler();
        }
        win.bind('resize orientationchange', resizeHandler);
    });

    // range parser
    function parseRange(rangeStr) {
        var rangeData = rangeStr.split('..');
        var x1 = parseInt(rangeData[0], 10) || -Infinity;
        var x2 = parseInt(rangeData[1], 10) || Infinity;
        return [x1, x2].sort(function(a, b){
            return a - b;
        });
    }

    // export public functions
    return {
        addRange: function(ranges) {
            // parse data and add items to collection
            var result = {data:{}};
            jQuery.each(ranges, function(property, data){
                result.data[property] = {
                    range: parseRange(property),
                    enableCallback: data.on,
                    disableCallback: data.off
                };
            });
            handlers.push(result);

            // call resizeHandler to recalculate all events
            prevWinWidth = null;
            resizeHandler();
        }
    };
}(jQuery));

/*
 * Browser platform detection
 */
PlatformDetect = (function(){
    var detectModules = {};

    // try to detect css folder path
    var detectedPath, links = document.getElementsByTagName('link');
    for(var i = 0; i &lt; links.length; i++) {
        if(links[i].getAttribute('media') === 'all') {
            detectedPath = links[i].getAttribute('href');
            if(detectedPath) {
                detectedPath = detectedPath.replace(/[^\/]*$/, '');
                break;
            }
        }
    }

    return {
        options: {
            cssPath: 'css/'
        },
        addModule: function(obj) {
            detectModules[obj.type] = obj;
        },
        addRule: function(rule) {
            if(this.matchRule(rule)) {
                this.applyRule(rule);
                return true;
            }
        },
        matchRule: function(rule) {
            return detectModules[rule.type].matchRule(rule);
        },
        applyRule: function(rule) {
            var head = document.getElementsByTagName('head')[0], fragment, cssText;
            if(rule.css) {
                cssText = '&lt;link rel="stylesheet" href="' + (detectedPath || this.options.cssPath) + rule.css + '" /&gt;';
                if(head) {
                    fragment = document.createElement('div');
                    fragment.innerHTML = cssText;
                    head.appendChild(fragment.childNodes[0]);
                } else {
                    document.write(cssText);
                }
            }

            if(rule.meta) {
                if(head) {
                    fragment = document.createElement('div');
                    fragment.innerHTML = rule.meta;
                    head.appendChild(fragment.childNodes[0]);
                } else {
                    document.write(rule.meta);
                }
            }
        },
        matchVersions: function(host, target) {
            target = target.toString();
            host = host.toString();

            var majorVersionMatch = parseInt(target, 10) === parseInt(host, 10);
            var minorVersionMatch = (host.length &gt; target.length ? host.indexOf(target) : target.indexOf(host)) === 0;

            return majorVersionMatch &amp;&amp; minorVersionMatch;
        }
    };
}());

// All Mobile detection
PlatformDetect.addModule({
    type: 'allmobile',
    uaMatch: function(str) {
        if(!this.ua) {
            this.ua = navigator.userAgent.toLowerCase();
        }
        return this.ua.indexOf(str.toLowerCase()) !== -1;
    },
    matchRule: function(rule) {
        return this.uaMatch('mobi') || this.uaMatch('midp') || this.uaMatch('ppc') || this.uaMatch('webos') || this.uaMatch('android') || this.uaMatch('phone os') || this.uaMatch('touch');
    }
});

// Windows Phone detection
PlatformDetect.addModule({
    type: 'winphone',
    parseUserAgent: function() {
        var match = /(Windows Phone OS) ([0-9.]*).*/.exec(navigator.userAgent);
        if(match) {
            return {
                version: match[2]
            };
        }
        if(/MSIE 10.*Touch/.test(navigator.userAgent)) {
            return {
                version: 8
            };
        }
    },
    matchRule: function(rule) {
        this.matchData = this.matchData || this.parseUserAgent();
        if(this.matchData) {
            return rule.version ? PlatformDetect.matchVersions(this.matchData.version, rule.version) : true;
        }
    }
});

// Detect rules
//PlatformDetect.addRule({type: 'allmobile', css: 'allmobile.css'});
PlatformDetect.addRule({type: 'winphone', version: 8, css: 'winphone.css'});

// placeholder class
;(function(){
    var placeholderCollection = [];
    PlaceholderInput = function() {
        this.options = {
            element:null,
            showUntilTyping:false,
            wrapWithElement:false,
            getParentByClass:false,
            showPasswordBullets:false,
            placeholderAttr:'value',
            inputFocusClass:'focus',
            inputActiveClass:'text-active',
            parentFocusClass:'parent-focus',
            parentActiveClass:'parent-active',
            labelFocusClass:'label-focus',
            labelActiveClass:'label-active',
            fakeElementClass:'input-placeholder-text'
        };
        placeholderCollection.push(this);
        this.init.apply(this,arguments);
    };
    PlaceholderInput.refreshAllInputs = function(except) {
        for(var i = 0; i &lt; placeholderCollection.length; i++) {
            if(except !== placeholderCollection[i]) {
                placeholderCollection[i].refreshState();
            }
        }
    };
    PlaceholderInput.replaceByOptions = function(opt) {
        var inputs = [].concat(
            convertToArray(document.getElementsByTagName('input')),
            convertToArray(document.getElementsByTagName('textarea'))
        );
        for(var i = 0; i &lt; inputs.length; i++) {
            if(inputs[i].className.indexOf(opt.skipClass) &lt; 0) {
                var inputType = getInputType(inputs[i]);
                var placeholderValue = inputs[i].getAttribute('placeholder');
                if(opt.focusOnly || (opt.clearInputs &amp;&amp; (inputType === 'text' || inputType === 'email' || placeholderValue)) ||
                    (opt.clearTextareas &amp;&amp; inputType === 'textarea') ||
                    (opt.clearPasswords &amp;&amp; inputType === 'password')
                ) {
                    new PlaceholderInput({
                        element:inputs[i],
                        focusOnly: opt.focusOnly,
                        wrapWithElement:opt.wrapWithElement,
                        showUntilTyping:opt.showUntilTyping,
                        getParentByClass:opt.getParentByClass,
                        showPasswordBullets:opt.showPasswordBullets,
                        placeholderAttr: placeholderValue ? 'placeholder' : opt.placeholderAttr
                    });
                }
            }
        }
    };
    PlaceholderInput.prototype = {
        init: function(opt) {
            this.setOptions(opt);
            if(this.element &amp;&amp; this.element.PlaceholderInst) {
                this.element.PlaceholderInst.refreshClasses();
            } else {
                this.element.PlaceholderInst = this;
                if(this.elementType !== 'radio' || this.elementType !== 'checkbox' || this.elementType !== 'file') {
                    this.initElements();
                    this.attachEvents();
                    this.refreshClasses();
                }
            }
        },
        setOptions: function(opt) {
            for(var p in opt) {
                if(opt.hasOwnProperty(p)) {
                    this.options[p] = opt[p];
                }
            }
            if(this.options.element) {
                this.element = this.options.element;
                this.elementType = getInputType(this.element);
                if(this.options.focusOnly) {
                    this.wrapWithElement = false;
                } else {
                    if(this.elementType === 'password' &amp;&amp; this.options.showPasswordBullets) {
                        this.wrapWithElement = false;
                    } else {
                        this.wrapWithElement = this.elementType === 'password' || this.options.showUntilTyping ? true : this.options.wrapWithElement;
                    }
                }
                this.setPlaceholderValue(this.options.placeholderAttr);
            }
        },
        setPlaceholderValue: function(attr) {
            this.origValue = (attr === 'value' ? this.element.defaultValue : (this.element.getAttribute(attr) || ''));
            if(this.options.placeholderAttr !== 'value') {
                this.element.removeAttribute(this.options.placeholderAttr);
            }
        },
        initElements: function() {
            // create fake element if needed
            if(this.wrapWithElement) {
                this.fakeElement = document.createElement('span');
                this.fakeElement.className = this.options.fakeElementClass;
                this.fakeElement.innerHTML += this.origValue;
                this.fakeElement.style.color = getStyle(this.element, 'color');
                this.fakeElement.style.position = 'absolute';
                this.element.parentNode.insertBefore(this.fakeElement, this.element);

                if(this.element.value === this.origValue || !this.element.value) {
                    this.element.value = '';
                    this.togglePlaceholderText(true);
                } else {
                    this.togglePlaceholderText(false);
                }
            } else if(!this.element.value &amp;&amp; this.origValue.length) {
                this.element.value = this.origValue;
            }
            // get input label
            if(this.element.id) {
                this.labels = document.getElementsByTagName('label');
                for(var i = 0; i &lt; this.labels.length; i++) {
                    if(this.labels[i].htmlFor === this.element.id) {
                        this.labelFor = this.labels[i];
                        break;
                    }
                }
            }
            // get parent node (or parentNode by className)
            this.elementParent = this.element.parentNode;
            if(typeof this.options.getParentByClass === 'string') {
                var el = this.element;
                while(el.parentNode) {
                    if(hasClass(el.parentNode, this.options.getParentByClass)) {
                        this.elementParent = el.parentNode;
                        break;
                    } else {
                        el = el.parentNode;
                    }
                }
            }
        },
        attachEvents: function() {
            this.element.onfocus = bindScope(this.focusHandler, this);
            this.element.onblur = bindScope(this.blurHandler, this);
            if(this.options.showUntilTyping) {
                this.element.onkeydown = bindScope(this.typingHandler, this);
                this.element.onpaste = bindScope(this.typingHandler, this);
            }
            if(this.wrapWithElement) this.fakeElement.onclick = bindScope(this.focusSetter, this);
        },
        togglePlaceholderText: function(state) {
            if(!this.element.readOnly &amp;&amp; !this.options.focusOnly) {
                if(this.wrapWithElement) {
                    this.fakeElement.style.display = state ? '' : 'none';
                } else {
                    this.element.value = state ? this.origValue : '';
                }
            }
        },
        focusSetter: function() {
            this.element.focus();
        },
        focusHandler: function() {
            clearInterval(this.checkerInterval);
            this.checkerInterval = setInterval(bindScope(this.intervalHandler,this), 1);
            this.focused = true;
            if(!this.element.value.length || this.element.value === this.origValue) {
                if(!this.options.showUntilTyping) {
                    this.togglePlaceholderText(false);
                }
            }
            this.refreshClasses();
        },
        blurHandler: function() {
            clearInterval(this.checkerInterval);
            this.focused = false;
            if(!this.element.value.length || this.element.value === this.origValue) {
                this.togglePlaceholderText(true);
            }
            this.refreshClasses();
            PlaceholderInput.refreshAllInputs(this);
        },
        typingHandler: function() {
            setTimeout(bindScope(function(){
                if(this.element.value.length) {
                    this.togglePlaceholderText(false);
                    this.refreshClasses();
                }
            },this), 10);
        },
        intervalHandler: function() {
            if(typeof this.tmpValue === 'undefined') {
                this.tmpValue = this.element.value;
            }
            if(this.tmpValue != this.element.value) {
                PlaceholderInput.refreshAllInputs(this);
            }
        },
        refreshState: function() {
            if(this.wrapWithElement) {
                if(this.element.value.length &amp;&amp; this.element.value !== this.origValue) {
                    this.togglePlaceholderText(false);
                } else if(!this.element.value.length) {
                    this.togglePlaceholderText(true);
                }
            }
            this.refreshClasses();
        },
        refreshClasses: function() {
            this.textActive = this.focused || (this.element.value.length &amp;&amp; this.element.value !== this.origValue);
            this.setStateClass(this.element, this.options.inputFocusClass,this.focused);
            this.setStateClass(this.elementParent, this.options.parentFocusClass,this.focused);
            this.setStateClass(this.labelFor, this.options.labelFocusClass,this.focused);
            this.setStateClass(this.element, this.options.inputActiveClass, this.textActive);
            this.setStateClass(this.elementParent, this.options.parentActiveClass, this.textActive);
            this.setStateClass(this.labelFor, this.options.labelActiveClass, this.textActive);
        },
        setStateClass: function(el,cls,state) {
            if(!el) return; else if(state) addClass(el,cls); else removeClass(el,cls);
        }
    };

    // utility functions
    function convertToArray(collection) {
        var arr = [];
        for (var i = 0, ref = arr.length = collection.length; i &lt; ref; i++) {
            arr[i] = collection[i];
        }
        return arr;
    }
    function getInputType(input) {
        return (input.type ? input.type : input.tagName).toLowerCase();
    }
    function hasClass(el,cls) {
        return el.className ? el.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)')) : false;
    }
    function addClass(el,cls) {
        if (!hasClass(el,cls)) el.className += " "+cls;
    }
    function removeClass(el,cls) {
        if (hasClass(el,cls)) {el.className=el.className.replace(new RegExp('(\\s|^)'+cls+'(\\s|$)'),' ');}
    }
    function bindScope(f, scope) {
        return function() {return f.apply(scope, arguments);};
    }
    function getStyle(el, prop) {
        if (document.defaultView &amp;&amp; document.defaultView.getComputedStyle) {
            return document.defaultView.getComputedStyle(el, null)[prop];
        } else if (el.currentStyle) {
            return el.currentStyle[prop];
        } else {
            return el.style[prop];
        }
    }
}());

// font resize script
FontResize = {
    options: {
        maxStep: 1.5,
        defaultFS: 1,
        resizeStep: 0.1,
        resizeHolder: 'body',
        cookieName: 'fontResizeCookie'
    },
    init: function() {
        this.runningLocal = (location.protocol.indexOf('file:') === 0);
        this.setDefaultScaling();
        this.addDefaultHandlers();
    },
    addDefaultHandlers: function() {
        this.addHandler('increase','inc');
        this.addHandler('decrease','dec');
        this.addHandler('reset');
        this.addHandler('increase2','inc');
        this.addHandler('decrease2','dec');
        this.addHandler('reset2');
    },
    setDefaultScaling: function() {
        if(this.options.resizeHolder === 'html') { this.resizeHolder = document.documentElement; }
        else { this.resizeHolder = document.body; }
        var cSize = this.getCookie(this.options.cookieName);
        if(!this.runningLocal &amp;&amp; cSize) {
            this.fSize = parseFloat(cSize,10);
        } else {
            this.fSize = this.options.defaultFS;
        }
        this.changeSize();
    },
    changeSize: function(direction) {
        if(typeof direction !== 'undefined') {
            if(direction == 1) {
                this.fSize += this.options.resizeStep;
                if (this.fSize &gt; this.options.defaultFS * this.options.maxStep) this.fSize = this.options.defaultFS * this.options.maxStep;
            } else if(direction == -1) {
                this.fSize -= this.options.resizeStep;
                if (this.fSize &lt; this.options.defaultFS / this.options.maxStep) this.fSize = this.options.defaultFS / this.options.maxStep;
            } else {
                this.fSize = this.options.defaultFS;
            }
        }
        this.resizeHolder.style.fontSize = this.fSize + 'em';
        this.updateCookie(this.fSize.toFixed(2));

        // refresh Cufon if present
        if(typeof Cufon !== 'undefined' &amp;&amp; typeof Cufon.refresh === 'function') {
            Cufon.refresh();
        }
        return false;
    },
    addHandler: function(obj, type) {
        if(typeof obj === 'string') { obj = document.getElementById(obj); }
        if(obj &amp;&amp; obj.tagName) {
            switch (type) {
                case 'inc':
                    obj.onclick = this.bind(this.changeSize,this, [1]);
                    break;
                case 'dec':
                    obj.onclick = this.bind(this.changeSize,this, [-1]);
                    break;
                default:
                    obj.onclick = this.bind(this.changeSize,this, [0]);
            }
        }
    },
    updateCookie: function(scaleLevel) {
        if(!this.runningLocal) {
            this.setCookie(this.options.cookieName,scaleLevel);
        }
    },
    getCookie: function(name) {
        var matches = document.cookie.match(new RegExp("(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"));
        return matches ? decodeURIComponent(matches[1]) : undefined;
    },
    setCookie: function(name, value) {
        var exp = new Date();
        exp.setTime(exp.getTime()+(30*24*60*60*1000));
        document.cookie = name + '=' + value + ';' +'expires=' + exp.toGMTString() + ';' +'path=/';
    },
    bind: function(fn, scope, args){
        return function() {
            return fn.apply(scope, args || arguments);
        };
    }
};

function scrollToElement(element) {
    var header = jQuery('#header');
    var iconElement = jQuery('article.intro-block .block-menu li .holder')[0];
    var iconMenuHeight = parseInt( jQuery(iconElement).css('padding-top') ) + parseInt( jQuery(iconElement).css('padding-bottom') );
    var position = header.css("position");
    var ypos = element.offset().top;

    if(position === 'fixed' || position === 'absolute') {
        jQuery("html, body").animate({ scrollTop: ypos - header.height() - iconMenuHeight }, "slow");
    } else {
        jQuery("html, body").animate({ scrollTop: ypos }, "slow");
    }
}

/*
* touchSwipe - jQuery Plugin
* https://github.com/mattbryson/TouchSwipe-Jquery-Plugin
* http://labs.skinkers.com/touchSwipe/
* http://plugins.jquery.com/project/touchSwipe
*
* Copyright (c) 2010 Matt Bryson (www.skinkers.com)
* Dual licensed under the MIT or GPL Version 2 licenses.
*
* $version: 1.5.1
*/
;(function(d){var l="left",k="right",c="up",r="down",b="in",s="out",i="none",o="auto",u="horizontal",p="vertical",f="all",e="start",h="move",g="end",m="cancel",a="ontouchstart" in window,t="TouchSwipe";var j={fingers:1,threshold:75,maxTimeThreshold:null,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,triggerOnTouchEnd:true,allowPageScroll:"auto",fallbackToMouseEvents:true,excludedElements:"button, input, select, textarea, a, .noSwipe"};d.fn.swipe=function(x){var w=d(this),v=w.data(t);if(v&amp;&amp;typeof x==="string"){if(v[x]){return v[x].apply(this,Array.prototype.slice.call(arguments,1))}else{d.error("Method "+x+" does not exist on jQuery.swipe")}}else{if(!v&amp;&amp;(typeof x==="object"||!x)){return q.apply(this,arguments)}}return w};d.fn.swipe.defaults=j;d.fn.swipe.phases={PHASE_START:e,PHASE_MOVE:h,PHASE_END:g,PHASE_CANCEL:m};d.fn.swipe.directions={LEFT:l,RIGHT:k,UP:c,DOWN:r,IN:b,OUT:s};d.fn.swipe.pageScroll={NONE:i,HORIZONTAL:u,VERTICAL:p,AUTO:o};d.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:f};function q(v){if(v&amp;&amp;(v.allowPageScroll===undefined&amp;&amp;(v.swipe!==undefined||v.swipeStatus!==undefined))){v.allowPageScroll=i}if(!v){v={}}v=d.extend({},d.fn.swipe.defaults,v);return this.each(function(){var x=d(this);var w=x.data(t);if(!w){w=new n(this,v);x.data(t,w)}})}function n(J,R){var aj=(a||!R.fallbackToMouseEvents),ae=aj?"touchstart":"mousedown",K=aj?"touchmove":"mousemove",ac=aj?"touchend":"mouseup",I="touchcancel";var P=0;var E=null;var S=0;var af=0;var w=0;var U=1;var ak=0;var A=d(J);var F="start";var ai=0;var T=null;var B=0;var M=0;try{A.bind(ae,aa);A.bind(I,D)}catch(ag){d.error("events not supported "+ae+","+I+" on jQuery.swipe")}this.enable=function(){A.bind(ae,aa);A.bind(I,D);return A};this.disable=function(){H();return A};this.destroy=function(){H();A.data(t,null);return A};function aa(ao){if(L()){return}if(d(ao.target).closest(R.excludedElements,A).length&gt;0){return}ao=ao.originalEvent;var an,am=a?ao.touches[0]:ao;F=e;if(a){ai=ao.touches.length}else{ao.preventDefault()}P=0;E=null;ak=null;S=0;af=0;w=0;U=1;T=al();if(!a||(ai===R.fingers||R.fingers===f)||W()){T[0].start.x=T[0].end.x=am.pageX;T[0].start.y=T[0].end.y=am.pageY;B=x();if(ai==2){T[1].start.x=T[1].end.x=ao.touches[1].pageX;T[1].start.y=T[1].end.y=ao.touches[1].pageY;af=w=N(T[0].start,T[1].start)}if(R.swipeStatus||R.pinchStatus){an=ah(ao,F)}}else{D(ao);an=false}if(an===false){F=m;ah(ao,F);return an}else{V(true);A.bind(K,G);A.bind(ac,O)}}function G(ap){ap=ap.originalEvent;if(F===g||F===m){return}var an,am=a?ap.touches[0]:ap;T[0].end.x=a?ap.touches[0].pageX:am.pageX;T[0].end.y=a?ap.touches[0].pageY:am.pageY;M=x();E=Z(T[0].start,T[0].end);if(a){ai=ap.touches.length}F=h;if(ai==2){if(af==0){T[1].start.x=ap.touches[1].pageX;T[1].start.y=ap.touches[1].pageY;af=w=N(T[0].start,T[1].start)}else{T[1].end.x=ap.touches[1].pageX;T[1].end.y=ap.touches[1].pageY;w=N(T[0].end,T[1].end);ak=X(T[0].end,T[1].end)}U=v(af,w)}if((ai===R.fingers||R.fingers===f)||!a){y(ap,E);P=z(T[0].start,T[0].end);S=C(T[0].start,T[0].end);if(R.swipeStatus||R.pinchStatus){an=ah(ap,F)}if(!R.triggerOnTouchEnd){var ao=!Y();if(Q()===true){F=g;an=ah(ap,F)}else{if(ao){F=m;ah(ap,F)}}}}else{F=m;ah(ap,F)}if(an===false){F=m;ah(ap,F)}}function O(at){at=at.originalEvent;if(at.touches&amp;&amp;at.touches.length&gt;0){return true}at.preventDefault();M=x();if(af!=0){w=N(T[0].end,T[1].end);U=v(af,w);ak=X(T[0].end,T[1].end)}P=z(T[0].start,T[0].end);E=Z(T[0].start,T[0].end);S=C();if(R.triggerOnTouchEnd||(R.triggerOnTouchEnd===false&amp;&amp;F===h)){F=g;var ap=ad()||!W();var an=((ai===R.fingers||R.fingers===f)||!a);var am=T[0].end.x!==0;var ao=(an&amp;&amp;am&amp;&amp;ap);if(ao){var aq=Y();var ar=Q();if((ar===true||ar===null)&amp;&amp;aq){ah(at,F)}else{if(!aq||ar===false){F=m;ah(at,F)}}}else{F=m;ah(at,F)}}else{if(F===h){F=m;ah(at,F)}}A.unbind(K,G,false);A.unbind(ac,O,false);V(false)}function D(){ai=0;M=0;B=0;af=0;w=0;U=1;V(false)}function ah(ao,am){var an=undefined;if(R.swipeStatus){an=R.swipeStatus.call(A,ao,am,E||null,P||0,S||0,ai)}if(R.pinchStatus&amp;&amp;ad()){an=R.pinchStatus.call(A,ao,am,ak||null,w||0,S||0,ai,U)}if(am===m){if(R.click&amp;&amp;(ai===1||!a)&amp;&amp;(isNaN(P)||P===0)){an=R.click.call(A,ao,ao.target)}}if(am==g){if(R.swipe){an=R.swipe.call(A,ao,E,P,S,ai)}switch(E){case l:if(R.swipeLeft){an=R.swipeLeft.call(A,ao,E,P,S,ai)}break;case k:if(R.swipeRight){an=R.swipeRight.call(A,ao,E,P,S,ai)}break;case c:if(R.swipeUp){an=R.swipeUp.call(A,ao,E,P,S,ai)}break;case r:if(R.swipeDown){an=R.swipeDown.call(A,ao,E,P,S,ai)}break}switch(ak){case b:if(R.pinchIn){an=R.pinchIn.call(A,ao,ak||null,w||0,S||0,ai,U)}break;case s:if(R.pinchOut){an=R.pinchOut.call(A,ao,ak||null,w||0,S||0,ai,U)}break}}if(am===m||am===g){D(ao)}return an}function Q(){if(R.threshold!==null){return P&gt;=R.threshold}return null}function Y(){var am;if(R.maxTimeThreshold){if(S&gt;=R.maxTimeThreshold){am=false}else{am=true}}else{am=true}return am}function y(am,an){if(R.allowPageScroll===i||W()){am.preventDefault()}else{var ao=R.allowPageScroll===o;switch(an){case l:if((R.swipeLeft&amp;&amp;ao)||(!ao&amp;&amp;R.allowPageScroll!=u)){am.preventDefault()}break;case k:if((R.swipeRight&amp;&amp;ao)||(!ao&amp;&amp;R.allowPageScroll!=u)){am.preventDefault()}break;case c:if((R.swipeUp&amp;&amp;ao)||(!ao&amp;&amp;R.allowPageScroll!=p)){am.preventDefault()}break;case r:if((R.swipeDown&amp;&amp;ao)||(!ao&amp;&amp;R.allowPageScroll!=p)){am.preventDefault()}break}}}function C(){return M-B}function N(ap,ao){var an=Math.abs(ap.x-ao.x);var am=Math.abs(ap.y-ao.y);return Math.round(Math.sqrt(an*an+am*am))}function v(am,an){var ao=(an/am)*1;return ao.toFixed(2)}function X(){if(U&lt;1){return s}else{return b}}function z(an,am){return Math.round(Math.sqrt(Math.pow(am.x-an.x,2)+Math.pow(am.y-an.y,2)))}function ab(ap,an){var am=ap.x-an.x;var ar=an.y-ap.y;var ao=Math.atan2(ar,am);var aq=Math.round(ao*180/Math.PI);if(aq&lt;0){aq=360-Math.abs(aq)}return aq}function Z(an,am){var ao=ab(an,am);if((ao&lt;=45)&amp;&amp;(ao&gt;=0)){return l}else{if((ao&lt;=360)&amp;&amp;(ao&gt;=315)){return l}else{if((ao&gt;=135)&amp;&amp;(ao&lt;=225)){return k}else{if((ao&gt;45)&amp;&amp;(ao&lt;135)){return r}else{return c}}}}}function x(){var am=new Date();return am.getTime()}function H(){A.unbind(ae,aa);A.unbind(I,D);A.unbind(K,G);A.unbind(ac,O);V(false)}function W(){return R.pinchStatus||R.pinchIn||R.pinchOut}function ad(){return ak&amp;&amp;W()}function L(){return A.data(t+"_intouch")===true?true:false}function V(am){am=am===true?true:false;A.data(t+"_intouch",am)}function al(){var am=[];for(var an=0;an&lt;=5;an++){am.push({start:{x:0,y:0},end:{x:0,y:0},delta:{x:0,y:0}})}return am}}})(jQuery); // jshint ignore:line

/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors &amp; copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
;window.matchMedia=window.matchMedia||(function(e,f){var c,a=e.documentElement,b=a.firstElementChild||a.firstChild,d=e.createElement("body"),g=e.createElement("div");g.id="mq-test-1";g.style.cssText="position:absolute;top:-100em";d.appendChild(g);return function(h){g.innerHTML='&amp;shy;&lt;style media="'+h+'"&gt; #mq-test-1 { width: 42px; }&lt;/style&gt;';a.insertBefore(d,b);c=g.offsetWidth==42;a.removeChild(d);return{matches:c,media:h}}})(document); // jshint ignore:line

/*! Picturefill - Responsive Images that work today. (and mimic the proposed Picture element with span elements). Author: Scott Jehl, Filament Group, 2012 | License: MIT/GPLv2 */
;(function(a){a.picturefill=function(){var b=a.document.getElementsByTagName("span");for(var f=0,l=b.length;f&lt;l;f++){if(b[f].getAttribute("data-picture")!==null){var c=b[f].getElementsByTagName("span"),h=[];for(var e=0,g=c.length;e&lt;g;e++){var d=c[e].getAttribute("data-media");if(!d||(a.matchMedia&amp;&amp;a.matchMedia(d).matches)){h.push(c[e])}}var m=b[f].getElementsByTagName("img")[0];if(h.length){var k=h.pop();if(!m||m.parentNode.nodeName==="NOSCRIPT"){m=a.document.createElement("img");m.alt=b[f].getAttribute("data-alt")}if(k.getAttribute("data-width")){m.setAttribute("width",k.getAttribute("data-width"))}else{m.removeAttribute("width")}if(k.getAttribute("data-height")){m.setAttribute("height",k.getAttribute("data-height"))}else{m.removeAttribute("height")}m.src=k.getAttribute("data-src");k.appendChild(m)}else{if(m){m.parentNode.removeChild(m)}}}}};if(a.addEventListener){a.addEventListener("resize",a.picturefill,false);a.addEventListener("DOMContentLoaded",function(){a.picturefill();a.removeEventListener("load",a.picturefill,false)},false);a.addEventListener("load",a.picturefill,false)}else{if(a.attachEvent){a.attachEvent("onload",a.picturefill)}}}(this)); // jshint ignore:line
</pre></body></html>