$(function () {

    $("body").addClass("scripted");

    //$("#hd").css({ "left": "-" + scrollbarWidth() + "px" });
    //$("#hd-inr").css({ "margin-left": scrollbarWidth() + "px" });

    $('#nav li a:not(.active)').hover(
        function () {
            $(this).stop().animate({ backgroundColor: '#c90202' }, 300);
        }, function () {
            $(this).stop().animate({ backgroundColor: '#747373' }, 300);
        }
    );
    
  if((!navigator.userAgent.match(/iPhone/i)) && (!navigator.userAgent.match(/iPod/i))) {
   $.fn.supersized.options = {  
      startwidth: 1920,  
      startheight: 1200,
      vertical_center: 1,
      slides : [
        {image : bgImage }
      ]
    };
  
    $('#supersized').supersized();
  }
  
});

function scrollbarWidth() {
    var div = $('<div style="width:50px;height:50px;overflow:hidden;position:absolute;top:-200px;left:-200px;"><div style="height:100px;"></div>');

    $('body').append(div);

    var w1 = $('div', div).innerWidth();
    div.css('overflow-y', 'scroll');

    var w2 = $('div', div).innerWidth();
    $(div).remove();

    return (w1 - w2);
}
