$(document).ready(function() {
    $('.banner').jcarousel({
        auto: 3,
        wrap: 'last',
        scroll: 1,
        initCallback: mycarousel_initCallback
    });

if ($('.clb').length > 0) {
	$('.clb').colorbox();
}

if ($('.clb_foto').length > 0) {
	$('.clb_foto').colorbox({
	photo:true
	});
}

if ($('.clb_iframe').length > 0) {
	$('.clb_iframe').colorbox({
		iframe: true,
		width: 400,
		height: 300
	});
}

if ($('.plus_minus').length > 0) {



	$('.plus_minus').click(function() {
	
	var path = $(this).attr('src');
	
	$(this).next().next().toggle();
	$(this).parent().toggleClass('active');
	
	if (path == '/netcat/admin/skins/default/img/i_plus.gif') { $(this).attr('src', '/netcat/admin/skins/default/img/i_minus.gif'); };
	if (path == '/netcat/admin/skins/default/img/i_minus.gif') { $(this).attr('src', '/netcat/admin/skins/default/img/i_plus.gif'); };
	
	});
}
    
});


function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });
 
    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });
 
    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};
