//load only collections if user not logged in,as banners comes from ssi.
var username;
$(document).ready(function() {
Invoker.userIdentify(function(data){
	Invoker.updateSignIn(data);
    if(username){
        getLayoutData("index");
    } else {
        getLayoutData("index","collections","default");
        // Currently, logged in users first see the "non-logged-in" banner, which is replaced a few seconds later by the three banners at the top.
        // It should simply show the three banners on the initial load.
        // Inorder to avoid this "repalce" thingy, hide all the banners during load (using css) and
        // use JS to toggle it.
        if($("div.TopBodyWidth").html()!=null && $("div.TopBodyWidth").html()!="")
        {
            $("div.TopBodyWidth").css({
                "display" : "block"
            });
        }
        if($("div.BottomBodyWidth").html()!=null && $("div.BottomBodyWidth").html()!="")
        {
            $("div.BottomBodyWidth").css({
                "display" : "block"
            });
        }
        if($("div.BottomFullWidth").html()!=null && $("div.BottomFullWidth").html()!="")
        {
            $("div.BottomFullWidth").css({
                "display" : "block"
            });
        }
        if($("div.TopFullWidth").html()!=null && $("div.TopFullWidth").html()!="")
        {
            $("div.TopFullWidth").css({
                "display" : "block"
            });
        }
        if($("div.Side").html()!=null && $("div.Side").html()!="")
        {
            $("div.Side").css({
                "display" : "block"
            });
        }
    }
});
});

