function fbs_click() {
    u=location.href;
    t=document.title;
    window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&amp;t='+encodeURIComponent(t),'Seher.no','toolbar=0,status=0,width=626,height=436');
    return false;
}

if (location.href.indexOf ('leserpanel')>0){
  document.write ('<style type="text/css">.heading_bottom_grey, #min-seher-button, #column-right-top, #netboard1, #heading_bottom_grey_id {display:none} #top-container, #news-top {width:960px;}</style>');
}


/*--------------------*/

Event.observe(document, 'dom:loaded', function() {
  /* Make sure footer area does not overlap the bottom of the QXL ad */
  if ($('measureRightColUnderQxlAd')) {
    setTimeout(function() {
      // Get div below qxl ad
      var qxlEndEl = $('measureRightColUnderQxlAd');
      // Get the next fullwidth element. If superboard exists, and do not have style display="none", say it`s the superboard-container. Else, say it`s the footerArea.
    var nextEl = (($('superboard-container')) && ($('superboard-container').getStyle('display') !== 'none')) ? $('superboard-container') : $('footerArea');
      // Get y-offset diff
      var diff = qxlEndEl.viewportOffset()[1] - nextEl.viewportOffset()[1];
      if (diff > 0) {
        // Set the height difference as top-margin on the footer
        nextEl.setStyle({'marginTop': diff+'px'});
      }
    }, 1000);
  }
});

/*--------------------*/
window.cosmeticsStickyElements = new Cosmetics.StickyElements();

Event.observe(document, 'dom:loaded', function() {
  $$('.sticky').each(function(el) {
    window.cosmeticsStickyElements.add(el, {
      delay: 1500
    });
  });
});

