Advertisement
Guest User

Google World expo doodle code

a guest
May 1st, 2011
761
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function () {
  2.     try {
  3.         if (!google.doodle) google.doodle = {};
  4.         var d = ["webkitTransition", "MozTransition", "OTransition", "transition"],
  5.             f, g = null,
  6.             h = !1,
  7.             i = !1,
  8.             j = !1,
  9.             k = !0,
  10.             l = !1,
  11.             m, n, o, p, q, r, s, t, u = !1,
  12.             v = !1,
  13.             w = function (a, b, c) {
  14.                 a.removeEventListener ? a.removeEventListener(b, c, !1) : a.detachEvent("on" + b, c)
  15.             },
  16.             x = function (a, b, c) {
  17.                 if (!google.doodle.a) google.doodle.a = [];
  18.                 google.doodle.a.push(arguments);
  19.                 var e = a,
  20.                     C = b,
  21.                     D = c;
  22.                 e.addEventListener ? e.addEventListener(C, D, !1) : e.attachEvent("on" + C, D)
  23.             },
  24.             y = function () {
  25.                 h = k && i;
  26.                 p.className = h ? "visible" : "";
  27.                 if (!u) p.style.visibility = h ? "visible" : "hidden";
  28.                 var a = j && i;
  29.                 if (a) t.style.left = m + 289 + "px", t.style.top = n + 10 + "px";
  30.                 v ? t.style.opacity = a ? 1 : 0 : t.style.display = a ? "block" : "none"
  31.             },
  32.             z = function (a, b) {
  33.                 var c = a - m,
  34.                     e = b - n;
  35.                 i = c > -10 && e > -10 && c < 431 && e < 167;
  36.                 if (k && i) p.style.left = a - (l ? 100 : 0) + "px", p.style.top = b + "px", c = -(c * 3 - 100), e = -(e * 3 - 100), r.style.left = c - 23 + "px", r.style.top = e - 41 + "px", q.style.left = c - 51 + "px", q.style.top = e - 22 + "px", s.style.left = c - 51 + "px", s.style.top = e - 159 + "px";
  37.                 y()
  38.             },
  39.             B = function (a) {
  40.                 f = [(a.clientX || a.targetTouches && a.targetTouches[0].clientX || 0) + (document.body.scrollLeft || document.documentElement.scrollLeft || 0), (a.clientY || a.targetTouches && a.targetTouches[0].clientY || 0) + (document.body.scrollTop || document.documentElement.scrollTop || 0)];
  41.                 g || (g = window.setTimeout(A, 30))
  42.             },
  43.             A = function () {
  44.                 g = null;
  45.                 f && z(f[0], f[1])
  46.             },
  47.             E = function () {
  48.                 k ? (k = !1, j = !0, y()) : google.nav && google.nav.go ? google.nav.go("/search?q=Wereldtentoonstelling&ct=worldsfair11-hp&oi=ddle") : window.location.href = "/search?q=Wereldtentoonstelling&ct=worldsfair11-hp&oi=ddle"
  49.             },
  50.             F = function () {
  51.                 k = !1;
  52.                 j = !0;
  53.                 y()
  54.             },
  55.             G = function () {
  56.                 if (o = document.getElementById("hplogo")) {
  57.                     var a = o,
  58.                         b = 0;
  59.                     do b += a.offsetLeft;
  60.                     while (a = a.offsetParent);
  61.                     m = b;
  62.                     a = o;
  63.                     b = 0;
  64.                     do b += a.offsetTop;
  65.                     while (a = a.offsetParent);
  66.                     n = b
  67.                 }
  68.             },
  69.             H = function (a) {
  70.                 a.preventDefault();
  71.                 l = k = !0;
  72.                 B(a)
  73.             },
  74.             I = function () {
  75.                 k = !1;
  76.                 y()
  77.             },
  78.             J = function () {
  79.                 if (google.doodle.a) for (var a; a = google.doodle.a.pop();) w.apply(null, a);
  80.                 g && (window.clearTimeout(g), g = null);
  81.                 k = !1;
  82.                 y()
  83.             },
  84.             K = function (a) {
  85.                 return document.getElementById(a).getElementsByTagName("div")[0]
  86.             },
  87.             L = function () {
  88.                 if (!google.doodle.b) google.doodle.b = !0, google.dstr.push(J), google.rein.push(L);
  89.                 if (o = document.getElementById("hplogo")) {
  90.                     p = document.getElementById("loupe");
  91.                     q = K("loupe-canvas-top");
  92.                     r = K("loupe-canvas-mid");
  93.                     s = K("loupe-canvas-bottom");
  94.                     t = document.getElementById("hplogot");
  95.                     p.style.marginLeft = "-100px";
  96.                     p.style.marginTop = "-100px";
  97.                     p.style.width = "200px";
  98.                     p.style.height = "200px";
  99.                     k = !0;
  100.                     j = !1;
  101.                     G();
  102.                     window.setTimeout(G, 0);
  103.                     z(0, 0);
  104.                     x(document, "mousemove", B);
  105.                     x(o, "touchstart", H);
  106.                     x(o, "touchmove", B);
  107.                     x(document, "touchend", I);
  108.                     x(o, "mousedown", E);
  109.                     x(window, "resize", G);
  110.                     x(window, "load", G);
  111.                     x(document, "keydown", F);
  112.                     x(document.forms.f || document.forms.gs || document.forms.c, "keydown", F);
  113.                     x(navigator.userAgent.indexOf("Firefox") >= 0 ? window : document.body, "keydown", F);
  114.                     for (var a = 0, b; b = d[a++];) if (typeof p.style[b] != "undefined") {
  115.                         u = !0;
  116.                         p.style.visibility = "visible";
  117.                         break
  118.                     }
  119.                     if (typeof t.style.opacity != "undefined") v = !0, t.style.display = "block"
  120.                 }
  121.             };
  122.         google.x ? google.x("DOODLE", L) : L()
  123.     } catch (M) {
  124.         google.ml(M, !1, {
  125.             cause: "DOODLE"
  126.         })
  127.     };
  128. })(); < /script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement