if (window.navigator.platform == 'iPhone' && document.body.id == 'home_page') {
  msg = "Would you like to use the mobile version of Playground Blues?"
  if (confirm(msg)) {
    path = window.location.pathname;
    window.location.replace("http://m.playgroundblues.com" + path);
  }
}

jQuery(function($) {
  
  /* Navigation */
  if ($('#navigation')) {
    var nav_resting_width = "-70px";
    var nav_hover_width = "0px";
    var body_class_name = document.body.className
    var delay = 400;
    
    $('#navigation > li').each(function(e) {
      if (this.className == body_class_name) {
        $('a', this).animate({marginLeft:nav_hover_width}, 600);
      }
      else {
        $(this).hover(function() {
          $('a', this).animate({marginLeft:nav_hover_width}, 200);
        },
        function () {
          $('a', this).animate({marginLeft:nav_resting_width}, 200);
        });
      }
    });
  }

  if (document.body.id == 'home_page') {
    $('#navigation > li').each(function(e) {
      $('a', this)
        
        .animate({marginLeft:nav_hover_width}, 200)
        .animate({marginLeft:nav_resting_width}, 200);
      delay += 100;
    });
  }

});

