$(document).ready(function(){
    if ($("#overview").val()=="whois") {
        $("#testLink").click();
    }
    if ($('#testimonials').length>0)
    {
        $('#testimonials').jshowoff({
            speed:6000,
            links:false
        });
    }
});

function goModal(vid) {
    $('#basic-modal-content').html('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" height="390" width="640" allowfullscreen="true"><param name="movie" value="http://www.youtube.com/v/'+vid+'"/><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://www.youtube.com/v/'+vid+'" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="640" height="390"/></object>');
    $('#basic-modal-content').modal();
    
    return false;
}

function launchVideo(vname, vtitle, width, height)
{
    var settings = "width=630,height=550";
    if (width != null && height != null)
    {
        settings = "width=" + width + ",height=" + height;
    }
    
    var mynewwindow = window.open("http://files.contractpal.com/flash/" + vname, vtitle, "resizable=no,toolbar=no,location=no," + settings);
    mynewwindow.focus();
}

function windowOpen(url, title, params)
{
    var newwindow = window.open(url, title, params);
    newwindow.focus();
}

function openTab(lyr)
{
    document.getElementById(lyr).style.display = 'block';
}

function closeTab(lyr)
{ /* there has got to be an easier way to do this */
    document.getElementById(lyr).style.display = 'none';
    
}

