<!-- 
$(document).ready(function()
{
	// manage aktuelno
	var aktuelno = $('ul#carousel');
	
	// calculate width for aktuelno
	var aktuelno_width = (aktuelno.find('li.lista-clan').length * 202);
	aktuelno.css('width', aktuelno_width + 'px');
	
	var rec_parent_width 	= parseInt(aktuelno.parent().css('width'));

if(isNaN(rec_parent_width))
	{
		rec_parent_width = 606;
	}
	
	var rec_max_left 		= aktuelno_width - rec_parent_width -2;
	//aktuelno_width 6*202 - 1212px 612 je razlika
	var rec_common_step		= 606;
	
	// handle right_arrow_small
	$('a#right_arrow_small_1').click(function()
	{
		// change Background for Arrow Right **********************************
		var buttonRgt = $('#divNavigacija a.next');
		buttonRgt.css("background-images","url(/images/navigateArrows.gif) no-repeat");
		buttonRgt.css("background-position","-21px -34px");
		buttonRgt.css("cursor","default");
		// change Background for Arrow left
		var buttonLft = $('#divNavigacija a.prev');
		buttonLft.css("background-images","url(/images/navigateArrows.gif) no-repeat");
		buttonLft.css("background-position","0px -34px");
		buttonLft.css("cursor","pointer");	
		
		/******************************************************/
		// check num of elements
		if(aktuelno.find('li.lista-clan').length < 3)
		{
			return false;
		}
		
		// get current left
		var curr_left = Math.abs(parseInt(aktuelno.css('left')));

		if(isNaN(curr_left))
		{
			curr_left = 0;
		}
		
		// calculate step
		var step  		= rec_common_step;
		var temp_left 	= curr_left + rec_common_step;
		if(temp_left > rec_max_left)
		{
			//step = temp_left - rec_max_left;
			step = rec_common_step - (temp_left - rec_max_left);
		}
		//alert(step);
		//if((curr_left + step) > rec_max_left)
		if(step == 0)
		{
			// scroll back to beginning - rewind
			aktuelno.animate({"left": "0px"}, 400);
			// change Background for Arrow Right **********************************
			var buttonRgt = $('#divNavigacija a.next');
			buttonRgt.css("background-images","url(/images/navigateArrows.gif) no-repeat");
			buttonRgt.css("background-position","-21px 0px");
			buttonRgt.css("cursor","pointer");
			// change Background for Arrow left
			var buttonLft = $('#divNavigacija a.prev');
			buttonLft.css("background-images","url(/images/navigateArrows.gif) no-repeat");
			buttonLft.css("background-position","0px 0px");
			buttonLft.css("cursor","default");
			/******************************************************/
		}
		else
		{
			aktuelno.animate({"left": "-=" + step + "px"}, 400);
		}
		
		$(this).blur();
		return false;
	});
	
	
	// handle left_arrow_small 
	$('a#left_arrow_small_1').click(function()
	{
		// get current left
		var curr_left = Math.abs(parseInt(aktuelno.css('left')));
		if(isNaN(curr_left))
		{
			curr_left = 0;
		}
		
		if(curr_left == 0)
		{
			// just exit
			return false;
		}
		
		// calculate step
		var step  		= rec_common_step;
		var temp_left 	= curr_left + rec_common_step;
		
		if(temp_left > aktuelno_width)
		{
			step = temp_left - aktuelno_width;
		}
		
		
		//if((aktuelno_width - (curr_left + step)) > rec_parent_width)
		if(curr_left < rec_parent_width)
		{
			// scroll back to beginning - rewind
			aktuelno.animate({"left": "0px"}, 300);
		}
		else
		{
			aktuelno.animate({"left": "+=" + step + "px"}, 300);
			// change Background for Arrow Right **********************************
			var buttonRgt = $('#divNavigacija a.next');
			buttonRgt.css("background-images","url(/images/navigateArrows.gif) no-repeat");
			buttonRgt.css("background-position","-21px 0px");
			buttonRgt.css("cursor","pointer");
			// change Background for Arrow left
			var buttonLft = $('#divNavigacija a.prev');
			buttonLft.css("background-images","url(/images/navigateArrows.gif) no-repeat");
			buttonLft.css("background-position","0px 0px");
			buttonLft.css("cursor","default");
			/******************************************************/
		}
		
		$(this).blur();
		return false;
	});
//**** MANGE NAJNOVIJI OGLASI **********************************************//
	var oglasi = $('ul#carousel2');
	
	// calculate width for oglasi
	var oglasi_width = (oglasi.find('li.lista-clan2').length * 89);
	oglasi.css('width', oglasi_width + 'px');
	
	
	var oglasi_rec_parent_width 	= parseInt(oglasi.parent().css('width'));
	//alert(oglasi_rec_parent_width);

if(isNaN(oglasi_rec_parent_width))
	{
		oglasi_rec_parent_width = 264;
	}
	
	var oglasi_rec_max_left 		= oglasi_width - oglasi_rec_parent_width-6;
	//oglasi_width 6*540 - 1212px 612 je razlika
	var oglasi_rec_common_step		= 264;
	
	// handle right_arrow_small
	$('a#right_arrow_small_2').click(function()
	{
		// change Background for Arrow Right **********************************
		var buttonRgt = $('#divNavigacija2 a.next2');
		buttonRgt.css("background-images","url(/images/navigateArrows.gif) no-repeat");
		buttonRgt.css("background-position","-21px -34px");
		buttonRgt.css("cursor","default");
		// change Background for Arrow left
		var buttonLft = $('#divNavigacija2 a.prev2');
		buttonLft.css("background-images","url(/images/navigateArrows.gif) no-repeat");
		buttonLft.css("background-position","0px -34px");
		buttonLft.css("cursor","pointer");	
		
		/******************************************************/
		// check num of elements
		if(oglasi.find('li.lista-clan2').length < 3)
		{
			return false;
		}
		
		// get current left
		var oglasi_curr_left = Math.abs(parseInt(oglasi.css('left')));

		if(isNaN(oglasi_curr_left))
		{
			oglasi_curr_left = 0;
		}
		
		// calculate step
		var oglasi_step  		= oglasi_rec_common_step;
		var oglasi_temp_left 	= oglasi_curr_left + oglasi_rec_common_step;
		if(oglasi_temp_left > oglasi_rec_max_left)
		{
			//step = temp_left - rec_max_left;
			oglasi_step = oglasi_rec_common_step - (oglasi_temp_left - oglasi_rec_max_left);
		}
        //alert(oglasi_step);
		//if((curr_left + step) > rec_max_left)
		if(oglasi_step == 0 || oglasi_step == -3)
		{
			// scroll back to beginning - rewind
			oglasi.animate({"left": "0px"}, 200);
			// change Background for Arrow Right **********************************
			var buttonRgt = $('#divNavigacija2 a.next2');
			buttonRgt.css("background-images","url(/images/navigateArrows.gif) no-repeat");
			buttonRgt.css("background-position","-21px 0px");
			buttonRgt.css("cursor","pointer");
			// change Background for Arrow left
			var buttonLft = $('#divNavigacija2 a.prev2');
			buttonLft.css("background-images","url(/images/navigateArrows.gif) no-repeat");
			buttonLft.css("background-position","0px 0px");
			buttonLft.css("cursor","default");
			/******************************************************/
		}
		else
		{
			
			if(oglasi_step==264){oglasi_step=264+3;}
			oglasi.animate({"left": "-=" + oglasi_step + "px"}, 200);
		}
		
		$(this).blur();
		return false;
	});
	
	
	// handle left_arrow_small 
	$('a#left_arrow_small_2').click(function()
	{
		// get current left
		var oglasi_curr_left = Math.abs(parseInt(oglasi.css('left')));
		if(isNaN(oglasi_curr_left))
		{
			oglasi_curr_left = 0;
		}
		
		if(oglasi_curr_left == 0)
		{
			// just exit
			return false;
		}
		
		// calculate step
		var oglasi_step  		= oglasi_rec_common_step;
		var oglasi_temp_left 	= oglasi_curr_left + oglasi_rec_common_step;
		
		if(oglasi_temp_left > oglasi_width)
		{
			oglasi_step = oglasi_temp_left - oglasi_width;
		}
		
		
		//if((oglasi_width - (curr_left + step)) > rec_parent_width)
		if(oglasi_curr_left < oglasi_rec_parent_width)
		{
			// scroll back to beginning - rewind
			oglasi.animate({"left": "0px"}, 300);
		}
		else
		{
			if(oglasi_step==264){oglasi_step=264+3;}
			//alert(oglasi_step);
			oglasi.animate({"left": "+=" + oglasi_step + "px"}, 300);
			// change Background for Arrow Right **********************************
			var buttonRgt = $('#divNavigacija2 a.next2');
			buttonRgt.css("background-images","url(/images/navigateArrows.gif) no-repeat");
			buttonRgt.css("background-position","-21px 0px");
			buttonRgt.css("cursor","pointer");
			// change Background for Arrow left
			var buttonLft = $('#divNavigacija2 a.prev2');
			buttonLft.css("background-images","url(/images/navigateArrows.gif) no-repeat");
			buttonLft.css("background-position","0px 0px");
			buttonLft.css("cursor","default");
			/******************************************************/
		}
		
		$(this).blur();
		return false;
	});
	//**** MANGE FLASH IGRICE **********************************************//
	var igrice = $('ul#carousel3');
	
	// calculate width for oglasi
	var igrice_width = (igrice.find('li.lista-clan3').length * 89);
	igrice.css('width', igrice_width + 'px');
	
	
	var igrice_rec_parent_width 	= parseInt(igrice.parent().css('width'));
	//alert(igrice_rec_parent_width);

if(isNaN(igrice_rec_parent_width))
	{
		igrice_rec_parent_width = 264;
	}
	
	var igrice_rec_max_left 		= igrice_width - igrice_rec_parent_width-6;
	//igrice_width 6*540 - 1212px 612 je razlika
	var igrice_rec_common_step		= 264;
	
	// handle right_arrow_small
	$('a#right_arrow_small_3').click(function()
	{
		// change Background for Arrow Right **********************************
		var buttonRgt = $('#divNavigacija3 a.next3');
		buttonRgt.css("background-images","url(/images/navigateArrows.gif) no-repeat");
		buttonRgt.css("background-position","-21px -34px");
		buttonRgt.css("cursor","default");
		// change Background for Arrow left
		var buttonLft = $('#divNavigacija3 a.prev3');
		buttonLft.css("background-images","url(/images/navigateArrows.gif) no-repeat");
		buttonLft.css("background-position","0px -34px");
		buttonLft.css("cursor","pointer");	
		
		/******************************************************/
		// check num of elements
		if(igrice.find('li.lista-clan3').length < 3)
		{
			return false;
		}
		
		// get current left
		var igrice_curr_left = Math.abs(parseInt(igrice.css('left')));

		if(isNaN(igrice_curr_left))
		{
			igrice_curr_left = 0;
		}
		
		// calculate step
		var igrice_step  		= igrice_rec_common_step;
		var igrice_temp_left 	= igrice_curr_left + igrice_rec_common_step;
		if(igrice_temp_left > igrice_rec_max_left)
		{
			//step = temp_left - rec_max_left;
			igrice_step = igrice_rec_common_step - (igrice_temp_left - igrice_rec_max_left);
		}
        //alert(igrice_step);
		//if((curr_left + step) > rec_max_left)
		if(igrice_step == 0 || igrice_step == -3)
		{
			// change Background for Arrow Right **********************************
			var buttonRgt = $('#divNavigacija3 a.next3');
			buttonRgt.css("background-images","url(/images/navigateArrows.gif) no-repeat");
			buttonRgt.css("background-position","-21px 0px");
			buttonRgt.css("cursor","pointer");
			// change Background for Arrow left
			var buttonLft = $('#divNavigacija3 a.prev3');
			buttonLft.css("background-images","url(/images/navigateArrows.gif) no-repeat");
			buttonLft.css("background-position","0px 0px");
			buttonLft.css("cursor","default");
			/******************************************************/
			// scroll back to beginning - rewind
			igrice.animate({"left": "0px"}, 200);
		}
		else
		{
			
			if(igrice_step==264){igrice_step=264+3;}
			igrice.animate({"left": "-=" + igrice_step + "px"}, 200);
		}
		
		$(this).blur();
		return false;
	});
	
	
	// handle left_arrow_small 
	$('a#left_arrow_small_3').click(function()
	{
		// get current left
		var igrice_curr_left = Math.abs(parseInt(igrice.css('left')));
		if(isNaN(igrice_curr_left))
		{
			igrice_curr_left = 0;
		}
		
		if(igrice_curr_left == 0)
		{
			// just exit
			return false;
		}
		
		// calculate step
		var igrice_step  		= igrice_rec_common_step;
		var igrice_temp_left 	= igrice_curr_left + igrice_rec_common_step;
		
		if(igrice_temp_left > igrice_width)
		{
			igrice_step = igrice_temp_left - igrice_width;
		}
		
		
		//if((igrice_width - (curr_left + step)) > rec_parent_width)
		if(igrice_curr_left < igrice_rec_parent_width)
		{
			// scroll back to beginning - rewind
			igrice.animate({"left": "0px"}, 300);
		}
		else
		{
			if(igrice_step==264){igrice_step=264+3;}
			//alert(igrice_step);
			igrice.animate({"left": "+=" + igrice_step + "px"}, 300);
			// change Background for Arrow Right **********************************
			var buttonRgt = $('#divNavigacija3 a.next3');
			buttonRgt.css("background-images","url(/images/navigateArrows.gif) no-repeat");
			buttonRgt.css("background-position","-21px 0px");
			buttonRgt.css("cursor","pointer");
			// change Background for Arrow left
			var buttonLft = $('#divNavigacija3 a.prev3');
			buttonLft.css("background-images","url(/images/navigateArrows.gif) no-repeat");
			buttonLft.css("background-position","0px 0px");
			buttonLft.css("cursor","default");
			/******************************************************/
		}
		
		$(this).blur();
		return false;
	});
//**** MANGE POSTERI **********************************************//
	var poster = $('ul#carousel4');
	
	// calculate width for poster
	var poster_width = (poster.find('li.lista-clan2').length * 89);
	poster.css('width', poster_width + 'px');
	
	
	var poster_rec_parent_width 	= parseInt(poster.parent().css('width'));
	//alert(poster_rec_parent_width);

if(isNaN(poster_rec_parent_width))
	{
		poster_rec_parent_width = 264;
	}
	
	var poster_rec_max_left 		= poster_width - poster_rec_parent_width-6;
	//poster_width 6*540 - 1212px 612 je razlika
	var poster_rec_common_step		= 264;
	
	// handle right_arrow_small
	$('a#right_arrow_small_4').click(function()
	{
		// change Background for Arrow Right **********************************
		var buttonRgt = $('#divNavigacija4 a.next4');
		buttonRgt.css("background-images","url(/images/navigateArrows.gif) no-repeat");
		buttonRgt.css("background-position","-21px -34px");
		buttonRgt.css("cursor","default");
		// change Background for Arrow left
		var buttonLft = $('#divNavigacija4 a.prev4');
		buttonLft.css("background-images","url(/images/navigateArrows.gif) no-repeat");
		buttonLft.css("background-position","0px -34px");
		buttonLft.css("cursor","pointer");	
		
		/******************************************************/
		// check num of elements
		if(poster.find('li.lista-clan2').length < 3)
		{
			return false;
		}
		
		// get current left
		var poster_curr_left = Math.abs(parseInt(poster.css('left')));

		if(isNaN(poster_curr_left))
		{
			poster_curr_left = 0;
		}
		
		// calculate step
		var poster_step  		= poster_rec_common_step;
		var poster_temp_left 	= poster_curr_left + poster_rec_common_step;
		if(poster_temp_left > poster_rec_max_left)
		{
			//step = temp_left - rec_max_left;
			poster_step = poster_rec_common_step - (poster_temp_left - poster_rec_max_left);
		}
        //alert(poster_step);
		//if((curr_left + step) > rec_max_left)
		if(poster_step == 0 || poster_step == -3)
		{
			// change Background for Arrow Right **********************************
			var buttonRgt = $('#divNavigacija4 a.next4');
			buttonRgt.css("background-images","url(/images/navigateArrows.gif) no-repeat");
			buttonRgt.css("background-position","-21px 0px");
			buttonRgt.css("cursor","pointer");
			// change Background for Arrow left
			var buttonLft = $('#divNavigacija4 a.prev4');
			buttonLft.css("background-images","url(/images/navigateArrows.gif) no-repeat");
			buttonLft.css("background-position","0px 0px");
			buttonLft.css("cursor","default");
			/******************************************************/
			// scroll back to beginning - rewind
			poster.animate({"left": "0px"}, 200);
		}
		else
		{
			
			if(poster_step==264){poster_step=264+3;}
			poster.animate({"left": "-=" + poster_step + "px"}, 200);
		}
		
		$(this).blur();
		return false;
	});
	
	
	// handle left_arrow_small 
	$('a#left_arrow_small_4').click(function()
	{
		// get current left
		var poster_curr_left = Math.abs(parseInt(poster.css('left')));
		if(isNaN(poster_curr_left))
		{
			poster_curr_left = 0;
		}
		
		if(poster_curr_left == 0)
		{
			// just exit
			return false;
		}
		
		// calculate step
		var poster_step  		= poster_rec_common_step;
		var poster_temp_left 	= poster_curr_left + poster_rec_common_step;
		
		if(poster_temp_left > poster_width)
		{
			poster_step = poster_temp_left - poster_width;
		}
		
		
		//if((poster_width - (curr_left + step)) > rec_parent_width)
		if(poster_curr_left < poster_rec_parent_width)
		{
			// scroll back to beginning - rewind
			poster.animate({"left": "0px"}, 300);
		}
		else
		{
			if(poster_step==264){poster_step=264+3;}
			//alert(poster_step);
			poster.animate({"left": "+=" + poster_step + "px"}, 300);
			// change Background for Arrow Right **********************************
			var buttonRgt = $('#divNavigacija4 a.next4');
			buttonRgt.css("background-images","url(/images/navigateArrows.gif) no-repeat");
			buttonRgt.css("background-position","-21px 0px");
			buttonRgt.css("cursor","pointer");
			// change Background for Arrow left
			var buttonLft = $('#divNavigacija4 a.prev4');
			buttonLft.css("background-images","url(/images/navigateArrows.gif) no-repeat");
			buttonLft.css("background-position","0px 0px");
			buttonLft.css("cursor","default");
			/******************************************************/
		}
		
		$(this).blur();
		return false;
	});
//**** MANGE VIDO KLIPOVI **********************************************//
	var videoKlip = $('ul#carousel5');
	
	// calculate width for videoKlip
	var videoKlip_width = (videoKlip.find('li.lista-clan2').length * 89);
	videoKlip.css('width', videoKlip_width + 'px');
	
	
	var videoKlip_rec_parent_width 	= parseInt(videoKlip.parent().css('width'));
	//alert(videoKlip_rec_parent_width);

if(isNaN(videoKlip_rec_parent_width))
	{
		videoKlip_rec_parent_width = 264;
	}
	
	var videoKlip_rec_max_left 		= videoKlip_width - videoKlip_rec_parent_width-6;
	//videoKlip_width 6*540 - 1212px 612 je razlika
	var videoKlip_rec_common_step		= 264;
	
	// handle right_arrow_small
	$('a#right_arrow_small_5').click(function()
	{
		// change Background for Arrow Right **********************************
		var buttonRgt = $('#divNavigacija5 a.next5');
		buttonRgt.css("background-images","url(/images/navigateArrows.gif) no-repeat");
		buttonRgt.css("background-position","-21px -34px");
		buttonRgt.css("cursor","default");
		// change Background for Arrow left
		var buttonLft = $('#divNavigacija5 a.prev5');
		buttonLft.css("background-images","url(/images/navigateArrows.gif) no-repeat");
		buttonLft.css("background-position","0px -34px");
		buttonLft.css("cursor","pointer");	
		
		/******************************************************/
		
		// check num of elements
		if(videoKlip.find('li.lista-clan2').length < 3)
		{
			return false;
		}
		
		// get current left
		var videoKlip_curr_left = Math.abs(parseInt(videoKlip.css('left')));

		if(isNaN(videoKlip_curr_left))
		{
			videoKlip_curr_left = 0;
		}
		
		// calculate step
		var videoKlip_step  		= videoKlip_rec_common_step;
		var videoKlip_temp_left 	= videoKlip_curr_left + videoKlip_rec_common_step;
		if(videoKlip_temp_left > videoKlip_rec_max_left)
		{
			//step = temp_left - rec_max_left;
			videoKlip_step = videoKlip_rec_common_step - (videoKlip_temp_left - videoKlip_rec_max_left);
		}
        //alert(videoKlip_step);
		//if((curr_left + step) > rec_max_left)
		if(videoKlip_step == 0 || videoKlip_step == -3)
		{
			// scroll back to beginning - rewind
			videoKlip.animate({"left": "0px"}, 200);
			
			// change Background for Arrow Right **********************************
			var buttonRgt = $('#divNavigacija5 a.next5');
			buttonRgt.css("background-images","url(/images/navigateArrows.gif) no-repeat");
			buttonRgt.css("background-position","-21px 0px");
			buttonRgt.css("cursor","pointer");
			// change Background for Arrow left
			var buttonLft = $('#divNavigacija5 a.prev5');
			buttonLft.css("background-images","url(/images/navigateArrows.gif) no-repeat");
			buttonLft.css("background-position","0px 0px");
			buttonLft.css("cursor","default");
			/******************************************************/
		}
		else
		{
			
			if(videoKlip_step==264){videoKlip_step=264+3;}
			videoKlip.animate({"left": "-=" + videoKlip_step + "px"}, 200);
		}
		
		$(this).blur();
		return false;
	});
	
	
	// handle left_arrow_small 
	$('a#left_arrow_small_5').click(function()
	{
		// get current left
		var videoKlip_curr_left = Math.abs(parseInt(videoKlip.css('left')));
		if(isNaN(videoKlip_curr_left))
		{
			videoKlip_curr_left = 0;
		}
		
		if(videoKlip_curr_left == 0)
		{
			// just exit
			return false;
		}
		
		// calculate step
		var videoKlip_step  		= videoKlip_rec_common_step;
		var videoKlip_temp_left 	= videoKlip_curr_left + videoKlip_rec_common_step;
		
		if(videoKlip_temp_left > videoKlip_width)
		{
			videoKlip_step = videoKlip_temp_left - videoKlip_width;
		}
		
		
		//if((videoKlip_width - (curr_left + step)) > rec_parent_width)
		if(videoKlip_curr_left < videoKlip_rec_parent_width)
		{
			// scroll back to beginning - rewind
			videoKlip.animate({"left": "0px"}, 300);
		}
		else
		{
			if(videoKlip_step==264){videoKlip_step=264+3;}
			//alert(videoKlip_step);
			videoKlip.animate({"left": "+=" + videoKlip_step + "px"}, 300);
			
			// change Background for Arrow Right **********************************
			var buttonRgt = $('#divNavigacija5 a.next5');
			buttonRgt.css("background-images","url(/images/navigateArrows.gif) no-repeat");
			buttonRgt.css("background-position","-21px 0px");
			buttonRgt.css("cursor","pointer");
			// change Background for Arrow left
			var buttonLft = $('#divNavigacija5 a.prev5');
			buttonLft.css("background-images","url(/images/navigateArrows.gif) no-repeat");
			buttonLft.css("background-position","0px 0px");
			buttonLft.css("cursor","default");
			/******************************************************/
		}
		
		$(this).blur();
		return false;
	});
	
	
// MANGE MOTO SHOP **********************************************************
	var motoshop = $('ul#carouse6');
	
	// calculate width for motoshop
	var motoshop_width = (motoshop.find('li.lista-clan6').length * 121);
	motoshop.css('width', motoshop_width + 'px');
	var rec_parent_width 	= parseInt(motoshop.parent().css('width'));

if(isNaN(rec_parent_width))
	{
		rec_parent_width = 605;
	}
	
	var rec_max_left 		= motoshop_width - rec_parent_width-1;
	//motoshop_width 1210 - 1210px
	var rec_common_step		= 605;
	
	// handle right_arrow_small
	$('a#right_arrow_small_6').click(function()
	{
		
		// change Background for Arrow Right **********************************
		var buttonRgt = $('#divNavigacija6 a.next6');
		buttonRgt.css("background-images","url(/images/navigateArrows.gif) no-repeat");
		buttonRgt.css("background-position","-21px -34px");
		buttonRgt.css("cursor","default");
		// change Background for Arrow left
		var buttonLft = $('#divNavigacija6 a.prev6');
		buttonLft.css("background-images","url(/images/navigateArrows.gif) no-repeat");
		buttonLft.css("background-position","0px -34px");
		buttonLft.css("cursor","pointer");	
		
		/******************************************************/
		// check num of elements
		if(motoshop.find('li.lista-clan6').length < 3)
		{
			return false;
		}
		
		// get current left
		var curr_left = Math.abs(parseInt(motoshop.css('left')));

		if(isNaN(curr_left))
		{
			curr_left = 0;
		}
		
		// calculate step
		var step  		= rec_common_step;
		var temp_left 	= curr_left + rec_common_step;
		if(temp_left > rec_max_left)
		{
			//step = temp_left - rec_max_left;
			step = rec_common_step - (temp_left - rec_max_left);
		}
		//alert(step);
		//if((curr_left + step) > rec_max_left)
		if(step == 0)
		{
			// scroll back to beginning - rewind
			motoshop.animate({"left": "0px"}, 400);
			// change Background for Arrow Right **********************************
			var buttonRgt = $('#divNavigacija6 a.next6');
			buttonRgt.css("background-images","url(/images/navigateArrows.gif) no-repeat");
			buttonRgt.css("background-position","-21px 0px");
			buttonRgt.css("cursor","pointer");
			// change Background for Arrow left
			var buttonLft = $('#divNavigacija6 a.prev6');
			buttonLft.css("background-images","url(/images/navigateArrows.gif) no-repeat");
			buttonLft.css("background-position","0px 0px");
			buttonLft.css("cursor","default");
			/******************************************************/
		}
		else
		{
			motoshop.animate({"left": "-=" + step + "px"}, 400);
		}
		
		$(this).blur();
		return false;
	});
	
	
	// handle left_arrow_small 
	$('a#left_arrow_small_6').click(function()
	{
		// get current left
		var curr_left = Math.abs(parseInt(motoshop.css('left')));
		if(isNaN(curr_left))
		{
			curr_left = 0;
		}
		
		if(curr_left == 0)
		{
			// just exit
			return false;
		}
		
		// calculate step
		var step  		= rec_common_step;
		var temp_left 	= curr_left + rec_common_step;
		
		if(temp_left > motoshop_width)
		{
			step = temp_left - motoshop_width;
		}
		
		
		//if((motoshop_width - (curr_left + step)) > rec_parent_width)
		if(curr_left < rec_parent_width)
		{
			// scroll back to beginning - rewind
			motoshop.animate({"left": "0px"}, 300);
		}
		else
		{
			motoshop.animate({"left": "+=" + step + "px"}, 300);
			// change Background for Arrow Right **********************************
			var buttonRgt = $('#divNavigacija6 a.next6');
			buttonRgt.css("background-images","url(/images/navigateArrows.gif) no-repeat");
			buttonRgt.css("background-position","-21px 0px");
			buttonRgt.css("cursor","pointer");
			// change Background for Arrow left
			var buttonLft = $('#divNavigacija6 a.prev6');
			buttonLft.css("background-images","url(/images/navigateArrows.gif) no-repeat");
			buttonLft.css("background-position","0px 0px");
			buttonLft.css("cursor","default");
			/******************************************************/
		}
		
		$(this).blur();
		return false;
	});
		
});
-->
