﻿var blnSSL = (location.href.toLowerCase().split("://", 1)[0] == 'https');
var blnTest = (location.href.indexOf("http://test-") == 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 (blnTest)
    strHostPrefix = "test-";
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.co.kr/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.co.kr/mu/",
    SSL: strProtocol + "ssl.webzen.co.kr/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 + "/"
}
