/* Copyright 2011-2016 Adobe Systems Incorporated. All Rights Reserved. */ (function(c){"function"===typeof define&&define.amd&&define.amd.jQuery?define(["jquery","museutils"],c):c(jQuery)})(function(c){function b(a){var b=a.css("background-image");a.css("background-image","");var c=a.css("background-image");b!=c&&a.css("background-image",b);return c.replace(/^\s*url\(\"?/,"").replace(/['"]?\)$/,"")}if(!Muse.Browser.Features.checkCSSFeature("background-size")){var d=function(a){var d=c(a),g=b(d),j=document.createElement("img"),l=document.createElement("div"),k=this,i=!1, m=!1,n=!0,q={};c(l).css({overflow:"hidden",position:"absolute",top:"0px",left:"0px",width:a.clientWidth+"px",height:a.clientHeight+"px",marginBottom:"-"+a.clientHeight+"px",marginRight:"-"+a.clientWidth+"px",zIndex:"-1"}).addClass("museBgSizePolyfill");j.src=g;j.alt="";j.style.position="absolute";l.appendChild(j);a.children.length>0?a.insertBefore(l,a.children[0]):a.appendChild(l);if(a===document.body)d=c("html"),a=d.get(0),g=b(d),j.src=g,d.css("background-attachment")=="fixed"?(l.style.position= "fixed",n=!1):l.style.position="absolute";else if(d.is("#page"))d.css("marginLeft").toLowerCase()=="auto"&&(m=!0),l.style.top=d.offset().top+parseInt(d.css("borderTopWidth"))+"px",l.style.bottom=parseInt(d.parent().css("paddingBottom"))+parseInt(d.css("borderBottomWidth"))+"px",l.style.left=d.offset().left+parseInt(d.css("borderLeftWidth"))+"px",l.style.right=d.offset().left+parseInt(d.css("borderRightWidth"))+"px",l.style.zIndex=0;else if(d.css("position")=="static")a.style.position="relative";this.reloadImage= function(){var c=b(d),g=d.css("background-color");if(c!=j.src)j.src=c;a.style.backgroundImage="none";a.style.backgroundColor="transparent";l.style.backgroundColor=g;c=(d.css("background-position-x")+" "+d.css("background-position-y")).replace(/^\s+/,"").replace(/\s+$/,"");"0px 0px"==c&&(c="left top");c=c.split(/\s+/);c.length==1&&c[0].indexOf("center")>=0&&c.push("center");if(d.data("hasBackgroundPositionScrollEffect")!=!0)for(var g=0,i=c.length;g0&&setInterval(function(){for(var a=0;a