$(function(){
  if(navigator.userAgent.indexOf('iPhone') == -1 && navigator.userAgent.indexOf('iPad') == -1)
    initScrollContent();
});

function initScrollContent(){
  $('#nav a.scroll-link, .visuals-nav a.scroll-link').each(function(){
    var link = $(this);
    var blok = $(link.attr('href'));
    var offsetTop = blok.offset().top;
    var duration = 800;
    
    link.click(function(){
      $('html, body').animate({scrollTop: offsetTop}, duration);
      return false;
    });
  });
  var n = $("div.navigation:first");
  var w = $(window);
  var c = $(".w2");
  var cl = n.position().left;
  n.css("position", "fixed");
  n.css("top", "20");
  var re = function() {
    n.css("left", c.offset().left + cl);
  };
  re();
  w.resize(re);
}
