(function(){"use strict";function h(n,t,i){"addEventListener"in window?n.addEventListener(t,i,!1):"attachEvent"in window&&n.attachEvent("on"+t,i)}function kt(n){return a+"["+v+"] "+n}function n(n){nt&&"object"==typeof console&&console.log(kt(n))}function c(n){"object"==typeof console&&console.warn(kt(n))}function hi(){n("Initialising iFrame");ci();ai();ut("background",ht);ut("padding",ct);wi();dt();vi();ki();pi();l=bi();f("init","Init message from host page")}function ci(){function i(n){return"true"===n?!0:!1}var n=vt.substr(yt).split(":");v=n[0];b=undefined!==n[1]?Number(n[1]):b;k=undefined!==n[2]?i(n[2]):k;nt=undefined!==n[3]?i(n[3]):nt;r=undefined!==n[4]?Number(n[4]):r;tt=undefined!==n[5]?i(n[5]):tt;w=undefined!==n[6]?i(n[6]):w;e=n[7];t=undefined!==n[8]?n[8]:t;ht=n[9];ct=n[10];rt=undefined!==n[11]?Number(n[11]):rt;l.enable=undefined!==n[12]?i(n[12]):!1;it=undefined!==n[13]?n[13]:it}function li(n,t){return-1!==t.indexOf("-")&&(c("Negative CSS value ignored for "+n),t=""),t}function ut(t,i){undefined!==i&&""!==i&&"null"!==i&&(document.body.style[t]=i,n("Body "+t+' set to "'+i+'"'))}function ai(){undefined===e&&(e=b+"px");li("margin",e);ut("margin",e)}function vi(){document.documentElement.style.height="";document.body.style.height="";n('HTML & body height set to "auto"')}function u(t){function i(n){h(window,n,function(){f(t.eventName,t.eventType)})}t.eventNames&&Array.prototype.map?(t.eventName=t.eventNames[0],t.eventNames.map(i)):i(t.eventName);n("Added event listener: "+t.eventType)}function yi(){u({eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]});u({eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]});u({eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]});u({eventType:"Device Orientation Change",eventName:"orientationchange"});u({eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]});u({eventType:"Window Clicked",eventName:"click"});"child"===it&&u({eventType:"IFrame Resized",eventName:"resize"})}function dt(){g!==t&&(t in et||(c(t+" is not a valid option for heightCalculationMethod."),t="bodyScroll"),n('Height calculation method set to "'+t+'"'))}function pi(){!0===w?(yi(),gi()):n("Auto Resize disabled")}function wi(){var n=document.createElement("div");n.style.clear="both";n.style.display="block";document.body.appendChild(n)}function bi(){function u(){return{x:window.pageXOffset!==undefined?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==undefined?window.pageYOffset:document.documentElement.scrollTop}}function f(n){var t=n.getBoundingClientRect(),i=u();return{x:parseInt(t.left,10)+parseInt(i.x,10),y:parseInt(t.top,10)+parseInt(i.y,10)}}function t(t){function o(t){var u=f(t);n("Moving to in page link (#"+r+") at x: "+u.x+" y: "+u.y);i(u.y,u.x,"scrollToOffset")}var r=t.split("#")[1]||"",u=decodeURIComponent(r),e=document.getElementById(u)||document.getElementsByName(u)[0];e?o(e):(n("In page link (#"+r+") not found in iFrame, so sending to parent"),i(0,0,"inPageLink","#"+r))}function r(){""!==location.hash&&"#"!==location.hash&&t(location.href)}function e(){function n(n){function i(n){n.preventDefault();t(this.getAttribute("href"))}"#"!==n.getAttribute("href")&&h(n,"click",i)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),n)}function o(){h(window,"hashchange",r)}function s(){setTimeout(r,d)}function a(){Array.prototype.forEach&&document.querySelectorAll?(n("Setting up location.hash handlers"),e(),o(),s()):c("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return l.enable?a():n("In page linking not enabled"),{findTarget:t}}function ki(){tt&&(n("Enable public methods"),window.parentIFrame={close:function(){i(0,0,"close")},getId:function(){return v},moveToAnchor:function(n){l.findTarget(n)},reset:function(){ei("parentIFrame.reset")},scrollTo:function(n,t){i(t,n,"scrollTo")},scrollToOffset:function(n,t){i(t,n,"scrollToOffset")},sendMessage:function(n,t){i(0,0,"message",JSON.stringify(n),t)},setHeightCalculationMethod:function(n){t=n;dt()},setTargetOrigin:function(t){n("Set targetOrigin: "+t);pt=t},size:function(n,t){var i=""+(n?n:"")+(t?","+t:"");ot();f("size","parentIFrame.size("+i+")",n,t)}})}function gt(){0!==r&&(n("setInterval: "+r+"ms"),setInterval(function(){f("interval","setInterval: "+r)},Math.abs(r)))}function di(t){function i(t){(t.height===undefined||t.width===undefined||0===t.height||0===t.width)&&(n("Attach listerner to "+t.src),h(t,"load",function(){f("imageLoad","Image loaded")}))}t.forEach(function(n){if(n.type==="attributes"&&n.attributeName==="src")i(n.target);else if(n.type==="childList"){var t=n.target.querySelectorAll("img");Array.prototype.forEach.call(t,function(n){i(n)})}})}function gi(){function i(){var i=document.querySelector("body"),r=new t(function(n){f("mutationObserver","mutationObserver: "+n[0].target+" "+n[0].type);di(n)});n("Enable MutationObserver");r.observe(i,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0})}var t=window.MutationObserver||window.WebKitMutationObserver;t?0>r?gt():i():(c("MutationObserver not supported in this browser!"),gt())}function p(){function n(n){function r(n){var i,r;return/^\d+(px)?$/i.test(n)?parseInt(n,st):(i=t.style.left,r=t.runtimeStyle.left,t.runtimeStyle.left=t.currentStyle.left,t.style.left=n||0,n=t.style.pixelLeft,t.style.left=i,t.runtimeStyle.left=r,n)}var t=document.body,i=0;return"defaultView"in document&&"getComputedStyle"in document.defaultView?(i=document.defaultView.getComputedStyle(t,null),i=null!==i?i[n]:0):i=r(t.currentStyle[n]),parseInt(i,st)}return document.body.offsetHeight+n("marginTop")+n("marginBottom")}function ni(){return document.body.scrollHeight}function ti(){return document.documentElement.offsetHeight}function ft(){return document.documentElement.scrollHeight}function nr(){for(var i=document.querySelectorAll("body *"),f=i.length,r=0,u=(new Date).getTime(),t=0;t<f;t++)i[t].getBoundingClientRect().bottom>r&&(r=i[t].getBoundingClientRect().bottom);return u=(new Date).getTime()-u,n("Parsed "+f+" HTML elements"),n("LowestElement bottom position calculated in "+u+"ms"),r}function ii(){return[p(),ni(),ti(),ft()]}function ri(){return Math.max.apply(null,ii())}function tr(){return Math.min.apply(null,ii())}function ir(){return Math.max(p(),nr())}function ui(){return Math.max(document.documentElement.scrollWidth,document.body.scrollWidth)}function f(r,u,f,e){function l(){r in{reset:1,resetPage:1,init:1}||n("Trigger event: "+u)}function a(){o=h;s=c;i(o,s,r)}function v(){return y&&r in oi}function p(){function n(n,t){var i=Math.abs(n-t)<=rt;return!i}return h=undefined!==f?f:et[t](),c=undefined!==e?e:ui(),n(o,h)||k&&n(s,c)}function w(){return!(r in{init:1,interval:1,size:1})}function b(){return t in si}function d(){n("No change in size detected")}function g(){w()&&b()?ei(u):r in{interval:1}||(l(),d())}var h,c;v()?n("Trigger event cancelled: "+r):p()||"init"===r?(l(),ot(),a()):g()}function ot(){y||(y=!0,n("Trigger event lock on"));clearTimeout(bt);bt=setTimeout(function(){y=!1;n("Trigger event lock off");n("--")},d)}function fi(n){o=et[t]();s=ui();i(o,s,n)}function ei(i){var r=t;t=g;n("Reset trigger event: "+i);ot();fi("reset");t=r}function i(t,i,r,u,f){function e(){undefined===f?f=pt:n("Message targetOrigin: "+f)}function o(){var o=t+":"+i,e=v+":"+o+":"+r+(undefined!==u?":"+u:"");n("Sending message to host page ("+e+")");wt.postMessage(a+e,f)}e();o()}function rr(t){function r(){return a===(""+t.data).substr(0,yt)}function u(){vt=t.data;wt=t.source;hi();lt=!1;setTimeout(function(){at=!1},d)}function e(){at?n("Page reset ignored by init"):(n("Page size reset by host page"),fi("resetPage"))}function o(){f("resizeParent","Parent window resized")}function i(){return t.data.split("]")[1]}function s(){return"iFrameResize"in window}function h(){return t.data.split(":")[2]in{"true":1,"false":1}}if(r())if(!1===lt)switch(i()){case"reset":e();break;case"resize":o();break;default:s()||c("Unexpected message ("+t.data+")")}else h()?u():n('Ignored message of type "'+i()+'". Received before initialization.')}var w=!0,st=10,ht="",b=0,e="",ct="",k=!1,oi={resize:1,click:1},d=128,lt=!0,o=1,g="offset",t=g,at=!0,vt="",l={},r=32,nt=!1,a="[iFrameSizer]",yt=a.length,v="",tt=!1,si={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},it="child",pt="*",wt=window.parent,rt=0,y=!1,bt=null,s=1,et={offset:p,bodyOffset:p,bodyScroll:ni,documentElementOffset:ti,scroll:ft,documentElementScroll:ft,max:ri,min:tr,grow:ri,lowestElement:ir};h(window,"message",rr)})();var iframeControl=function(n,t,i){var r=[];return{init:function(){if(i('div[data-containertype="Iframe"] iframe[scrolling="no"]').each(function(){r.push(i(this))}),r.length>0)if(typeof n.iFrameResize=="function")iframeControl.ready();else{var u=t.createElement("script");u.type="text/javascript";u.src="//cdn.danaweb1.com/template/2.8/iframeResizer.min.js";t.body.appendChild(u);u.onload=function(){iframeControl.ready()}}},ready:function(){i(r).each(function(){i(this).iFrameResize({checkOrigin:!1})})}}}(window,document,jQuery);iframeControl.init()