//center divs
$(function() {

  var win = $(window);
  var content = $("#content");
  var content2 = $("#contentIndex");
  var contentMain = $("#contentPages");
  var footer = $("#footer");


  function centerContent() {
    content.css({
      left: win.width() / 2 - content.outerWidth() / 2,
      top: win.height() / 2 - content.outerHeight() / 2
    });

    content2.css({
      left: content.width() / 2 - content2.outerWidth() / 2,
    });
    contentMain.css({
      left: win.width() / 2 - contentMain.outerWidth() / 2,
    });
    footer.css({
      left: win.width() / 2 - footer.outerWidth() / 2,
    });


  };



  centerContent();

  win.resize(centerContent);
});

//buttons
