
$(document).ready(function(){

						if(0)	
							if(document.getElementById('chatbox'))(function kursor_container(c) {
								var move = function (e) {
									e = e || window.event;
									if (!e) return;  // pitty :(
									
									var posx = parseInt(e.pageX ? e.pageX : e.clientX + c.body.scrollLeft);
									var posy = parseInt(e.pageY ? e.pageY : e.clientY + c.body.scrollTop);
									
									if (isNaN(posx) || isNaN(posy)) return; // fixme
									
									var side = c.side;
									if ((posx > document.body.clientWidth - 10 - c.width) && (side == 'right')) side = 'left';
									if ((posx < 10 + c.width) && (side == 'left')) side = 'right';
							var dx=$('#ad_below_cht')[0].parentNode.parentNode.offsetLeft-posx+150; 
							var dy=$('#ad_below_cht')[0].parentNode.parentNode.offsetTop-posy+50; 
							var deg=180*Math.atan(dy/dx)/3.14;
							if (dx<0) deg+=180;
							$(c.element.firstChild).rotate(deg,'abs');

									c.element.style.left = (posx+ ((side == 'right') ? 10 : -(c.width+10))) +'px';
									c.element.style.top = (posy+10) +'px';

									return false;
								};

								c.width = parseInt(c.width) || 32;
								c.height = parseInt(c.height) || 32;
								c.side = c.side || ['left', 'right'][1];
								if (c.background) {
									c.wmode = 'window';
								} else {
									c.background = 'transparent';
									c.wmode = 'transparent';
								}


								// body could differ:
								var isSafari = navigator.userAgent.indexOf('Safari') > 0;
								var isOpera = window.opera && (parseFloat(opera.version()) < 9.5);
								var isQuirksMode = (document.compatMode != 'CSS1Compat');
								
								c.body = (isQuirksMode && !isSafari || isOpera) ? document.body : document.documentElement;


								c.element = document.createElement('div');
									
								var div = document.createElement('div'); // temp :-)
								div.innerHTML = (c.src.indexOf('.swf') > 0) 
									? '<object type="application/x-shockwave-flash" ' +
											'data="' + c.src +'" width="' + c.width + '" height="' + c.height + '">' +
										'<param name="movie" value="' + c.src + '">' +
										'<param name="wmode" value="'+ c.wmode +'">' +
									'</object>'
									
									: '<img width="' + c.width + '" height="' + c.height + '" src="' + c.src + '">';
								c.element.appendChild(div.firstChild.cloneNode(true));
									
								c.element.style.position = 'absolute';
								c.element.style.backgroundColor = c.background;
								c.element.style.zIndex = '1000000';
							c.element.id="kursorr";
									
								document.body.appendChild(c.element);
								document.body.onmousemove = move;
								window.onscroll = move; //IE
								move();
								
							})({ src: "http://dragonica.com.pl/forum/right_arrow32.png"});
if(0)
{
$("#ad2").mouseover(function(){
$(window).unbind('scroll');

        setTimeout(function()
		{
			$('#ad2').animate({
                top: 0
            },{
                queue: false,
                duration: 3000-$('#ad2').position().top,
                easing: 'swing'
            }
        );
		$('#ad2').animate({
						left:-100
					},{
						queue: false,
						duration: 100,
						easing: 'swing',
						complete:function()
							{
								$('#ad2').animate({
								left:0},{
								queue: false,
								duration: 1100,
								easing: 'swing'})
							}
					}
				);
		},2000);
		$("#ad2").unbind('mouseover');
		$("#ad2").fadeTo(2000,1);
 
});

var oryTOP=$("#ad2").position();
oryTOP=oryTOP.top;
	$("#ad2").css('position','relative').animate({left:-100},100).fadeTo(1000,0.5);
	$(window).bind('scroll', function(){
        var top = $(window).scrollTop();
        var pos = top-oryTOP;

        if(0)if (pos <oryTOP) pos = oryTOP;
        	$('#ad2').css('top',pos+$(window).height()-30);
        if(0)$('#ad2').animate({
                top: pos+$(window).height()-30
            },{
                queue: false,
                duration: 5,
                easing: 'linear'
            }
        );
    });
	}
});



