jQuery(document).ready(function() {
	
	$('A[rel="external"]').click( function() {
        window.open( $(this).attr('href') );
        return false;
    });
	
//	Shadowbox.init();
	
//	$('#ff_carousel').jcarousel({
//        start: 		1,
//		scroll:		1,
//		easing: 	"swing",
//		wrap:		"both",
//		itemFirstInCallback: {
//		  onBeforeAnimation: cb_Before,
//		  onAfterAnimation: cb_After
//		},
//		initCallback: InitCarousel
//    });

});

function cb_Before(carousel, li, index, state) {	
	//alert("cb_Before");
}

function cb_After(carousel, li, index, state) {	
	// set text of carousel footer
	l = $(li);
	t = $(l).find("a").attr("title");
	$('#car_caption').html(t);
	// set href of lupenbutton
	$('#car_detail').click(function() {
		$(l).find("a").click();
		return false;
	})
	// set current index as value of hidden form field
	$("#p_style").val(index);
}

function InitCarousel (carousel, state) {
	//alert("InitCarousel");
}

