function initPortfolio()
{
    // init video or image scriptacularness
    var e = document.getElementById('video_wrapper');
    if (e != null)
    {
        var flashvars = {
            allowfullscreen:"true",
            allowscriptaccess:"always",
            controlbar:"none"
            };
        swfobject.embedSWF("/images/player.swf", "video", "640", "425", "9.0.0", null, flashvars);
        // init_album is called by playerReady which is called when the player
        // is really ready to receive content

        // initialize the video caption modal
        initVideoOverlay();
    }
    else
    {
        initSlideCaption(640, 582);
        init_album();
    }
}
addLoadEvent(initPortfolio);

// =======================
// = Video Caption Modal =
// =======================

var videoModal;

function initVideoOverlay ()
{
    videoModal = new YAHOO.widget.Panel("videoModal", {
        modal: true,
        fixedcenter: true,
        constraintoviewport: true,
        underlay: "shadow",
        close: true,
        visible: false,
        zIndex: 10,
        monitorresize: false } );
    videoModal.render();
}

function showvideoModal()
{
    if (browser.isIE6x)
    {
        // window.location = '/login';
        // return false;
    }

    var e = document.getElementById('videoModal');
    e.style.display = 'block';

    videoModal.show();

    return false;
}

