/*
* 
* desc: Element bewegt sich mit sobald im Browser Fenster gescrollt wird.
* author: René Woizenko
* @version: 1.0
*
*/

  
jQuery(document).ready(function() {
  
  var j = jQuery;
  
  var easeMethod = j.easing.def = 'easeOutSine';

  j('#footer').scrollFollow({
    container: 'contentArea',
    relativeTo: 'top',
    easing: easeMethod
  });
  
  /*
  j(window).scroll(function(){
    if(isScrollBottom()) {
      var newFootPos = (j('#contentArea').outerHeight() - j('#footer').outerHeight()) - 17;
      //alert( newFootPos );
      var clearQueue = true;
      j('#footer').stop(clearQueue);
      j('#footer').animate({'top': (newFootPos)+'px'}, 2000);
    }
  });
  
  function isScrollBottom() {
    var documentHeight = j(document).height();
    var scrollPosition = j(window).height() + j(window).scrollTop();
    return (documentHeight == scrollPosition);
  }  
  */
});
