
/* Google Analytics */
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-21444862-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

/* Konami Code, Yes, that's right kiddo! */
$(window).konami(function(){ 
        document.location.href = unescape('%69%6E%64%65%78%2E%70%68%70%3F%61%6C%62%75%6D%3D%6A%61%70%61%6E%2D%67%6F%6F%64%69%65%73');
});

/* Loop code, hey there, trying to break the easter egg, little geek? */
function checkLoop(n)
{
    if ( typeof this.counter == 'undefined' ) this.counter = 0;
    if ( typeof this.previous == 'undefined' ) this.previous = 0;

    if ( n == ( (this.previous % 4) + 1) )
    {
        this.counter++;
    }
    else
    {
        if ( n == 1 )
            var reset = 1;
        else
            var reset = 0;

        this.counter = reset;
        this.previous = reset;

        return;
    }

    this.previous = n;

    if ( this.counter == 16 )
    {
        document.location.href = unescape('%69%6E%64%65%78%2E%70%68%70%3F%61%6C%62%75%6D%3D%63%61%6D%62%6F%64%69%61%2D%73%65%63%72%65%74');
    }
}

$(document).ready(function() {

    $("#menu-home li").hover(function(){
      $(this).animate({
        letterSpacing: "10px",
      }, 1500 );
    });

    $('#menu-thailand').mouseenter(function() { checkLoop(1); });
    $('.menu-laos').mouseenter(function() { checkLoop(2); });
    $('.menu-japan').mouseenter(function() { checkLoop(3); });
    $('.menu-cambodia').mouseenter(function() { checkLoop(4); });
});

