﻿//$(document).ready(function() {
    //$("#closePortal").click(function() {
        //$("#iframeForSpecialContent").attr({ src: "" });
        //$("#portalWrapper").hide();
        //hideFog();
        //history.back();
        //return false;
    //});
//});

function closePopUp(ContentMode) {

    $("#iframeForSpecialContent").attr({ src: "" });
    $("#portalWrapper").hide();
    hideFog();
    //if (ContentMode == "Search")
    //history.back();
    //window.setTimeout(top.location.href = top.location.href,1000);
    //top.location.href = top.location.href;
    return false;
}

//add and remove fog.
function hideFog() {
    document.getElementById('fog').style.display = "none";
    //document.getElementById('loadingPic').style.display = "none";	
}

function addFog() {
    document.getElementById('fog').style.display = "block";
    //document.getElementById('loadingPic').style.display = "block";		    
}

function loadShop() {
    addFog();
    $("#iframeForSpecialContent").attr({ src: "" });
    $("#iframeForSpecialContent").attr({ src: "/shop.asp" });
    $("#portalWrapper").show();
    $("#PopUpTitle").addClass('titleOnlineShop');
    return false;
}

function loadShopNew() {
    addFog();
    $("#iframeForSpecialContent").attr({ src: "" });
    //$("#iframeForSpecialContent").attr({ src: "/shop.asp" });
    //$("#iframeForSpecialContent").attr({ src: "http://project-geibeltbad-pirnade.medial-services.com/shop/default.aspx" });
    $("#iframeForSpecialContent").attr({ src: "/shop_new/default.aspx" });
    $("#portalWrapper").show();
    //$("#PopUpTitle").addClass('titleOnlineShop');

    //new
    $("#portalWrapper").css("width", "1005px");
    $("#portalWrapper").css("margin-left", "-60px");
    $("#portalWrapper").css("top", "0px");
    $("#iframeForSpecialContent").attr({ width: "1005px" });
    $("#iframeForSpecialContent").attr({ height: "680px" });
    $(".iframeHolder").css("width", "1005px");
    $(".iframeHolder").css("height", "735px");
    $(".iframeWrapper").css("margin-top", "60px");
	$(".iframeWrapper").css("background", "url(/shop_new/images/bg.png) no-repeat scroll 0 60px transparent");
    $(".iframeWrapper").css("width", "1005px");
    $(".iframeWrapper").css("height", "660px");
    $(".iframeBackground").hide();
    $(".closeBtn").hide();
    $(".flower").hide();
    $(".titleOnlineShop").hide();
    
    return false;
}

function modifyFog(lightUp) {
    if (lightUp) $("#fog").addClass("more");
    else $("#fog").removeClass("more");
}

function loadOnlineGame() {
    addFog();
    $("#iframeForSpecialContent").attr({ src: "" });
    $("#iframeForSpecialContent").attr({ src: "/gewinnspiel.htm" });
    $("#portalWrapper").show();
    clearPopUpTitle();
    $("#PopUpTitle").addClass('titleOnlineGame');
    return false;
}

function loadPress() {
    addFog();
    $("#iframeForSpecialContent").attr({ src: "" });
    $("#iframeForSpecialContent").attr({ src: "/press.asp" });
    $("#portalWrapper").show();
    clearPopUpTitle();
    $("#PopUpTitle").addClass('titlePress');
    return false;
}

function loadInfo() {
    addFog();
    $("#iframeForSpecialContent").attr({ src: "" });
    $("#iframeForSpecialContent").attr({ src: "/info.asp" });
    $("#portalWrapper").show();
    clearPopUpTitle();
    //$("#PopUpTitle").addClass('titleInfo');
    return false;
}

function loadSearch() {
    addFog();
    $("#iframeForSpecialContent").attr({ src: "" });
    $("#iframeForSpecialContent").attr({ src: "/search.aspx" });
    $("#portalWrapper").show();
    clearPopUpTitle();
    $("#PopUpTitle").addClass('titleSearch');
    return false;
}

function clearPopUpTitle() 
{
    $("#PopUpTitle").removeClass('titleOnlineShop');
    $("#PopUpTitle").removeClass('titleOnlineGame');
    $("#PopUpTitle").removeClass('titleSearch');
    $("#PopUpTitle").removeClass('titlePress');
}
