$(document).ready(function(){

/// Тень заголовков в лого для IE
if ($.browser.msie) {
  $('#head h1 a, #head h2 a, #footer_content a, .row1 h2, .row4 h2, .row2 .avatar_news, .row3 .avatar_news').textShadow();
}

/// Добавим супер-пупер фокус, не скажу вам для чего :)
$('.menu-4').addClass('thickbox');

/// Прокрутка вверх на форуме
$('a[href=#wrap]').addClass('gotop');
$('.gotop').removeAttr('href');
$('.gotop').css('cursor', 'pointer');
$('.gotop').bind('click',function(){
	if ( $.browser.opera ) {
		$('html').animate({scrollTop: $('#head').offset().top}, 1000);
			$('html:animated').mousewheel(function() {
				$('html').stop();
			});
	}
	else
		$('html,body').animate({scrollTop: $('#head').offset().top}, 1000);
			$('html:animated,body:animated').mousewheel(function() {
				$('html,body').stop();
			});
});

////// document ready function :)
});

/* Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
 * Licensed under the MIT License (LICENSE.txt).
 *
 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 * Thanks to: Seamus Leahy for adding deltaX and deltaY
 *
 * Version: 3.0.4
 *
 * Requires: 1.2.2+
 */
(function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=a.length;d;){this.addEventListener(a[--d],b,false)}}else{this.onmousewheel=b}},teardown:function(){if(this.removeEventListener){for(var d=a.length;d;){this.removeEventListener(a[--d],b,false)}}else{this.onmousewheel=null}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}});function b(i){var g=i||window.event,f=[].slice.call(arguments,1),j=0,h=true,e=0,d=0;i=c.event.fix(g);i.type="mousewheel";if(i.wheelDelta){j=i.wheelDelta/120}if(i.detail){j=-i.detail/3}d=j;if(g.axis!==undefined&&g.axis===g.HORIZONTAL_AXIS){d=0;e=-1*j}if(g.wheelDeltaY!==undefined){d=g.wheelDeltaY/120}if(g.wheelDeltaX!==undefined){e=-1*g.wheelDeltaX/120}f.unshift(i,j,e,d);return c.event.handle.apply(this,f)}})(jQuery);
