// JavaScript Document
function hint(ev, text, mode) {
	if (document.getElementById("hint_div")==null) {
		elDiv=document.createElement('div');
		elDiv.id='hint_div';
		document.body.appendChild(elDiv);
	}
	MouseX=ev.clientX + document.documentElement.scrollLeft;
	MouseY=ev.clientY + document.documentElement.scrollTop; 
	obj=document.getElementById("hint_div");
	if (mode=='show') obj.style.visibility="hidden";
	else {
		obj.style.visibility="hidden";
		obj.style.top=MouseY+10;
		obj.style.left=MouseX-obj.clientWidth;
		obj.style.visibility="visible";
	}
}

$(document).ready(function(){
    
    // Видео
    $('a.video').each(function(){
        var swf = new SWFObject('/i/player.swf', 'ply', '470', '320', '9', '#ffffff');
        swf.addParam('allowfullscreen', 'true');
        swf.addParam('allowscriptaccess', 'always');
        swf.addParam('wmode', 'opaque');
        swf.addVariable('file', $(this).attr('href'));
        swf.addVariable('image', $(this).find('img').attr('src'));
        $(this).replaceWith(swf.getSWFHTML());
    });
    
});
