ACC SHELL
/*!
* Maximage Version: 2.0.5 (25-July-2012) - http://www.aaronvanderzwan.com/maximage/2.0/
*/
(function(a){a.fn.maximage=function(d,e){var c;if(typeof d=="object"||d===undefined){c=a.extend(a.fn.maximage.defaults,d||{})}if(typeof d=="string"){c=a.fn.maximage.defaults}a.Body=a("body");a.Window=a(window);a.Scroll=(a.browser.mozilla||a.browser.msie)?a("html"):a.Body;a.Events={RESIZE:"resize"};this.each(function(j){var o=a(this),f=0,m=[];var k={setup:function(){if(a.Slides.length>0){for(var r in a.Slides){var q=a.Slides[r];o.append('<div class="mc-image '+q.theclass+'" title="'+q.alt+'" style="background-image:url(\''+q.url+"');"+q.style+'" data-href="'+q.datahref+'">'+q.content+"</div>")}k.preload(0);k.resize()}},preload:function(q){var i=a("<img/>");i.load(function(){if(f==0){g.setup();c.onFirstImageLoaded()}if(f==(a.Slides.length-1)){c.onImagesLoaded()}else{f++;k.preload(f)}});i[0].src=a.Slides[q].url;m.push(i[0])},resize:function(){a.Window.bind(a.Events.RESIZE,function(){a.Scroll.addClass("mc-hide-scrolls");a.Window.data("h",l.sizes().h).data("w",l.sizes().w);o.height(a.Window.data("h")).width(a.Window.data("w")).children().height(a.Window.data("h")).width(a.Window.data("w"));o.children().each(function(){this.cycleH=a.Window.data("h");this.cycleW=a.Window.data("w")});a(a.Scroll).removeClass("mc-hide-scrolls")})}};var h={setup:function(){var r,i;a.Body.addClass("mc-old-browser").addClass("mc-browserversion-"+a.browser.version.split(".")[0]);if(a.Slides.length>0){for(var q in a.Slides){o.append(a("<div>"+a.Slides[q].content+"</div>").attr("class","mc-image mc-image-n"+q));a.Window.data("h",l.sizes().h).data("w",l.sizes().w)}a("body").append(a("<div></div>").attr("class","mc-loader").css({position:"absolute",left:"-99999px;"}));h.preload(0);h.windowResize()}},preload:function(i){var q=a("<img/>");q.load(function(){var r=a(this);r.appendTo(a("div.mc-loader"));r.show();r.data("h",r.height()).data("w",r.width()).data("ar",(r.width()/r.height()));r.prependTo(a("div.mc-image-n"+i));a("div.mc-loader").html();if(f==(a.Slides.length-1)){a("div.mc-loader").remove();c.onImagesLoaded();h.onceLoaded(f)}else{h.onceLoaded(f);f++;h.preload(f)}});q[0].src=a.Slides[i].url},onceLoaded:function(i){h.maximage(i);if(i==0){o.css({visibility:"visible"});g.setup();c.onFirstImageLoaded()}},maximage:function(i){a("div.mc-image-n"+i).height(a.Window.data("h")).width(a.Window.data("w")).children("img").first().each(function(){p.maxcover(a(this))})},windowResize:function(){a.Window.bind(a.Events.RESIZE,function(){clearTimeout(this.id);this.id=setTimeout(h.doneResizing,200)})},doneResizing:function(){a(a.Scroll).addClass("mc-hide-scrolls");a.Window.data("h",l.sizes().h).data("w",l.sizes().w);o.height(a.Window.data("h")).width(a.Window.data("w"));o.find(".mc-image").each(function(q){h.maximage(q)});var i=o.data("cycle.opts");i.height=a.Window.data("h");i.width=a.Window.data("w");jQuery.each(i.elements,function(q,r){r.cycleW=a.Window.data("w");r.cycleH=a.Window.data("h")});a(a.Scroll).removeClass("mc-hide-scrolls")}};var g={setup:function(){var q,i;o.addClass("mc-cycle");a.Window.data("h",l.sizes().h).data("w",l.sizes().w);jQuery.easing.easeForCSSTransition=function(v,w,u,A,z,y){return u+A};var r=a.extend(c.cycleOptions,{fit:1,containerResize:0,height:a.Window.data("h"),width:a.Window.data("w"),slideResize:false,easing:(a.BrowserTests.cssTransitions?"easeForCSSTransition":"swing")});o.cycle(r)}};var p={center:function(i){i.css({marginTop:((i.height()-a.Window.data("h"))/2)*-1}).css({marginLeft:((i.width()-a.Window.data("w"))/2)*-1})},fill:function(i){if(c.backgroundSize=="cover"){if(a.Window.data("w")/a.Window.data("h")<i.data("ar")){i.height(a.Window.data("h")).width((a.Window.data("h")*i.data("ar")).toFixed(0))}else{i.height((a.Window.data("w")/i.data("ar")).toFixed(0)).width(a.Window.data("w"))}}else{if(c.backgroundSize=="contain"){if(a.Window.data("w")/a.Window.data("h")<i.data("ar")){i.height((a.Window.data("w")/i.data("ar")).toFixed(0)).width(a.Window.data("w"))}else{i.height(a.Window.data("h")).width((a.Window.data("h")*i.data("ar")).toFixed(0))}}else{if(console.log){console.log("The backgroundSize option was not recognized for older browsers.")}}}},maxcover:function(i){p.fill(i);p.center(i)},maxcontain:function(i){p.fill(i);p.center(i)}};var l={browser_tests:function(){var q=a("<div />")[0],u=["Moz","Webkit","Khtml","O","ms"],t="transition",s={cssTransitions:false,cssBackgroundSize:("backgroundSize" in q.style&&c.cssBackgroundSize)};if(c.cssTransitions){if(typeof q.style[t]=="string"){s.cssTransitions=true}t=t.charAt(0).toUpperCase()+t.substr(1);for(var r=0;r<u.length;r++){if(u[r]+t in q.style){s.cssTransitions=true}}}return s},construct_slide_object:function(){var r=new Object(),i=new Array(),q="";o.children().each(function(){$img=a(this).is("img")?a(this).clone():a(this).find("img").first().clone();r={};r.url=$img.attr("src");r.title=$img.attr("title")!=undefined?$img.attr("title"):"";r.alt=$img.attr("alt")!=undefined?$img.attr("alt"):"";r.theclass=$img.attr("class")!=undefined?$img.attr("class"):"";r.styles=$img.attr("style")!=undefined?$img.attr("style"):"";r.orig=$img.clone();r.datahref=$img.attr("data-href")!=undefined?$img.attr("data-href"):"";r.content="";if(a(this).find("img").length>0){a(this).find("img").first().remove();r.content=a(this).html()}$img.attr("src","");a(this).remove();i.push(r)});return i},sizes:function(){var i={h:0,w:0};if(c.fillElement=="window"){i.h=a.Window.height();i.w=a.Window.width()}else{$fillElement=o.parents(c.fillElement).first();if($fillElement.height()==0||$fillElement.data("windowHeight")==true){$fillElement.data("windowHeight",true);i.h=a.Window.height()}else{i.h=$fillElement.height()}if($fillElement.width()==0||$fillElement.data("windowWidth")==true){$fillElement.data("windowWidth",true);i.w=a.Window.width()}else{i.w=$fillElement.width()}}return i}};if(typeof d=="string"){var n;a.Window.data("h",l.sizes().h).data("w",l.sizes().w);o.data("h",o.height()).data("w",o.width()).data("ar",(o.width()/o.height()));a.Window.bind(a.Events.RESIZE,function(){a.Window.data("h",l.sizes().h).data("w",l.sizes().w);n=o.data("resizer");clearTimeout(n);n=setTimeout(p[d](o),200);o.data("resizer",n)});p[d](o)}else{a.Slides=l.construct_slide_object();a.BrowserTests=l.browser_tests();if(a.BrowserTests.cssBackgroundSize){k.setup()}else{h.setup()}}});function b(f){if(window.console&&window.console.log){window.console.log(f)}}};a.fn.maximage.defaults={cssBackgroundSize:true,cssTransitions:true,verticalCenter:true,horizontalCenter:true,scaleInterval:20,backgroundSize:"cover",fillElement:"window",onFirstImageLoaded:function(){},onImagesLoaded:function(){}}})(jQuery);
ACC SHELL 2018