$(function(){(function(b,d,i){function g(){if(e)e=false;else{c=null;a.removeClass("inverted");$(window).scrollTop()==d()||$(window).scrollTop()+$(window).height()==d()?a.addClass("inactive"):a.removeClass("inactive")}}function h(){if($(window).width()>$("#container").width()+90){a.removeClass("rolled").addClass("unrolled").removeAttr("style");a.unbind("mouseenter");a.unbind("mouseleave");a.hover(function(){a.addClass("hovered")},function(){a.removeClass("hovered")})}else{a.removeClass("unrolled").addClass("rolled");
a.unbind("mouseenter");a.unbind("mouseleave");$.browser.msie&&$.browser.version<8?a.hover(function(){a.removeClass("rolled").addClass("unrolled").addClass("hovered")},function(){a.removeClass("unrolled").addClass("rolled").removeClass("hovered")}):a.hover(function(){if(!f){a.removeClass("rolled").addClass("hovered").animate({right:"0px "},300);f=true}},function(){a.removeClass("hovered").animate({right:"-35px "},300,function(){$(this).addClass("rolled");f=false})})}}var a=$(b);if($.browser.msie&&
$.browser.version<7)a.remove();else{var c=null,e=false;a.click(function(){if(a.hasClass("inactive"))return false;if(c==null){c=$(window).scrollTop();e=true;window.scrollTo(0,d());a.addClass("inverted");a.attr("title","\u0412\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f")}else{window.scrollTo(0,c);a.removeClass("inverted");a.attr("title",i);c=null}return false});var f=false;$(window).scroll(g);g();$(window).resize(h);h();$(b+"Wrapper").hover(function(){$(b).hasClass("inactive")||$(b).addClass("hovered")},
function(){$(b).hasClass("inactive")||$(b).removeClass("hovered")});$(b+"Wrapper").click(function(){$(b).click()})}})("#scrollTop",function(){return 0},"\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430\u0432\u0435\u0440\u0445")});

