﻿GoodNites.Home = function(serverVars) {
    this.ServerVars = serverVars;
    this.Initialize();
};
GoodNites.Home.prototype = {
    Initialize: function() {
        var path = "/Swf/Home.swf";
        
        // If we are in the production or QA environment, 
        // we need to prepend the /na directory to root
        if (document.location.href.indexOf("goodnites.com") != -1) {
            path = "/na" + path;
        }
        
        $(serverVars.homeFlashSelector).flash({
            swf: path,
            width: "960",
            height: 302,
            hasVersion: 8,
            params: {
                wmode: "opaque"
            }
        });
    }
};
GoodNites.Extend(GoodNites.Home, GoodNites.Core);