var lkRootDir = '/';
/**/
jQuery(document).ready(
    function () {
        //Local anchors animation
        //jQuery.localScroll();

        var tVideoOverlayEl = jQuery("<div class='js-popup'><div class='js-popup-top'><div class='js-popup-bottom'><div class='js-popup-content' style='padding:0;'></div><div class='ta-center'><a class='close'>CLOSE</a></div></div></div></div>");
        jQuery('body').append(tVideoOverlayEl);
        var player = flowplayer(jQuery('.js-popup-content', tVideoOverlayEl).get(0), {
              src: lkRootDir + "media/swf/flowplayer-3.1.5.swf",
              wmode: 'opaque', height: 333
           }, { clip: { scaling: 'fit' } });
        var tVideoOverlay = tVideoOverlayEl.overlay({
            speed: 3000,
            target: tVideoOverlayEl.get(0),
            expose: '#004b8e',
            onClose: function () {
                player.unload();
            },
            api: true
        });
        jQuery('.js-video-trigger').click(function () {
            tVideoOverlay.load();
            player.play(this.href);
            jQuery('.js-popup-title', tVideoOverlayEl).html(this.title);
            return false;
        });

        /*-- --- --*/
        var tWindowOverlayEl = jQuery("<div class='js-popup'><div class='js-popup-top'><div class='js-popup-bottom'><div class='js-popup-content'></div><div class='ta-center'><a class='close'>CLOSE</a></div></div></div></div>");
        jQuery('body').append(tWindowOverlayEl);
        //jQuery('.js-popup-content', tWindowOverlayEl).prepend("<div class='js-popup-head'><span class='js-popup-title'></span></div><div class='js-popup-content'></div>");
        var tWindowOverlay = tWindowOverlayEl.overlay({
            speed: 3000,
            target: tWindowOverlayEl.get(0),
            expose: '#004b8e',
            onClose: function () {
            },
            api: true
        });
        jQuery('.js-text-window-trigger').click(function () {
            tWindowOverlay.load();
            jQuery('.js-popup-title', tWindowOverlayEl).html(this.title);
            jQuery('.js-popup-content', tWindowOverlayEl).html(jQuery('.js-trigger-content', this).html());
            return false;
        });
    }
);

