(function($){
   var stickyOffset = $('.main_head-in').offset().top;

    $(window).scroll(function(){


          var sticky = $('.main_head-in'),
          scroll = $(window).scrollTop();
  

 

            if (scroll >= stickyOffset) sticky.addClass('fixed');
            else sticky.removeClass('fixed');
     
    });


})(jQuery);
