$(document).ready(function(){
	$("ul.sublinks li a").attr('href', 'javascript:void(0)');
	$("div.content-cnt").hide();
	$("#" + self.document.location.hash.substring(1)).fadeIn(1200);
	
	$("ul.sublinks li a").click(function(){
		link = $(this);
		uri = link.attr('rel');
		$("div.content-cnt:visible").fadeOut(750, function(){
			$("#" + uri).fadeIn(1200);
		});
		if(uri == 'how-do-i-get-started')
			loadLytebox('formbox');
	});

	if(self.document.location.hash.substring(1) == 'how-do-i-get-started')
		loadLytebox('formbox');

	$("#video").cycle();
});
timeoutID = null;
function loadLytebox(id) {
    if (typeof myLytebox != 'undefined') {
        // if the myLytebox object exists, start it up!
        var a = document.createElement("a");
        a.href = "../form/view/template/contact";
        a.rel = "lyteframe";
        a.title = "Contact Us";
        a.rev = "width: 370px; height: 620px; scrolling: no; border: 0;";
        myLytebox.start( a, false, true);
    } else {
        // wait 1/10th of a second and attempt loading again...
        if (timeoutID) { clearTimeout(timeoutID); }
        timeoutID = setTimeout('loadLytebox()', 100);
    }
    
}