'use strict';$(document).ready(function(){function w(){var a=$(t).find("div.active").index();a+=1;var c=$(t).find("div.card-body").length,d=$(t).find("div.active h3").html();document.getElementById("revampstatus-msg").innerHTML="slide "+a;document.getElementById("revampstatus-msg").innerHTML+="of "+c;document.getElementById("revampstatus-msg").innerHTML+=". "+d}function g(a){var c=a.attr("data-value"),d=a.attr("data-x-position")+"%",b=a.attr("data-y-position")+"%",e=a.text(),f=a.parents(".surface-revamped-360"); f.find(".revamped-360-image-section");var p=f.find(".revamped-360-images .revamped-360-img"),r=f.find(".revamped-360-data .card-body");f.find(".imagehotspot").html(e).css({bottom:d,right:b});c=+c;e=+e;p.removeClass("active");p.eq(e-1).addClass("active");r.removeClass("active");r.eq(e-1).addClass("active");d=0;if(q!=c)if(q=c;--b)d+=30,x(b,d,f);f.find(".revampbtn").removeClass("active").attr({"aria-selected":!1});a.addClass("active").attr({"aria-selected":!0}); f.find(".revampbtn").removeClass("active").attr({tabindex:"-1"});a.addClass("active").attr({tabindex:"0"});q=c;z.matches?(a=f.find(".revamped-360-section").outerHeight()+Math.round(.2*f.find(".revamped-360-img.active").outerHeight()),f.find(".previous-btn,.next-btn").css({top:a})):A.matches?(a=f.find(".revamped-360-section").outerHeight()+Math.round(.1*f.find(".revamped-360-img.active").outerHeight()),f.find(".previous-btn,.next-btn").css({top:a})):f.find(".previous-btn,.next-btn").removeAttr("style")} function x(a,c,d){var b=d.find(".revampedSprite360").attr("max-frames");setTimeout(function(){var e=100*a/+b+"%";d.find(".revamped360__sprite").css({backgroundPositionY:e})},c)}var q=0,z=window.matchMedia("(max-width: 1083px)"),A=window.matchMedia("(max-width: 767px)"),t=$("div.revamped-360-data"),B=$(".surface-revamped-360 .revamped-360-image-data .revampedSprite360");$(B).find(".imagehotspot").attr("aria-hidden","true");$(".surface-revamped-360 .revamped-360-carousel .previous-btn").click(function(){var a= $(this).parents(".surface-revamped-360"),c=a.find(".revampbtn");a=a.find(".revampbtn.active").prev();c=c.last();a.hasClass("revampbtn")?g(a):g(c);w()});$(".surface-revamped-360 .revamped-360-carousel .next-btn").click(function(){var a=$(this).parents(".surface-revamped-360"),c=a.find(".revampbtn");a=a.find(".revampbtn.active").next();c=c.first();a.hasClass("revampbtn")?g(a):g(c);w()});$(".revampbtn").click(function(){var a=$(this);g(a)});$(".surface-revamped-360 .revamped-360-image-section").each(function(a, c){a=$(c);c=a.find(".revampedSprite360").attr("data-src-360");a.find(".revampedSprite360 .revamped360__sprite").css("background-image","url("+c+")");a=a.find(".revampbtn").first();g(a)});$(".surface-revamped-360 .revamped-360-carousel .revamped-360-section .revamped-360-image-data .d-flex .revampbtn").on("keydown",function(a){try{var c=$(this),d=c.parents(".surface-revamped-360"),b=d.find(".revampbtn").first(),e=d.find(".revampbtn").last(),f=c.next(),p=c.prev();if(37===a.which||37===a.keyCode)p.hasClass("revampbtn")? p.focus():e.focus(),a.stopPropagation();if(39===a.which||39===a.keyCode)f.hasClass("revampbtn")?f.focus():b.focus(),a.stopPropagation();40!==a.which&&40!==a.keyCode||$(".revampedcarousel .surface-revamped-360 .revamped-360-carousel .carousel-control-next").focusout(function(){$(".revampedcarousel .surface-revamped-360 .revamped-360-section .btn.revampbtn.active").focus()})}catch(r){console.log(r)}});var u,h,m,v,k,n,l,y;(function(){function a(b){b=b.parents(".surface-revamped-360");u=h-m;v=k-n;if(parseInt(Math.sqrt(u* u+v*v),10)Math.abs(k-n)){var e=b.find(".revampbtn");b=b.find(".revampbtn.active").next();e=e.first();b.hasClass("revampbtn")?g(b):g(e);return"left"}if(h-m>Math.abs(k-n))return e=b.find(".revampbtn"),b=b.find(".revampbtn.active").prev(),e=e.last(),b.hasClass("revampbtn")?g(b):g(e),"right"}y=15;h=k=m=n=0;l=(new Date).getTime();for(var c=document.getElementsByClassName("revamped-360-carousel"),d=0;d