var groupItems2 = null;
var mov2        = false;
var dur2        = false;


function goLenta2(){
    var parentObj2  = $('#slideshow2');
    groupItems2 = $(parentObj2).find(".items");
    return anim2(parseInt(groupItems2.css("marginLeft")));

}

function anim2(marginLeft) {		if(!mov2) mov2 = groupItems2.find('img:first').outerWidth(true);
		if(!dur2) dur2 = mov2*24;
        marginLeft = marginLeft-mov2+"px";
        groupItems2.animate({"marginLeft": marginLeft},dur2,"linear",function(){
                var width = groupItems2.find('img:first').outerWidth(true);
                $(groupItems2.find('img:first')).appendTo(groupItems2);
    			groupItems2.css("marginLeft",parseInt(marginLeft)+width+"px");
    			mov2 = dur2 = false;
                return anim2(parseInt(marginLeft)+width);
    	});
}
function noanim2(){
    groupItems2.stop();
}

function showTopImg2(obj)
{
	var width = obj.width();
	var width_big = width/152*204;
	var marginleft = (width_big-width)/2;

	obj.animate({
		marginTop: "-25px",
		marginLeft: "-"+ marginleft +"px",
        height: "204px",
        borderWidth: "3px"
 		}, 'fast'
 	);
}

function hideTopImg2(obj)
{
	obj.animate({
		marginTop: 0,
		marginLeft: 0,
        height: "152px",
        borderWidth: "0px"
 		}, 'fast'
 	);
}

