﻿$(document).ready(function () {

	//Ticker
	$('#ticker01 li').first().show();
	setInterval("NewsTicker()", 5000);

	// Make all of panel a link
	$(".panelBox").click(function () {
		location.href = $(this).find("a").attr("href");
	});

	$('marquee').marquee('pointer').mouseover(function () {
        $(this).trigger('stop');
    }).mouseout(function () {
        $(this).trigger('start');
    });

});

var articleindex = 0;

function NewsTicker() {

	$("#tickerBg").fadeIn(function () {

		$("#ticker01 li:eq(" + articleindex + ")").hide();
		if (articleindex < $("#ticker01 li").length - 1)
			articleindex++;
		else
			articleindex = 0;
		$("#ticker01 li:eq(" + articleindex + ")").show();
		$("#tickerBg").fadeOut();

	});
}


