(function(n,t){typeof define=="function"&&define.amd?define(["jquery"],t):t(n.jQuery)})(this,function(n){function u(){var i=document.createElement("smartbanner"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var t in n)if(i.style[t]!==undefined)return{end:n[t]};return!1}var t=navigator.userAgent,r=/Edge/i.test(t),i=function(i){var e,u,f;if((this.origHtmlMargin=parseFloat(n("html").css("margin-top")),this.options=n.extend({},n.smartbanner.defaults,i),e=navigator.standalone,this.options.force?this.type=this.options.force:t.match(/Windows Phone/i)!==null&&t.match(/Edge|Touch/i)!==null?this.type="windows":t.match(/iPhone|iPod/i)!==null||t.match(/iPad/)&&this.options.iOSUniversalApp?t.match(/Safari/i)!==null&&(t.match(/CriOS/i)!==null||t.match(/FxiOS/i)!=null||window.Number(t.substr(t.indexOf("OS ")+3,3).replace("_","."))<6)&&(this.type="ios"):t.match(/\bSilk\/(.*\bMobile Safari\b)?/)||t.match(/\bKF\w/)||t.match("Kindle Fire")?this.type="kindle":t.match(/Android/i)!==null&&(this.type="android"),this.type&&!e&&!this.getCookie("sb-closed")&&!this.getCookie("sb-installed"))&&(this.scale=this.options.scale=="auto"?n(window).width()/window.screen.width:this.options.scale,this.scale<1&&(this.scale=1),u=n(this.type=="android"?'meta[name="google-play-app"]':this.type=="ios"?'meta[name="apple-itunes-app"]':this.type=="kindle"?'meta[name="kindle-fire-app"]':'meta[name="msApplication-ID"]'),u.length)){if(this.type=="windows")r&&(this.appId=n('meta[name="msApplication-PackageEdgeName"]').attr("content")),this.appId||(this.appId=n('meta[name="msApplication-PackageFamilyName"]').attr("content"));else if(f=/app-id=([^\s,]+)/.exec(u.attr("content")),f)this.appId=f[1];else return;this.title=this.options.title?this.options.title:u.data("title")||n("title").text().replace(/\s*[|\-·].*$/,"");this.author=this.options.author?this.options.author:u.data("author")||(n('meta[name="author"]').length?n('meta[name="author"]').attr("content"):window.location.hostname);this.iconUrl=u.data("icon-url");this.price=u.data("price");this.options.onInstall=typeof this.options.onInstall=="function"?this.options.onInstall:function(){};this.options.onClose=typeof this.options.onClose=="function"?this.options.onClose:function(){};this.create();this.show();this.listen()}};(i.prototype={constructor:i,create:function(){var t,u=this.price||this.options.price,f=this.options.url||function(){switch(this.type){case"android":return"market://details?id=";case"kindle":return"amzn://apps/android?asin=";case"windows":return r?"ms-windows-store://pdp/?productid=":"ms-windows-store:navigate?appid="}return"https://itunes.apple.com/"+this.options.appStoreLanguage+"/app/id"}.call(this)+this.appId,o=u?function(){var n=u+" - ";switch(this.type){case"android":return n+this.options.inGooglePlay;case"kindle":return n+this.options.inAmazonAppStore;case"windows":return n+this.options.inWindowsStore}return n+this.options.inAppStore}.call(this):"",e=this.options.iconGloss==null?this.type=="ios":this.options.iconGloss,i;this.type=="android"&&this.options.GooglePlayParams&&(f+="&referrer="+this.options.GooglePlayParams);i='