

// DOM Loader
var DomLoaded =
{
	onload: [],
	loaded: function()
	{
		if (arguments.callee.done) return;
		arguments.callee.done = true;
		for (i = 0;i < DomLoaded.onload.length;i++) DomLoaded.onload[i]();
	},
	load: function(fireThis)
	{
		this.onload.push(fireThis);
		if (document.addEventListener) 
			document.addEventListener("DOMContentLoaded", DomLoaded.loaded, null);
		if (/KHTML|WebKit/i.test(navigator.userAgent))
		{ 
			var _timer = setInterval(function()
			{
				if (/loaded|complete/.test(document.readyState))
				{
					clearInterval(_timer);
					delete _timer;
					DomLoaded.loaded();
				}
			}, 10);
		}
		/*@cc_on @*/
		/*@if (@_win32)
		var proto = "src='javascript:void(0)'";
		if (location.protocol == "https:") proto = "src=//0";
		document.write("<scr"+"ipt id=__ie_onload defer " + proto + "><\/scr"+"ipt>");
		var script = document.getElementById("__ie_onload");
		script.onreadystatechange = function() {
		    if (this.readyState == "complete") {
		        DomLoaded.loaded();
		    }
		};
		/*@end @*/
	   window.onload = DomLoaded.loaded;
	}
};

// Load everything up!
DomLoaded.load(function() {
	tabberAutomatic(tabberOptions);	// Load the tabs
	initShowHideDivs();				// Load the slides
	//showHideContent(false,1);});	// Automatically expand first item - disabled by default
});


window.addEvent('domready', function() 
{
	
	var Tips1 = new Tips($$('.tips'));

	if(faqjump = $('faqjump')) 
	{
	  	faqjump.addEvent('click',function(e)
	  	{
	  		e = new Event(e).stop();
	  		var count = 0;
	  		var tab_div = false;
	  		$$('ul.jchts_tabbernav li a').each(function(current)
	  		{
	  			currentLI = current.getParent();
	  			currentLI.removeClass('jchts_tabberactive');
				if(current.title == 'FAQ') 
				{
					tab_div = count;
					currentLI.addClass('jchts_tabberactive');
				}
				count++;
			});
			var div_count = 0;
			$$('div#jchts_tab div').each(function(tabed_div)
			{
				tabed_div.addClass('jchts_tabbertabhide');
	  			if(div_count == tab_div) 
	  			{
	  				tabed_div.removeClass('jchts_tabbertabhide');
	  			}
	  			div_count++;
			});
	  	});
	  }
});