﻿var blnSSL = (location.href.toLowerCase().split("://", 1)[0] == 'https');
var blnLocal = (location.href.indexOf("http://local-")==0);
var blnDev = (location.href.indexOf("http://dev-")==0);
var blnBeta = (location.href.indexOf("http://beta-")==0);
var blnLive = false;

var strProtocol = "http://";
var strTopDomain = "muonline.co.kr";

if (blnLocal)
    strHostPrefix = "local-";
else if (blnDev)
    strHostPrefix = "dev-";
else if (blnBeta)
    strHostPrefix = "beta-";
else {
    blnLive = true;
    strProtocol = "https://";
    strHostPrefix = "";
}

var strHttpContentDir   = "http://" + strHostPrefix + "www." + strTopDomain + "/";
var strHttpBlueDir      = "http://" + strHostPrefix + "blue." + strTopDomain + "/";
var strHttpImageDir     = "http://image.webzen.com/mu/";
var strHttpClubDir      = "http://"+strHostPrefix+"club."+strTopDomain+"/";
var strHttpMemberDir    = strProtocol + strHostPrefix + "member." + strTopDomain + "/";
var strHttpSearchDir    = "http://" + strHostPrefix + "search." + strTopDomain + "/";
var strHttpEventDir     = "http://" + strHostPrefix + "event." + strTopDomain + "/";
var strHttpPaymentDir   = "http://payment." + strTopDomain + "/";
var strHttpBlueShopDir  = "http://blueshop." + strTopDomain + "/";
var strHttpUploadDir    = "http://" + strHostPrefix + "upload." + strTopDomain + "/";

// Http Url
var Http = {
    Content: "http://" + strHostPrefix + "www." + strTopDomain + "/",
    Blue: "http://" + strHostPrefix + "blue." + strTopDomain + "/",
    Image : "http://image.webzen.com/mu/",
    Club : "http://" + strHostPrefix + "club." + strTopDomain + "/",
    Member : strProtocol + strHostPrefix + "member." + strTopDomain + "/",
    Search : "http://" + strHostPrefix + "search." + strTopDomain + "/",
    Event : "http://" + strHostPrefix + "event." + strTopDomain + "/",
    Payment: "http://payment." + strTopDomain + "/",
    BlueShop: "http://blueshop." + strTopDomain + "/",
    Upload : "http://" + strHostPrefix + "upload." + strTopDomain + "/"
}
