//$(function () {  
//  var msie6 = $.browser == 'msie' && $.browser.version < 7;
//  if (!msie6) {
//
//    var divh = 
//    var conth = $('.in-container-in:first').height();
//    var bottomStop = $(".in-container-in:first").offset().top + conth;
//   
//
//   var top = $('#floater').offset().top - parseFloat($('#floater').css('margin-top').replace(/auto/, 0));
//    $(window).scroll(function (event) {
//      // what the y position of the scroll is
//      var y = $(this).scrollTop();
//      
//      if(y + divh  >= bottomStop) {        
//        $('#floater.fixed').css('top', (bottomStop - divh - y) + "px");
//      } else if (y >= top) {
//        // if so, add the fixed class
//        $('#floater').addClass('fixed');
//        $('#floater.fixed').css('top', "0px");
//      } else {
//        // otherwise remove it
//        $('#floater').removeClass('fixed');
//      }
//    });
//  }  
//});
//

$(document).ready(function() {
    
    if($('#floater').length > 0) {
        var el=$('#floater');
        var stopper = $('.footer-link:first').offset().top;
        var divh  = el.height();
        var elpos=el.offset().top;
        $(window).scroll(function () {
            var y=$(this).scrollTop();
            var yh = y + divh;
            if((elpos + divh) > stopper) return;

            if(y < elpos){
                el.stop().animate({'top':0},300);
            } else if(stopper < (y + divh)) {

            } else{
                el.stop().animate({'top':y-elpos},300);
            }
        });
    }
});   


