$.closePopupLayer = function(name) {
if (name) {
for (var i = 0; i < openedPopups.length; i++) {
if (openedPopups[i].name == name) {
var thisPopup = openedPopups[i];
$.reloadPopupLayer = function(name, callback) {
if (name) {
for (var i = 0; i < openedPopups.length; i++) {
if (openedPopups[i].name == name) {
if (callback) {
openedPopups[i].reloadSuccess = callback;
}
function setScreenLockerSize() {
if (popupLayerScreenLocker) {
$('#popupLayerScreenLocker').height($(document).height() + "px");
$('#popupLayerScreenLocker').width($(document.body).outerWidth(true) + "px");
}
}
function checkIfItExists(name) {
if (name) {
for (var i = 0; i < openedPopups.length; i++) {
if (openedPopups[i].name == name) {
return true;
}
}
}
return false;
}
function showScreenLocker() {
if ($("#popupLayerScreenLocker").length) {
if (openedPopups.length == 1) {
popupLayerScreenLocker = true;
setScreenLockerSize();
$('#popupLayerScreenLocker').fadeIn();
}