/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, {
/******/ 				configurable: false,
/******/ 				enumerable: true,
/******/ 				get: getter
/******/ 			});
/******/ 		}
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 44);
/******/ })
/************************************************************************/
/******/ ({

/***/ 44:
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(45);


/***/ }),

/***/ 45:
/***/ (function(module, exports) {

var dexHub = new function () {
  this.getQueryString = function (p) {
    var match = RegExp("[?&]" + p + "=([^&]*)").exec(window.location.search);
    return match && decodeURIComponent(match[1].replace(/\+/g, " "));
  };

  this.setCookie = function (name, value) {
    document.cookie = name + "=" + value + ";path=/";
  };

  this.readCookie = function (name) {
    var n = name + "=";
    var cookie = document.cookie.split(";");
    for (var i = 0; i < cookie.length; i++) {
      var c = cookie[i];
      while (c.charAt(0) == " ") {
        c = c.substring(1, c.length);
      }
      if (c.indexOf(n) == 0) {
        return c.substring(n.length, c.length);
      }
    }
    return null;
  };

  this.getSyncScriptParams = function () {
    var scripts = document.getElementsByTagName("script");
    var lastScript = scripts[scripts.length - 1];
    var scriptName = lastScript;
    return {
      teste: scriptName.getAttribute("teste") === "true"
    };
  };

  var settings = this.getSyncScriptParams();

  this.init = function () {
    var gclid = {};
    gclid["gclid"] = this.getQueryString("gclid");
    gclid["utm_source"] = this.getQueryString("utm_source");
    gclid["utm_medium"] = this.getQueryString("utm_medium");
    gclid["utm_campaign"] = this.getQueryString("utm_campaign");
    gclid["utm_content"] = this.getQueryString("utm_content");

    if (gclid.gclid) {
      this.setCookie("_dexhub_gclid", JSON.stringify(gclid));
    }

    setTimeout(function () {
      var cookie = dexHub.readCookie("_dexhub_gclid");
      if (cookie) {
        var gclid = JSON.parse(cookie);
        for (var p in gclid) {
          if (gclid.hasOwnProperty(p)) {
            jQuery("<input>").attr({
              type: "hidden",
              id: "dexhub_" + p,
              name: p,
              value: gclid[p]
            }).appendTo("form");
          }
        }
      }
    }, 1000);
  };
}();

jQuery(document).ready(function () {
  dexHub.init();
});

/***/ })

/******/ });