﻿sCurrentPage = 'about';

function InitTabs(sCurrentTab) {
    ToggleTab('tabAbout' + sCurrentTab, 'on');
            
    $("#containerLandingContent a").hover(
        function() {
            var sTabID = 'tabAbout' + $(this).attr('id');
            ToggleTab(sTabID, 'on');
        }, function() {
            var sTabID = 'tabAbout' + $(this).attr('id');
            if ($(this).attr('id') != sCurrentTab) {
                ToggleTab(sTabID, 'off');
            }
        }
    );
}

function InitFAQs() {
    $('.FAQsTopic a').click(
        function() {
            var dFAQsTopic = $(this).parent();
            
            // Hide all topics
            $('#FAQsCopy p').hide();
            
            // Show selected topic
            $('p', dFAQsTopic).show();
        }
    );
}

function isInteger(s) {
    return (s.toString().search(/^-?[0-9]+$/) == 0);
}

function ShowNews(nNewsID) {
    //Show the current news article
    //var nNewsID = 3;
    
    if(isInteger(nNewsID)) {
        $('#newsArticle' + nNewsID).show();
    }
    else {
        $('#newsArticle3').show();
    }
}