window.addEvent("domready", init);

function init() {
	as_config = new Array();
	as_assets = new Array();
	as_global = new Array();
	as_config["external_link_expression"] = "schwab|aboutschwab.com/|addthis.com|businesswire.com|hire.com";
	as_config["speedbump_copy"] = "You are now leaving AboutSchwab.com and accessing a third party web site that is not affiliated with Charles Schwab & Co., Inc. (\"Schwab\"). Schwab does not endorse this site, its sponsors, or any of the products or services offered on the site.";
	as_config["url_pressReleases"] = "/data/press.xml";
	as_config["defaultValue_search"] = "Enter keyword";
	if (Browser.Engine.trident) {
		as_config["IEVariable"] = "value"
	}
	if (Browser.Engine.trident4) {
		as_config["IE6Variable"] = "value"
	}
	as_assets.push(new Request.HTML({
		async: false,
		evalResponse: true
	}).get("/js/classes/Overlay_c.js"));
	as_global["speedbump_href"] = null;
	as_global["js_heightMatch_maxHeight"] = 0;
	as_constructElements();
	aboutschwab();
}




function as_constructElements() {
	new Element("div", {
		'id': "speedbump",
		'class': "mainTxt"
	}).setStyle("opacity", 0).inject(document.body, "top");
	new Element("div", {
		'class': "btn btn_ok"
	}).inject($("speedbump"), "top").addEvent("click", function () {
		window.location = as_global["speedbump_href"]
	});
	new Element("div", {
		'class': "btn btn_cancel"
	}).inject($("speedbump"), "top").addEvent("click", function () {
		dialog.fade("hide")
	});
	new Element("div", {
		'class': "icon"
	}).inject($("speedbump"), "top");
	new Element("div", {
		'class': "copy",
		'html': as_config["speedbump_copy"]
	}).inject($("speedbump"), "top")
}
function aboutschwab() {
	if (!(typeof Overlay == "undefined")) {
		dialog = new Overlay.Dialog($("speedbump"));
		overlay = new Overlay.Screen({
			'opacity': 0.6,
			'styles': {
				'min-width': 811
			}
		});
		overlay.addEvent("visible", function () {
			dialog.fade("in")
		});
		dialog.addEvent("hidden", function () {
			overlay.fade("out")
		})
	}
	$$("a").addEvents({
		'click': function (e) {
			if (!this.hasClass("nospeedbump") && this.hostname.length > 0 && this.hostname != location.hostname && !this.hostname.test(as_config["external_link_expression"])) {
				new Event(e).stop();
				as_global["speedbump_href"] = this.href;
				this.blur();
				overlay.fade("in")
			}
		}
	});
	
	window.addEvent('domready',function() {
	$$('.comments_toggle').each(function(el) {
		var href = el.get('href');
		href = href.substr(href.lastIndexOf('#') + 1);
		$(href).set('slide').slide('hide');
		//Togles the comment-box in and out
		el.addEvent('click', function(e){
			e.stop();
			$(href).slide('toggle');
		});
	});
	$$('.share_toggle').each(function(el) {
		var href = el.get('href');
		href = href.substr(href.lastIndexOf('#') + 1);
		$(href).set('slide').slide('hide');
		//Togles the comment-box in and out
		el.addEvent('click', function(e){
			e.stop();
			$(href).slide('toggle');
		});
	});
});
	
	
	
	}

