/**
* слушает сейчас
*/
var NowListening =
{
	/**
	* вывод всплывающей подсказки
	*/
	init: function(element)
    {
		xOffset = 20;
		yOffset = 20;
		var tooltip = "zoom-box";

		element.hover(function(e)
        {

        	var data = $(this).next();
			var img = data.children(".img").text();
			var artist = data.children(".artist").text();
			var album = data.children(".album").text();
			var song = data.children(".song").text();
			$("#"+tooltip).find(".song").html(song);
			$("#"+tooltip).find(".album").html(album);
			$("#"+tooltip).find(".artist").html(artist);
			$("#"+tooltip).find("img").attr("src", img)
            if ($(document).width() < (e.pageX + $("#" + tooltip).width() + 40))
            {
                yOffset = -250;
            }
            else
            {
                yOffset = 20;
            }
			$("#"+tooltip).css("top",(e.pageY - xOffset) + "px").css("left",(e.pageX + yOffset) + "px").show();
		},
		function(){
			$("#"+tooltip).hide();
		});
		element.mousemove(function(e){
			$("#"+tooltip).css("top",(e.pageY + xOffset) + "px").css("left",(e.pageX + yOffset) + "px");
		});
	}
}
