(function(){aws.callbackAskamanda={init:function(){$(document).ready(function(){aws.callbackAskamanda.sharedEvents();$(document).on("click keypress",".iframeclose",function(){$(this).hasClass("askamanda-close")?($(".askamandaiframe-container").fu_popover("destroy"),$(".askamandaiframe-content ").removeClass("askamandaiframeactive")):$(this).hasClass("billing-close")?($(".billingiframe-container").fu_popover("destroy"),$(".billingiframe-content").removeClass("billingiframeactive")):($(".wateriframe-container").fu_popover("destroy"),$(".wateriframe-content").removeClass("wateriframeactive"))})})},sharedEvents:function(){$(".askamandaiframe-content").on("click keypress",aws.callbackAskamanda.onAskamandaClick);$(".billingiframe-content").on("click keypress",aws.callbackAskamanda.OnCallbackbillingClick);$(".wateriframe-content").on("click keypress",aws.callbackAskamanda.OnCallbackOperationsClick)},onAskamandaClick:function(){$(".askamandaiframe-content ").addClass("askamandaiframeactive");$(".billing-close").is(":visible")===!0&&($(".billingiframe-container").fu_popover("destroy"),$(".billingiframe-content").removeClass("billingiframeactive"));$(".Operations-close").is(":visible")===!0&&($(".wateriframe-container").fu_popover("destroy"),$(".wateriframe-content").removeClass("wateriframeactive"))},OnCallbackbillingClick:function(){$(".billingiframe-content").addClass("billingiframeactive");$(".askamanda-close").is(":visible")===!0&&($(".askamandaiframe-container").fu_popover("destroy"),$(".askamandaiframe-content ").removeClass("askamandaiframeactive"));$(".Operations-close").is(":visible")===!0&&($(".wateriframe-container").fu_popover("destroy"),$(".wateriframe-content").removeClass("wateriframeactive"));$(".fu_popover_aws-popoverbilling").is(":visible")==!1&&($(".billingiframe-content").attr("data-callbackenable")==="true"?($(".billingiframe-container").fu_popover({themeName:"aws-popoverbilling",title:' <p class="h3"><a class="icon-s-close iframeclose billing-close" ><\/a><\/p>',placement:aws.callbackAskamanda.setPopoverPosition($(".billingiframe-container")),content:aws.callbackAskamanda.setPopoverContent($(".billingiframe-content"),$(".billing-openhour"))}),$(".fu_popover_aws-popoverbilling").focus()):window.open($(".billingiframe-content").attr("data-iframeurl"),"_blank"))},OnCallbackOperationsClick:function(){$(".wateriframe-content ").addClass("wateriframeactive");$(".askamanda-close").is(":visible")===!0&&($(".askamandaiframe-container").fu_popover("destroy"),$(".askamandaiframe-content ").removeClass("askamandaiframeactive"));$(".billing-close").is(":visible")===!0&&($(".billingiframe-container").fu_popover("destroy"),$(".billingiframe-content").removeClass("billingiframeactive"));$(".fu_popover_aws-popoverwater").is(":visible")==!1&&($(".wateriframe-content").attr("data-callbackenable")==="true"?($(".wateriframe-container").fu_popover({themeName:"aws-popoverwater",title:' <p class="h3"><a class="icon-s-close iframeclose Operations-close" ><\/a><\/p>',placement:aws.callbackAskamanda.setPopoverPosition($(".wateriframe-container")),content:aws.callbackAskamanda.setPopoverContent($(".wateriframe-content"),$(".watersupply-hour"))}),$(".fu_popover_aws-popoverwater").focus()):window.open($(".wateriframe-content").attr("data-iframeurl"),"_blank"))},setPopoverPosition:function(n){aws.callbackAskamanda.currentPosition=$(window).scrollTop();var t=$(n).offset().top;return($(n).hasClass("askamanda4x-container")||$(n).hasClass("billing4x-container")||$(n).hasClass("water4x-container"))&&$(window).width()>991?(aws.callbackAskamanda.setarrow="mobile","left"):aws.callbackAskamanda.currentPosition>1950?(aws.callbackAskamanda.currentPosition=$(n).hasClass("billingiframe-container")&&$(window).width()<1024?200:$(n).hasClass("wateriframe-container")&&$(window).width()<1024?550:0,$("html, body").animate({scrollTop:$(".callback-content,.ask-content").offset().top+aws.callbackAskamanda.currentPosition},"slow"),"bottom"):($("html, body").animate({scrollTop:$(".callback-content,.ask-content").offset().top-600},"slow"),"top")},setPopoverContent:function(n,t){return $(n).attr("data-iframe")==="Askamanda"?'<iframe src="'+$(n).attr("data-iframeurl")+'" style="border:none;" data-prtcontnt = "askamandaiframe-content"><\/iframe>':$(n).attr("data-iframe")==="Billing"&&$(n).attr("data-callbackenable")==="true"?'<iframe src="'+$(n).attr("data-iframeurl")+'" style="border:none;" data-prtcontnt = "billingiframe-content" ><\/iframe>'+$(t).html():$(n).attr("data-iframe")==="Operations"&&$(n).attr("data-callbackenable")==="true"?'<iframe src="'+$(n).attr("data-iframeurl")+'" style="border:none;" data-prtcontnt = "wateriframe-content" ><\/iframe>'+$(t).html():$(t).html()}};aws.callbackAskamanda.init()})()