jQuery.extend({
MarketInsight: {
Popup: {
Success: function (text, closetext, onClose) {
var imggHref = $(".logo a img").attr("src").split("/WEB/")[0];
if (!$("body").children("div").hasClass("resultsMessageWrap")) {
$("body").prepend("
" + text + "" + "
");
$(".resultsMessageWrap").stop(true, false).animate({ top: "0" }, 800, "easeInOutCubic").delay(5000).animate({ top: "-80" }, 800, "easeInOutCubic", function () {
if (onClose) onClose();
$(".resultsMessageWrap").remove();
});
}
$(".resultMessCloseBtn").on("click", function () {
$(".resultsMessageWrap").stop(true, false).animate({ top: "-80" }, 800, "easeInOutCubic", function () {
if (onClose) onClose();
$(".resultsMessageWrap").remove();
});
});
},
Error: function (text, closetext, onClose) {
var imggHref = $(".logo a img").attr("src").split("/WEB/")[0];
if (!$("body").children("div").hasClass("errorsMessageWrap")) {
$("body").prepend("" + text + "" + "
");
$(".errorsMessageWrap").stop(true, false).animate({ top: "0" }, 800, "easeInOutCubic").delay(5000).animate({ top: "-80" }, 800, "easeInOutCubic", function () {
if (onClose) onClose();
$(".errorsMessageWrap").remove();
});
}
$(".resultMessCloseBtn").on("click", function () {
$(".errorsMessageWrap").stop(true, false).animate({ top: "-80" }, 800, "easeInOutCubic", function () {
if (onClose) onClose();
$(".errorsMessageWrap").remove();
});
});
},
Dialog: function (title, warning, onClose) {
if (!$("body").find("div").hasClass("popupWrapper")) {
$("body").append('');
$(".emptyBlackFull").stop(true, false).animate({ opacity: 1 }, 600, "easeInOutCubic");
$(".main_menu_Popup_Wrap").stop(true, false).delay(600).animate({ opacity: 1 }, 600, "easeInOutCubic");
}
$(".closePopupBtn, .emptyBlackFull, .popupCancelBtn").click(function () {
$(".main_menu_Popup_Wrap").stop(true, false).animate({ opacity: 0 }, 600, "easeInOutCubic");
$(".emptyBlackFull").stop(true, false).delay(600).animate({ opacity: 0 }, 600, "easeInOutCubic", function () {
if (onClose) onClose();
$(".popupWrapper").remove();
});
});
}
}
}
});