<!--
/*
jQuery(document).ready(function(){
	var divGetTeamInfo = jQuery("#centerAjaxBox5 .boxHrefList div")d
	jQuery("#centerAjaxBox5 .boxHrefList div").click(function(event){
		alert(this.className);
	});
});
*/
//jQuery.noConflict();
var iLastActive5Articles = -1;

var aAjaxCategories = new Array();
aAjaxCategories[0] = 1; // polska
aAjaxCategories[1] = 2; // waszym zdaniem
aAjaxCategories[2] = 3; // puchary
aAjaxCategories[3] = 4; // ligi
aAjaxCategories[4] = 5; // kadra

jQuery(document).ready(function()
{
	jQuery("#centerAjaxBox5 .boxHrefList div.centerAjaxBox5Link").each(
		//// For each hottie, run this code. The "indIndex" is the
		// loop iteration index on the current element.
		function(intIndex) {
			// Bind the onclick event to simply alert the
			// iteration index value.
			jQuery(this).bind (
				"click",
				function(){
					iCategoryId = aAjaxCategories[intIndex];
					changeTeamInfoCategory(intIndex,iCategoryId);

				}
			);
			
			jQuery( "#centerAjaxBox5 .boxHrefList div#centerAjaxBox5Link" + intIndex).hover(function() {
			  jQuery(this).addClass('lastArticleCategoryHover');
			}, function() {
			  jQuery(this).removeClass('lastArticleCategoryHover');
			});

		}
	);
	
	function changeTeamInfoCategory(iDivIndex, iCategoryId)
	{
		if (iLastActive5Articles == iDivIndex) {
			return;
		} 

		removeClassActiveSeparator(); // separator miedzy zakladkami
		addClassActiveSeparator(iDivIndex);

		removeClassActiveTeamInfo();
		addClassActiveTeamInfo(iDivIndex);

		showHidePreloader();
		getAjaxLastArticle(iCategoryId);		
	}
	
	function removeClassActiveTeamInfo()
	{
		jQuery( "#centerAjaxBox5 .boxHrefList div#centerAjaxBox5Link" + iLastActive5Articles).removeClass('lastArticleCategoryActive');
	};
	
	function addClassActiveTeamInfo(intIndex)
	{
		jQuery( "#centerAjaxBox5 .boxHrefList div#centerAjaxBox5Link" + intIndex).addClass('lastArticleCategoryActive')
		iLastActive5Articles = intIndex;	
	}
	

	function removeClassActiveSeparator()
	{
		jQuery("#centerAjaxBox5 .boxHrefList div#separator_" + iLastActive5Articles).removeClass('separatorActive');
		jQuery("#centerAjaxBox5 .boxHrefList div#separator_" + (iLastActive5Articles + 1)).removeClass('separatorActive');
		
	};
	
	function addClassActiveSeparator(intIndex)
	{
		jQuery("#centerAjaxBox5 .boxHrefList div#separator_" + intIndex).addClass('separatorActive');
		jQuery("#centerAjaxBox5 .boxHrefList div#separator_" + (intIndex + 1)).addClass('separatorActive')
	}
	
	function showHidePreloader(bHide)
	{
		if (bHide == 'undefined') {
			bHide = false;
		}
		var iDivContentHeight = jQuery("#centerAjaxBox5 .boxContentAll").height();
//		alert('iDivContentHeight: ' + iDivContentHeight);
		var divPreloader = jQuery( "#centerAjaxBox5 div.preloader");
		jQuery(divPreloader).height(iDivContentHeight);
		if (!bHide) {
			jQuery(divPreloader).show();
		} else {
			jQuery(divPreloader).hide();
		}
	}
	
	changeTeamInfoCategory(0,aAjaxCategories[0]);
		
	function getAjaxLastArticle(iCategoryId) 
	{
		divContent = jQuery( "#centerAjaxBox5 div.boxContent");
		jQuery.ajax({  
			method: "get",url: "ajax/index/get5LastArticles.php",data: "categoryId=" + iCategoryId + "&random=" + Math.random(),  
//			beforeSend: function(){jQuery("#loading").show("fast");}, //show loading just when link is clicked  
//			complete: function(){ jQuery("#loading").hide("fast");}, //stop showing loading when the process is complete  
			success: function(html){ //so, if data is retrieved, store it in html  
//				jQuery(".content").show("slow"); //animation  
				jQuery(divContent).html(html); //show the html inside .content div  
				showHidePreloader(true);
			}  
		}); //close jQuery.ajax(  
	}
});
		
function focusLast5ArticleDiv(handleDiv,bOff) 
{
	if (!bOff) {
		jQuery(handleDiv).addClass('focusLast5ArticleDiv');
	} else {
		jQuery(handleDiv).removeClass('focusLast5ArticleDiv');
	}
}



-->