$(document).ready(function()
{
	//
	// Skróty wiadomości
	//
	$(".qnews-side a").attr("href", "javascript:void(0)");
	$(".qnews-side a").click(function(){

		$("#qnews").html("<div style=\"width: 100%; text-align: center; margin-top: 25px; font-size: 14px; line-height: 25px\">Pobieranie informacji.<br />Proszę czekać ...<br /><br /><img src=\"styles/img/yellow_indicator.gif\" alt=\"\" /></div>");
		$.get("response.xml.php", {
			mode: "qnews",
			sn: $(this).attr("title")

		}, function(xml) {
			$("#qnews").html("");

			$(".qnews-prev-side").css("display", $("prev_display", xml).text());
			$(".qnews-prev-side a").attr("title", $("prev", xml).text());
			$(".qnews-next-side").css("display", $("next_display", xml).text());
			$(".qnews-next-side a").attr("title", $("next", xml).text());

			$("qnews", xml).each(function(id)
			{
				qid = $("qnews", xml).get(id);

				$("#qnews").append("<span class=\"subject-news\" style=\"margin-top: 6px\">" +
								"<span class=\"link-news\" style=\"width: 260px; font-size: 13px\"><a href=\"" + $("link", qid).text() + "\" title=\"" + $("title", qid).text() + "\" style=\"text-decoration: none\">" + $("title_lower", qid).text() + "</a></span>" +
								"<span class=\"date-news\" style=\"width: 38px; background: #FFFFFF; font-size: 10px; color: #CA250C\">" + $("date", qid).text() + "</span>" +
							"</span>");

			});
		});
	});



	$(".border-side-hover").mouseover(function()
	{
		$(this).removeClass("border-grow").addClass("border-yellow");
	});

	$(".border-side-hover").mouseout(function()
	{
		$(this).removeClass("border-yellow").addClass("border-grow");
	});


});

