//$(document).ready(function () {
//    if($('.newsletter').offset() != null){
//
//        var top = $('.newsletter').offset().top - parseFloat($('.newsletter').css('marginTop').replace(/auto/, 0));
//
//        $(window).scroll(function (event) {
//            //var extra = $('.newsletter').height();
//            // alert(extra);
//
//
//            // what the y position of the scroll is
//            var y = $(this).scrollTop();
//
//            // whether that's below the form
//            if (y >= top ) {
//                // if so, ad the fixed class
//                $('.newsletter').addClass('fixed');
//                $('.social-media').addClass('fixed2');
//
//            } else {
//                // otherwise remove it
//                $('.newsletter').removeClass('fixed');
//                $('.social-media').removeClass('fixed2');
//            }
//        });
//    }
//
//});


