(function($) {... changed to $(document).ready(function () {...
Closure (function($) {}(jQuery)); not working on safari 7.0.5
Swap $scrollTop variable to $scrollBottom in $scrollBottom block of code
Merged local conflicts