/* Firebug console fallback */
if (typeof (console) == 'undefined')
    var console = { log: function (e) { return; } };

if (typeof (ts) == 'undefined') {
    var ts = {

        openIframeBox: function (src, width, height, padding, hideOnClick) {
            if (!src) return false;
            $.fancybox({
                type: 'iframe',
                href: src,
                modal: false,
                width: width || 910,
                height: height || 600,
                overlayShow: true,
                padding: padding || 0,
                margin: 0,
                hideOnOverlayClick: hideOnClick || false,
                transitionIn: 'none',
                transitionOut: 'none',
                enableEscapeButton: true,
                showCloseButton: true,
                autoDimensions: true
            });
            return true;
        },

        openYoutubeBox: function (youtubeVideoId, autoPlay) {
            var ytUrl = "/tools/yt-player.aspx?v=" + (youtubeVideoId || '');
            return this.openIframeBox(ytUrl, null, null, 0, false);
        },

        openSiteInfo: function (lang) {
            if (!lang) lang = 'de';
            return this.openIframeBox("/tools/infocenter-iframe-" + lang + ".aspx", null, null, null, false);
        }

    };

}


