﻿GoodNites.Twinkle = function(serverVars) {
    this.ServerVars = serverVars;
    this.Initialize();
};
GoodNites.Twinkle.prototype = {
    Initialize: function() {
        var path = "/Swf/StarryNight.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.twinkleSelector).flash({
            swf: path,
            width: "100%",
            height: 625,
            hasVersion: 8,
            params: {
                wmode: "transparent"
            }
        });
    }
};
GoodNites.Extend(GoodNites.Twinkle, GoodNites.Core);