// @codekit-append “../vendor/iFrameResizer/iframeResizer.min.js”
// @codekit-append “../iframe.js”

/*! iFrame Resizer (iframeSizer.min.js ) – v2.8.7 – 2015-05-19
* Desc: Force cross domain iframes to size to content.
* Requires: iframeResizer.contentWindow.min.js to be loaded into the target frame.
* Copyright: (c) 2015 David J. Bradshaw – dave@bradshaw.net
* License: MIT
*/

!function(){“use strict”;function a(a,b,c){“addEventListener”in window?a.addEventListener(b,c,!1):”attachEvent”in window&&a.attachEvent(“on”+b,c)}function b(){var a,b=[“moz”,”webkit”,”o”,”ms”];for(a=0;ab)throw new Error(“Value for min”+a+” can not be greater than max”+a);e(” Checking “+d+” is in range “+c+”-“+b),c>f&&(f=c,e(” Set “+d+” to min value”)),f>b&&(f=b,e(” Set “+d+” to max value”)),G[d]=””+f}function m(){function b(){function a(){e(” Checking connection is from allowed list of origins: “+d);var a;for(a=0;a tag, found <"+a.tagName+">.”);n.call(a,b)}return b(),a(window,”message”,g),a(window,”resize”,p),function(a,b){switch(typeof b){case”undefined”:case”string”:Array.prototype.forEach.call(document.querySelectorAll(b||”iframe”),function(b){c(b,a)});break;case”object”:c(b,a);break;default:throw new TypeError(“Unexpected data type (“+typeof b+”).”)}}}function r(a){a.fn.iFrameResize=function(a){return this.filter(“iframe”).each(function(b,c){n.call(c,a)}).end()}}var s=0,t=!0,u=!1,v=”message”,w=v.length,x=”[iFrameSizer]”,y=x.length,z=null,A=window.requestAnimationFrame,B={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},C={},D=null,E={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,enableInPageLinks:!1,enablePublicMethods:!1,heightCalculationMethod:”offset”,interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,resizeFrom:”parent”,scrolling:!1,sizeHeight:!0,sizeWidth:!1,tolerance:0,closedCallback:function(){},initCallback:function(){},messageCallback:function(){},resizedCallback:function(){},scrollCallback:function(){return!0}};window.jQuery&&r(jQuery),”function”==typeof define&&define.amd?define([],q):”object”==typeof module&&”object”==typeof module.exports?module.exports=q():window.iFrameResize=window.iFrameResize||q()}();
//# sourceMappingURL=iframeResizer.map

// Generated by CoffeeScript 1.9.3

if (location.protocol === ‘https:’) {
(function() {
(function() {
var iframe, matches, parent, scriptTag, urlRE;

var src = ”;

scriptTag = document.getElementById(“usedcarsmodule”);
urlRE = /https:\/\/([^.]+)\.brugtbilsmodul\.dk\/Scripts\/([a-f0-9]{8}-(?:[a-f0-9]{4}-){3}[a-f0-9]{12})\.js/;
matches = scriptTag.src.match(urlRE);
if (matches != null) {
src = “https://” + matches[1] + “.brugtbilsmodul.dk/?guid=” + matches[2];

iframe = document.createElement(“iframe”);
iframe.src = src;
iframe.setAttribute(“src”, “https://” + matches[1] + “.brugtbilsmodul.dk/?guid=” + matches[2]);
iframe.setAttribute(“id”, “usedcarsframe”);
iframe.setAttribute(“width”, “100%”);
iframe.setAttribute(“style”, “height:100vh;”);
iframe.setAttribute(“scrolling”, “yes”);
iframe.setAttribute(“frameBorder”,”0″);
iframe.setAttribute(“onload”,”window.parent.parent.scrollTo(0,0)”);
parent = scriptTag.parentNode;
parent.insertBefore(iframe, scriptTag);

iframe.contentWindow.onerror = function(){

}

return typeof iFrameResize === “function” ? iFrameResize({
log: true
}) : void 0;

}
})();

}).call(this);

}else{
(function() {
(function() {
var iframe, matches, parent, scriptTag, urlRE;
scriptTag = document.getElementById(“usedcarsmodule”);
urlRE = /http:\/\/([^.]+)\.brugtbilsmodul\.dk\/Scripts\/([a-f0-9]{8}-(?:[a-f0-9]{4}-){3}[a-f0-9]{12})\.js/;
matches = scriptTag.src.match(urlRE);
if (matches != null) {
iframe = document.createElement(“iframe”);
iframe.setAttribute(“src”, “http://” + matches[1] + “.brugtbilsmodul.dk/?guid=” + matches[2]);
iframe.setAttribute(“id”, “usedcarsframe”);
iframe.setAttribute(“width”, “100%”);
iframe.setAttribute(“scrolling”, “no”);
iframe.setAttribute(“frameBorder”,”0″);
iframe.setAttribute(“onload”,”window.parent.parent.scrollTo(0,0)”);
parent = scriptTag.parentNode;
parent.insertBefore(iframe, scriptTag);
return typeof iFrameResize === “function” ? iFrameResize({
log: false
}) : void 0;
}
})();

}).call(this);
}