﻿GoodNites.StorybookFlash = function(serverVars) {
    this.ServerVars = serverVars;
    this.Initialize();
};
GoodNites.StorybookFlash.prototype = {
    Initialize: function() {
    var path = "/Swf/StorybookFlash.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.StorybookFlash).flash({
            swf: path,
            width: 206,
            height: 303,
            hasVersion: 8,
            params: {
                wmode: "transparent"
            },
            flashvars: {
                thisBook: serverVars.SelectedBook
            }
        });
    }
};
GoodNites.Extend(GoodNites.StorybookFlash, GoodNites.Core);

