﻿function showLightBox(index) {
    jQuery("#fbContent").hide();
    jQuery("#fbContent_" + index).show();
    jQuery("#fbOverlay").show();
    jQuery("#fbBox").fadeIn(500);
}

function hideLightBox() {
    jQuery("#fbBox").fadeOut(500);
    jQuery("#fbOverlay").hide();
}

function showMediaLightBox(element) {

    var lightBox = jQuery("[id='"+element+"']");
    var screenHeight = window.screen.availHeight;
    var screenWidth = window.screen.availWidth;
    var lightBoxHeight = lightBox.outerHeight();
    var lightBoxWidth = lightBox.outerWidth();

    var topPosition = ((screenHeight / 2) - lightBoxHeight);
    var leftPosition = ((screenWidth / 2) - lightBoxWidth / 2);

    lightBox.css({
        top: topPosition + 'px',
        left: leftPosition + 'px'
    }).show();
}

function CloseMediaLightBox(element) {
    jQuery("[id='" + element + "']").hide();
}
