

/**
* UAParser.js v0.7.11
* Lightweight JavaScript-based User-Agent string parser
* https://github.com/faisalman/ua-parser-js
*
* Copyright © 2012-2016 Faisal Salman <fyzlman@gmail.com>
* Dual licensed under GPLv2 & MIT
*/
(function(e,t){"use strict";var n="0.7.11",r="",i="?",s="function",o="undefined",u="object",a="string",f="major",l="model",c="name",h="type",p="vendor",d="version",v="architecture",m="console",g="mobile",y="tablet",b="smarttv",w="wearable",E="embedded",S={extend:function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2===0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return typeof e=="string"?t.toLowerCase().indexOf(e.toLowerCase())!==-1:!1},lowerize:function(e){return e.toLowerCase()},major:function(e){return typeof e===a?e.replace(/[^\d\.]/g,"").split(".")[0]:t},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},x={rgx:function(){var e,n=0,r,i,a,f,l,c,h=arguments;while(n<h.length&&!l){var p=h[n],d=h[n+1];if(typeof e===o){e={};for(a in d)d.hasOwnProperty(a)&&(f=d[a],typeof f===u?e[f[0]]=t:e[f]=t)}r=i=0;while(r<p.length&&!l){l=p[r++].exec(this.getUA());if(!!l)for(a=0;a<d.length;a++)c=l[++i],f=d[a],typeof f===u&&f.length>0?f.length==2?typeof f[1]==s?e[f[0]]=f[1].call(this,c):e[f[0]]=f[1]:f.length==3?typeof f[1]===s&&(!f[1].exec||!f[1].test)?e[f[0]]=c?f[1].call(this,c,f[2]):t:e[f[0]]=c?c.replace(f[1],f[2]):t:f.length==4&&(e[f[0]]=c?f[3].call(this,c.replace(f[1],f[2])):t):e[f]=c?c:t}n+=2}return e},str:function(e,n){for(var r in n)if(typeof n[r]===u&&n[r].length>0){for(var s=0;s<n[r].length;s++)if(S.has(n[r][s],e))return r===i?t:r}else if(S.has(n[r],e))return r===i?t:r;return e}},T={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},N={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[c,d],[/(opios)[\/\s]+([\w\.]+)/i],[[c,"Opera Mini"],d],[/\s(opr)\/([\w\.]+)/i],[[c,"Opera"],d],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]+)*/i,/(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]+)*/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs)\/([\w\.-]+)/i],[c,d],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[c,"IE"],d],[/(edge)\/((\d+)?[\w\.]+)/i],[c,d],[/(yabrowser)\/([\w\.]+)/i],[[c,"Yandex"],d],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],d],[/(MicroMessenger)\/([\w\.]+)/i],[[c,"WeChat"],d],[/XiaoMi\/MiuiBrowser\/([\w\.]+)/i],[d,[c,"MIUI Browser"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[c,/(.+)/,"$1 WebView"],d],[/android.+samsungbrowser\/([\w\.]+)/i,/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[d,[c,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i,/(qqbrowser)[\/\s]?([\w\.]+)/i],[c,d],[/(uc\s?browser)[\/\s]?([\w\.]+)/i,/ucweb.+(ucbrowser)[\/\s]?([\w\.]+)/i,/JUC.+(ucweb)[\/\s]?([\w\.]+)/i],[[c,"UCBrowser"],d],[/(dolfin)\/([\w\.]+)/i],[[c,"Dolphin"],d],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[c,"Chrome"],d],[/FBAV\/([\w\.]+);/i],[d,[c,"Facebook"]],[/fxios\/([\w\.-]+)/i],[d,[c,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[d,[c,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[d,c],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[c,[d,x.str,T.browser.oldsafari.version]],[/(konqueror)\/([\w\.]+)/i,/(webkit|khtml)\/([\w\.]+)/i],[c,d],[/(navigator|netscape)\/([\w\.-]+)/i],[[c,"Netscape"],d],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\/([\w\.-]+)/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]+)*/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[c,d]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[v,"amd64"]],[/(ia32(?=;))/i],[[v,S.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[v,"ia32"]],[/windows\s(ce|mobile);\sppc;/i],[[v,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[v,/ower/,"",S.lowerize]],[/(sun4\w)[;\)]/i],[[v,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+;))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[v,S.lowerize]]],device:[[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[p,S.trim],[l,S.trim],[h,b]],[/\((ipad|playbook);[\w\s\);-]+(rim|apple)/i],[l,p,[h,y]],[/applecoremedia\/[\w\.]+ \((ipad)/],[l,[p,"Apple"],[h,y]],[/(apple\s{0,1}tv)/i],[[l,"Apple TV"],[p,"Apple"]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[p,l,[h,y]],[/(kf[A-z]+)\sbuild\/[\w\.]+.*silk\//i],[l,[p,"Amazon"],[h,y]],[/(sd|kf)[0349hijorstuw]+\sbuild\/[\w\.]+.*silk\//i],[[l,x.str,T.device.amazon.model],[p,"Amazon"],[h,g]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[l,p,[h,g]],[/\((ip[honed|\s\w*]+);/i],[l,[p,"Apple"],[h,g]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|huawei|meizu|motorola|polytron)[\s_-]?([\w-]+)*/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[p,l,[h,g]],[/\(bb10;\s(\w+)/i],[l,[p,"BlackBerry"],[h,g]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7)/i],[l,[p,"Asus"],[h,y]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[p,"Sony"],[l,"Xperia Tablet"],[h,y]],[/(?:sony)?(?:(?:(?:c|d)\d{4})|(?:so[-l].+))\sbuild\//i],[[p,"Sony"],[l,"Xperia Phone"],[h,g]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[p,l,[h,m]],[/android.+;\s(shield)\sbuild/i],[l,[p,"Nvidia"],[h,m]],[/(playstation\s[34portablevi]+)/i],[l,[p,"Sony"],[h,m]],[/(sprint\s(\w+))/i],[[p,x.str,T.device.sprint.vendor],[l,x.str,T.device.sprint.model],[h,g]],[/(lenovo)\s?(S(?:5000|6000)+(?:[-][\w+]))/i],[p,l,[h,y]],[/(htc)[;_\s-]+([\w\s]+(?=\))|\w+)*/i,/(zte)-(\w+)*/i,/(alcatel|geeksphone|huawei|lenovo|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]+)*/i],[p,[l,/_/g," "],[h,g]],[/(nexus\s9)/i],[l,[p,"HTC"],[h,y]],[/(microsoft);\s(lumia[\s\w]+)/i],[p,l,[h,g]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[l,[p,"Microsoft"],[h,m]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[p,"Microsoft"],[h,g]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?(:?\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w+)*/i,/(XT\d{3,4}) build\//i,/(nexus\s[6])/i],[l,[p,"Motorola"],[h,g]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[l,[p,"Motorola"],[h,y]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n8000|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[p,"Samsung"],l,[h,y]],[/smart-tv.+(samsung)/i],[p,[h,b],l],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)*/i,/sec-((sgh\w+))/i],[[p,"Samsung"],l,[h,g]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[p,"Samsung"],[h,b]],[/\(dtv[\);].+(aquos)/i],[l,[p,"Sharp"],[h,b]],[/sie-(\w+)*/i],[l,[p,"Siemens"],[h,g]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]+)*/i],[[p,"Nokia"],l,[h,g]],[/android\s3\.[\s\w;-]{10}(a\d{3})/i],[l,[p,"Acer"],[h,y]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[p,"LG"],l,[h,y]],[/(lg) netcast\.tv/i],[p,l,[h,b]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w+)*/i],[l,[p,"LG"],[h,g]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[l,[p,"Lenovo"],[h,y]],[/linux;.+((jolla));/i],[p,l,[h,g]],[/((pebble))app\/[\d\.]+\s/i],[p,l,[h,w]],[/android.+;\s(glass)\s\d/i],[l,[p,"Google"],[h,w]],[/android.+(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:one|one[\s_]plus)?[\s_]*(?:\d\w)?)\s+build/i],[[l,/_/g," "],[p,"Xiaomi"],[h,g]],[/\s(tablet)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[h,S.lowerize],p,l]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[d,[c,"EdgeHTML"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[c,d],[/rv\:([\w\.]+).*(gecko)/i],[d,c]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[c,d],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*|windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[c,[d,x.str,T.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[c,"Windows"],[d,x.str,T.os.windows.version]],[/\((bb)(10);/i],[[c,"BlackBerry"],d],[/(blackberry)\w*\/?([\w\.]+)*/i,/(tizen)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]+)*/i,/linux;.+(sailfish);/i],[c,d],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]+)*/i],[[c,"Symbian"],d],[/\((series40);/i],[c],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[c,"Firefox OS"],d],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w+)*/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?([\w\.-]+)*/i,/(hurd|linux)\s?([\w\.]+)*/i,/(gnu)\s?([\w\.]+)*/i],[c,d],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[c,"Chromium OS"],d],[/(sunos)\s?([\w\.]+\d)*/i],[[c,"Solaris"],d],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i],[c,d],[/(ip[honead]+)(?:.*os\s([\w]+)*\slike\smac|;\sopera)/i],[[c,"iOS"],[d,/_/g,"."]],[/(mac\sos\sx)\s?([\w\s\.]+\w)*/i,/(macintosh|mac(?=_powerpc)\s)/i],[[c,"Mac OS"],[d,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]+)*/i,/(haiku)\s(\w+)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms)/i,/(unix)\s?([\w\.]+)*/i],[c,d]]},C=function(t,n){if(this instanceof C){var i=t||(e&&e.navigator&&e.navigator.userAgent?e.navigator.userAgent:r),s=n?S.extend(N,n):N;return this.getBrowser=function(){var e=x.rgx.apply(this,s.browser);return e.major=S.major(e.version),e},this.getCPU=function(){return x.rgx.apply(this,s.cpu)},this.getDevice=function(){return x.rgx.apply(this,s.device)},this.getEngine=function(){return x.rgx.apply(this,s.engine)},this.getOS=function(){return x.rgx.apply(this,s.os)},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return i},this.setUA=function(e){return i=e,this},this}return(new C(t,n)).getResult()};C.VERSION=n,C.BROWSER={NAME:c,MAJOR:f,VERSION:d},C.CPU={ARCHITECTURE:v},C.DEVICE={MODEL:l,VENDOR:p,TYPE:h,CONSOLE:m,MOBILE:g,SMARTTV:b,TABLET:y,WEARABLE:w,EMBEDDED:E},C.ENGINE={NAME:c,VERSION:d},C.OS={NAME:c,VERSION:d},typeof exports!==o?(typeof module!==o&&module.exports&&(exports=module.exports=C),exports.UAParser=C):typeof define===s&&define.amd?define(function(){return C}):e.UAParser=C;var k=e.jQuery||e.Zepto;if(typeof k!==o){var L=new C;k.ua=L.getResult(),k.ua.get=function(){return L.getUA()},k.ua.set=function(e){L.setUA(e);var t=L.getResult();for(var n in t)k.ua[n]=t[n]}}})(typeof window=="object"?window:this);

//spin.js
//http://fgnass.github.io/spin.js/
//if upgrading this function be sure to remove the common.js and amd loader code...
//just use the default window.spinner
(function(t,e){t.SymphosizeSpinner=e()})(this,function(){"use strict";var t=["webkit","Moz","ms","O"],e={},i;function o(t,e){var i=document.createElement(t||"div"),o;for(o in e)i[o]=e[o];return i}function n(t){for(var e=1,i=arguments.length;e<i;e++)t.appendChild(arguments[e]);return t}var r=function(){var t=o("style",{type:"text/css"});n(document.getElementsByTagName("head")[0],t);return t.sheet||t.styleSheet}();function s(t,o,n,s){var a=["opacity",o,~~(t*100),n,s].join("-"),f=.01+n/s*100,l=Math.max(1-(1-t)/o*(100-f),t),u=i.substring(0,i.indexOf("Animation")).toLowerCase(),d=u&&"-"+u+"-"||"";if(!e[a]){r.insertRule("@"+d+"keyframes "+a+"{"+"0%{opacity:"+l+"}"+f+"%{opacity:"+t+"}"+(f+.01)+"%{opacity:1}"+(f+o)%100+"%{opacity:"+t+"}"+"100%{opacity:"+l+"}"+"}",r.cssRules.length);e[a]=1}return a}function a(e,i){var o=e.style,n,r;i=i.charAt(0).toUpperCase()+i.slice(1);for(r=0;r<t.length;r++){n=t[r]+i;if(o[n]!==undefined)return n}if(o[i]!==undefined)return i}function f(t,e){for(var i in e)t.style[a(t,i)||i]=e[i];return t}function l(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var o in i)if(t[o]===undefined)t[o]=i[o]}return t}function u(t){var e={x:t.offsetLeft,y:t.offsetTop};while(t=t.offsetParent)e.x+=t.offsetLeft,e.y+=t.offsetTop;return e}function d(t,e){return typeof t=="string"?t:t[e%t.length]}var p={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:1/4,fps:20,zIndex:2e9,className:"spinner",top:"auto",left:"auto",position:"relative"};function c(t){if(typeof this=="undefined")return new c(t);this.opts=l(t||{},c.defaults,p)}c.defaults={};l(c.prototype,{spin:function(t){this.stop();var e=this,n=e.opts,r=e.el=f(o(0,{className:n.className}),{position:n.position,width:0,zIndex:n.zIndex}),s=n.radius+n.length+n.width,a,l;if(t){t.insertBefore(r,t.firstChild||null);l=u(t);a=u(r);f(r,{left:(n.left=="auto"?l.x-a.x+(t.offsetWidth>>1):parseInt(n.left,10)+s)+"px",top:(n.top=="auto"?l.y-a.y+(t.offsetHeight>>1):parseInt(n.top,10)+s)+"px"})}r.setAttribute("role","progressbar");e.lines(r,e.opts);if(!i){var d=0,p=(n.lines-1)*(1-n.direction)/2,c,h=n.fps,m=h/n.speed,y=(1-n.opacity)/(m*n.trail/100),g=m/n.lines;(function v(){d++;for(var t=0;t<n.lines;t++){c=Math.max(1-(d+(n.lines-t)*g)%m*y,n.opacity);e.opacity(r,t*n.direction+p,c,n)}e.timeout=e.el&&setTimeout(v,~~(1e3/h))})()}return e},stop:function(){var t=this.el;if(t){clearTimeout(this.timeout);if(t.parentNode)t.parentNode.removeChild(t);this.el=undefined}return this},lines:function(t,e){var r=0,a=(e.lines-1)*(1-e.direction)/2,l;function u(t,i){return f(o(),{position:"absolute",width:e.length+e.width+"px",height:e.width+"px",background:t,boxShadow:i,transformOrigin:"left",transform:"rotate("+~~(360/e.lines*r+e.rotate)+"deg) translate("+e.radius+"px"+",0)",borderRadius:(e.corners*e.width>>1)+"px"})}for(;r<e.lines;r++){l=f(o(),{position:"absolute",top:1+~(e.width/2)+"px",transform:e.hwaccel?"translate3d(0,0,0)":"",opacity:e.opacity,animation:i&&s(e.opacity,e.trail,a+r*e.direction,e.lines)+" "+1/e.speed+"s linear infinite"});if(e.shadow)n(l,f(u("#000","0 0 4px "+"#000"),{top:2+"px"}));n(t,n(l,u(d(e.color,r),"0 0 1px rgba(0,0,0,.1)")))}return t},opacity:function(t,e,i){if(e<t.childNodes.length)t.childNodes[e].style.opacity=i}});function h(){function t(t,e){return o("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',e)}r.addRule(".spin-vml","behavior:url(#default#VML)");c.prototype.lines=function(e,i){var o=i.length+i.width,r=2*o;function s(){return f(t("group",{coordsize:r+" "+r,coordorigin:-o+" "+-o}),{width:r,height:r})}var a=-(i.width+i.length)*2+"px",l=f(s(),{position:"absolute",top:a,left:a}),u;function p(e,r,a){n(l,n(f(s(),{rotation:360/i.lines*e+"deg",left:~~r}),n(f(t("roundrect",{arcsize:i.corners}),{width:o,height:i.width,left:i.radius,top:-i.width>>1,filter:a}),t("fill",{color:d(i.color,e),opacity:i.opacity}),t("stroke",{opacity:0}))))}if(i.shadow)for(u=1;u<=i.lines;u++)p(u,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(u=1;u<=i.lines;u++)p(u);return n(e,l)};c.prototype.opacity=function(t,e,i,o){var n=t.firstChild;o=o.shadow&&o.lines||0;if(n&&e+o<n.childNodes.length){n=n.childNodes[e+o];n=n&&n.firstChild;n=n&&n.firstChild;if(n)n.opacity=i}}}var m=f(o("group"),{behavior:"url(#default#VML)"});if(!a(m,"transform")&&m.adj)h();else i=a(m,"animation");return c});

/*!
  * domready (c) Dustin Diaz 2014 - License MIT
  */
!function (name, definition) {
  //this = window inside of here
  this[name] = definition()

}('symphosizedomready', function () {

  var fns = [], listener
    , doc = document
    , hack = doc.documentElement.doScroll
    , domContentLoaded = 'DOMContentLoaded'
    , loaded = (hack ? /^loaded|^c/ : /^loaded|^i|^c/).test(doc.readyState)


  if (!loaded)
  doc.addEventListener(domContentLoaded, listener = function () {
    doc.removeEventListener(domContentLoaded, listener)
    loaded = 1
    while (listener = fns.shift()) listener()
  })

  return function (fn) {
    loaded ? fn() : fns.push(fn)
  }

});

if( typeof( responsibid ) == "undefined" )
{
    responsibid = {
        lightbox_full_width: false,
        source_url : "//bids.responsibid.com/Form/lightbox/appVersion3.3.5/99b11e33fb7ab093599afd6c1c1d265e0c61f54c5c6aa495f64d2e2e41ea5442",

        init : function() {
            responsibid.referringUrl = 'UnableToDetermine';

            if (document.URL) {
                responsibid.referringUrl = document.URL;
            }

            responsibid.source_url = responsibid.source_url + '?referringUrl=' + encodeURIComponent(responsibid.referringUrl)

            responsibid.initButton();
        },

        initButton : function () {
            //place the button into the dom
            try {
                document.write('<div id="ResponsibidLightboxContainer"></div>');
            } catch(error) {
                return;
            }

            var div = document.getElementById('ResponsibidLightboxContainer');
            if(!div) {
                return;
            }
            div.innerHTML = '<button '+
                            '   id="ResponsibidLightboxButton" '+
                            '   class="responsibid-lightbox-button btn btn-primary" >'+
                            '       Give me an estimate! '+
                            '</button>';
        },

        initModal : function (e) {
            (e.preventDefault) ? e.preventDefault() : e.returnValue = false; //ie8 can't handle preventDefault()

            //on small screens we do not open the lightbox, instead we just open a new window
            //we also use the USParser lib to find out if we are tablet or mobile
            var w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);

            var parser = new UAParser();
            var userAgent = parser.getResult();

            if( w < 768 || userAgent.device.type == 'tablet' || userAgent.device.type == 'mobile'  )
            {
                window.open( responsibid.source_url );
                return;
            }

            //we do not want to have muiltple copies of this running around
            //if this is already instantiated just bail out.
            if( responsibid.backdrop != undefined )
            {
                return false;
            }


            //backdrop div
            responsibid.backdrop = document.createElement('div');
            responsibid.backdrop.id = 'responsibid-backdrop';
            responsibid.backdrop.style.position = 'fixed';
            responsibid.backdrop.style.top = 0;
            responsibid.backdrop.style.right = 0;
            responsibid.backdrop.style.bottom = 0;
            responsibid.backdrop.style.left = 0;
            //freaking IE....I hate you...
            try {
                responsibid.backdrop.style.zIndex = 9999999999999999999;
            }
            catch(e) {
                responsibid.backdrop.style.zIndex = 9999;
            }
            try {
                responsibid.backdrop.style.backgroundColor = "rgba(0,0,0,0.6)";
            }
            catch(e) {
                responsibid.backdrop.style.backgroundColor = "#000";
            }

            //the lightbox
            responsibid.lightbox = document.createElement('div');
            responsibid.lightbox.id = 'responsibid-lightbox';
            responsibid.lightbox.style.width = '750px';
            responsibid.lightbox.style.boxSizing = 'content-box';
            responsibid.lightbox.style.mozBoxSizing = 'content-box';
            responsibid.lightbox.style.height = '500px';
            responsibid.lightbox.style.position = 'absolute';
            responsibid.lightbox.style.top = '50%';
            responsibid.lightbox.style.left = '50%';
            responsibid.lightbox.style.marginLeft = '-375px';
            responsibid.lightbox.style.marginTop = '-250px';
            responsibid.lightbox.style.borderRadius = '5px';
            responsibid.lightbox.style.padding = '5px';
            responsibid.lightbox.style.backgroundColor = '#fff';

            //only use overflow scroll on devices supporting touch
            if ( 'WebkitOverflowScrolling' in responsibid.lightbox.style )
            {
                responsibid.lightbox.style.webkitOverflowScrolling = 'touch';
                responsibid.lightbox.style.overflow = 'auto';
            }

            //spinner
            responsibid.spinner = document.createElement('div');
            responsibid.spinner.id = 'responsibid-lightbox-spinner';
            responsibid.spinner.style.width = '0';
            responsibid.spinner.style.marginLeft = 'auto';
            responsibid.spinner.style.marginRight = 'auto';
            responsibid.spinner.style.marginTop = '150px';

            var opts = {
                lines: 11, // The number of lines to draw
                length: 7, // The length of each line
                width: 6, // The line thickness
                radius: 11, // The radius of the inner circle
                corners: 1, // Corner roundness (0..1)
                rotate: 68, // The rotation offset
                direction: 1, // 1: clockwise, -1: counterclockwise
                color: '#c3c3c8', // #rgb or #rrggbb or array of colors
                speed: 0.6, // Rounds per second
                trail: 78, // Afterglow percentage
                shadow: false, // Whether to render a shadow
                hwaccel: false, // Whether to use hardware acceleration
                className: 'spinner', // The CSS class to assign to the spinner
                zIndex: 2e9, // The z-index (defaults to 2000000000)
                top: 'auto', // Top position relative to parent in px
                left: 'auto' // Left position relative to parent in px
            };
            var spinner = new SymphosizeSpinner(opts).spin(responsibid.spinner);

            //iframe
            responsibid.iframe = document.createElement('iframe');
            responsibid.iframe.id = 'responsibid-lightbox-iframe';
            responsibid.iframe.style.width = '100%';
            responsibid.iframe.style.height = '100%';
            responsibid.iframe.style.display= 'none';
            responsibid.iframe.frameBorder="0";   //  For other browsers.
            responsibid.iframe.setAttribute("frameBorder", "0");   //  For other browsers (just a backup for the above).
            responsibid.iframe.src = responsibid.source_url;

            //append it all together
            responsibid.lightbox.appendChild(responsibid.spinner);
            responsibid.lightbox.appendChild(responsibid.iframe);
            responsibid.backdrop.appendChild(responsibid.lightbox);
            document.body.appendChild(responsibid.backdrop);

            //prevent clicks on the backdrop
            responsibid.backdrop.onclick = function() { return false; }

            responsibid.adjustLightboxSize();
            return false;
        },

        adjustLightboxSize: function( height ) {
            var height = typeof height !== 'undefined' ? height : 500,
                width  = responsibid.viewport().width;

            if( typeof responsibid.lightbox == 'undefined' )
            {
                return;
            }

            //set the lightbox default values
            responsibid.lightbox.style.width = '750px';
            responsibid.lightbox.style.top = '50%';
            responsibid.lightbox.style.left = '50%';
            responsibid.lightbox.style.right = 'auto';
            responsibid.lightbox.style.marginLeft = '-375px';
            responsibid.lightbox.style.marginTop = '-250px';
            responsibid.lightbox.style.height = '500px';

            //now handle height concerns
            if(height <= 500) { height = 500; }
            if( responsibid.viewport().height < height )
            {
                height =  responsibid.viewport().height - 20;
                responsibid.lightbox.style.top = '10px';
                responsibid.lightbox.style.marginTop = '0';
            }
            else
            {
                responsibid.lightbox.style.marginTop = '-'+height/2+'px';
            }

            responsibid.lightbox.style.height = height + 'px';

            //handle values when the width is less then 768...aka smaller then tablet size
            if( width < 768 )
            {
                responsibid.lightbox.style.width = 'auto';
                responsibid.lightbox.style.top = '10px';
                responsibid.lightbox.style.left = '10px';
                responsibid.lightbox.style.right = '10px';
                responsibid.lightbox.style.marginLeft = '0';
                responsibid.lightbox.style.marginTop = '0';
            } else if(responsibid.lightbox_full_width) {
                responsibid.lightbox.style.width = 'auto';
                responsibid.lightbox.style.left = '10%';
                responsibid.lightbox.style.right = '10%';
                responsibid.lightbox.style.marginLeft = '0';

                height =  responsibid.viewport().height - 40;
                responsibid.lightbox.style.top = '10px';
                responsibid.lightbox.style.marginTop = '0';
                responsibid.lightbox.style.height = height + 'px';
            }

        },

        initEvents: function() {
            //attach click event to button
            var buttons = document.querySelectorAll(".responsibid-lightbox-button");
            for (var i = 0; i < buttons.length; i++) {
                if (window.addEventListener)
                {
                    buttons[i].addEventListener("click", responsibid.initModal, false);
                }
                else
                {
                    buttons[i].attachEvent("onclick", responsibid.initModal );
                }
            }

            //listen for comunication from iFrame
            if (window.addEventListener)
            {
                addEventListener("message", responsibid.listener, false);
            }
            else
            {
                attachEvent("onmessage", responsibid.listener);
            }

            //make lightbox responsive
            window.onresize = responsibid.adjustLightboxSize;
        },

        listener: function(event) {

            if( typeof(event.data.indexOf) !== 'function'  )
            {
                return;
            }

            //close the lightBox
            if(typeof event.data == 'string' && event.data.indexOf('responsibid-lightbox-closeLightbox') !== -1)
            {
                responsibid.closeLightbox();
            }

            //hide the spinner and show the lightbox
            if(typeof event.data == 'string' && event.data.indexOf('responsibid-lightbox-showForm') !== -1 )
            {
                responsibid.spinner.style.display = 'none';
                responsibid.iframe.style.display = 'inline';
            }

            //adjust height of lightbox
            if(typeof event.data == 'string' && event.data.indexOf('responsibid-lightbox-height::') !== -1)
            {
                var height = event.data.split('::')[1];
                var newheight = parseInt( height );

                responsibid.adjustLightboxSize( newheight );
            }

            if(typeof event.data == 'string' && event.data.indexOf('responsibid-lightbox-fullwidth::') !== -1)
            {
                responsibid.lightbox_full_width = true;
                responsibid.adjustLightboxSize( );
            }

            //listen for the proposal, once it is loaded make a call back
            //so that the proposal can display the close button
            if(event.data.indexOf('proposalLoaded') !== -1)
            {
                var iframe = document.getElementById( 'responsibid-lightbox-iframe' )
                iframe.contentWindow.postMessage('showCloseButton', '*');
            }

            if(typeof event.data == 'string' && event.data.indexOf('responsibid-lightbox-bidSubmitted') !== -1 )
            {
                //this should only exist on a hatch site
                if( typeof(window.RESPONSIBID_CALLBACK) === 'function' )
                {
                    window.RESPONSIBID_CALLBACK()
                }
                window.ResponsiBidWebhooks.trigger('lightbox.bid.submitted', {});
                window.ResponsiBidWebhooks.trigger('bid.submitted', {});
            }
            if(typeof event.data == 'string' && event.data.indexOf('responsibid-lightbox-firstServiceSelected') !== -1 )
            {
                window.ResponsiBidWebhooks.trigger('bid.services.first_selection', {});
            }
            if(typeof event.data == 'string' && event.data.indexOf('responsibid-lightbox-webhook-') !== -1 )
            {
                var webhookEvent = event.data.replace('responsibid-lightbox-webhook-', '');
                window.ResponsiBidWebhooks.trigger(webhookEvent, {});
            }
            if(typeof event.data == 'string' && event.data.indexOf('responsibid-webhook-') !== -1 )
            {
                var webhookEvent = event.data.replace('responsibid-webhook-', '');
                window.ResponsiBidWebhooks.trigger(webhookEvent, {});
            }
        },

        closeLightbox: function() {
            responsibid.backdrop.parentNode.removeChild(responsibid.backdrop);

            //unset the responsibid back drop
            responsibid.backdrop = undefined;
        },

        viewport: function () {
            var e = window, a = 'inner';
            if ( !( 'innerWidth' in window ) )
            {
                a = 'client';
                e = document.documentElement || document.body;
            }
            return { width : e[ a+'Width' ] , height : e[ a+'Height' ] }
        }

    }

    //add the button to the dom
    responsibid.init();

    //will attach events to our button
    symphosizedomready(function () {
        responsibid.initEvents();
    });
}

//global webhook system for custom code actions to hook into specific react actions
var ResponsiBidProposalWebhooks = {
registered_listeners: {},
one_time_triggers: [],
};
ResponsiBidProposalWebhooks.on = function(event, callback) {
event = event.toLowerCase();
if(!ResponsiBidProposalWebhooks.registered_listeners.hasOwnProperty(event)) {
ResponsiBidProposalWebhooks.registered_listeners[event] = [];
}
ResponsiBidProposalWebhooks.registered_listeners[event].push(callback);
};
ResponsiBidProposalWebhooks.triggerOnce = function(event, data) {
event = event.toLowerCase();
if(ResponsiBidProposalWebhooks.one_time_triggers.indexOf(event) !== -1) {
return false;
}
ResponsiBidProposalWebhooks.one_time_triggers.push(event);
var result = false;
if(ResponsiBidProposalWebhooks.registered_listeners.hasOwnProperty(event)) {
ResponsiBidProposalWebhooks.registered_listeners[event].forEach(function(callback){
//if a callback returns true then we can return true
if(callback(data)) {
result = data;
}
});
}
return result;
};
ResponsiBidProposalWebhooks.trigger = function(event, data) {
event = event.toLowerCase();
var result = false;
if(ResponsiBidProposalWebhooks.registered_listeners.hasOwnProperty(event)) {
ResponsiBidProposalWebhooks.registered_listeners[event].forEach(function(callback){
//if a callback returns true then we can return true
if(callback(data)) {
result = data;
}
});
}
return result;
};
var ResponsiBidWebhooks = ResponsiBidProposalWebhooks;
window.ResponsiBidProposalWebhooks = ResponsiBidProposalWebhooks;
window.ResponsiBidWebhooks = ResponsiBidProposalWebhooks;

try {
//give an ASYNC friendly method of hooks
ResponsiBidWebhooks.on('bid.services.first_selection', function() {
if( typeof(window.RESPONSIBID_BID_FIRST_SELECTION_CALLBACK) === 'function' )
{
window.RESPONSIBID_BID_FIRST_SELECTION_CALLBACK()
}
});
ResponsiBidWebhooks.on('smartform.services.first_selection', function() {
if( typeof(window.RESPONSIBID_SMARTFORM_FIRST_SELECTION_CALLBACK) === 'function' )
{
window.RESPONSIBID_SMARTFORM_FIRST_SELECTION_CALLBACK()
}
});
ResponsiBidWebhooks.on('lightbox.services.first_selection', function() {
if( typeof(window.RESPONSIBID_LIGHTBOX_FIRST_SELECTION_CALLBACK) === 'function' )
{
window.RESPONSIBID_LIGHTBOX_FIRST_SELECTION_CALLBACK()
}
});
ResponsiBidWebhooks.on('bid.submitted', function() {
if( typeof(window.RESPONSIBID_BID_SUBMITTED_CALLBACK) === 'function' )
{
window.RESPONSIBID_BID_SUBMITTED_CALLBACK()
}
});
ResponsiBidWebhooks.on('smartform.bid.submitted', function() {
if( typeof(window.RESPONSIBID_SMARTFORM_SUBMITTED_CALLBACK) === 'function' )
{
window.RESPONSIBID_SMARTFORM_SUBMITTED_CALLBACK()
}
});
ResponsiBidWebhooks.on('lightbox.bid.submitted', function() {
if( typeof(window.RESPONSIBID_LIGHTBOX_SUBMITTED_CALLBACK) === 'function' )
{
window.RESPONSIBID_LIGHTBOX_SUBMITTED_CALLBACK()
}
});
ResponsiBidWebhooks.on('proposal.step_1.confirm.click', function() {
if( typeof(window.RESPONSIBID_PROPOSAL_CONFIRMED_CALLBACK) === 'function' )
{
window.RESPONSIBID_PROPOSAL_CONFIRMED_CALLBACK()
}
});
ResponsiBidWebhooks.on('proposal.step_2.confirm.click', function() {
if( typeof(window.RESPONSIBID_PROPOSAL_SCHEDULED_CALLBACK) === 'function' )
{
window.RESPONSIBID_PROPOSAL_SCHEDULED_CALLBACK()
}
});
} catch(error) {

}