var Phonebox = {
	
	call: function () {
		if (skypeCheck()) {
			window.location = "skype:" + PHONE_NUMBER + "?call";
		} else {
			window.open("/how?call", "_blank");
		}
	},
	
	auto_call: function () {
		if (window.location.search.indexOf("call") != -1) {
			Phonebox.silent_call();
		}
	},
	
	silent_call: function () {
		var iframe = document.createElement("iframe");
		iframe.src = "skype:" + PHONE_NUMBER + "?call";
		iframe.style.width = "0px";
		iframe.style.height = "0px";
		iframe.style.overflow = "hidden";
		document.body.appendChild(iframe);
	},
	
	localize: function (locale) {
		window.location = window.location.protocol + "//" + window.location.host + window.location.pathname + "?language=" + locale;
	},
	
	hide_locales: function () {
		document.getElementById('player').call({ PATH_INFO: '/locales/hide' });
	},
	
	load_acquisition_env: function () {
		window.chCustomSegment = { channel: "viral", source: "tvf", group: "global|any|all", detail: "experiential|phonebox" };
	}
	
}
