/*
 * @desc tablica na potrzeby zapamietania pozycji linków na renderze
 */
var aLetfPositions = new Array();

/*
 * @desc dodanie obslugi overa na lupy w linkach na renderze oraz zapoamietanie pozycji linków 
 */
$(document).ready(
	function()
	{
		$('div.pojLupa').mouseover(function(){
				$(this).css('background','#fff');
				$(this).children('div.pojText').show();
		});	
		
		$('div.pojLupa').mouseout(function(){
				$(this).css('background','transparent');
				$(this).children('div.pojText').hide();
		});
		$('#pojRender div.pojLupa').each(function(){
				aLetfPositions.push(parseInt($(this).css('left')));
		});
	
	}
);

/*
 * @desc uruchamia przewijanie ekranu renderu
 * @param string sDirect kierunek przewijania 
 */
function fStartScrollRender(sDirect){
		
		var iLeft = 743-parseInt($('#pojRender img').width());
		if (sDirect=='left')
				iLeft = 0;

		$('#pojRender img').animate({left: iLeft}, 1000);
		
		$('#pojRender div.pojLupa').each(function(i){
				var iSubsLeft = parseInt($(this).css('left'));
				if (sDirect=='left'){
						iSubsLeft = aLetfPositions[i];
				} else {
						iSubsLeft = aLetfPositions[i] + iLeft;
				}
				$(this).animate({left: iSubsLeft}, 1000);
		});
}

/*
 * @desc zatrzymanie przewijania renderu
 */
function fStopScrollRender(){
		$('#pojRender img').stop();
		$('#pojRender div.pojLupa').stop();
}
