
    var obj_car = 1;
    var where_was_i = '-';
    var last_thumb = 0;
    var divArray = new Array();
    function mycarousel_itemFirstInCallback(carousel, item, idx, state) {
       var last_thumb = 0;
	   if(document.getElementById("thumb_div_"+idx)){
           if(where_was_i != "-"){
             document.getElementById("thumb_div_"+ where_was_i).className="jc_thumb";
           }
              document.getElementById("thumb_div_" + idx).className="jc_thumb_current";
       }
	       where_was_i = idx;   
    };
    
    function changeClass(id){
    }

	function mycarousel_initCallback(carousel)
	{
		var x
		var ii = 1
		var div_num = 0

	    jQuery('.jcarousel-control a').bind('click', function() {
          carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
          return false;
        });
        
        // Pause autoscolling if the user navigates to a slide using the numbered menu
	    jQuery('.jcarousel-control a').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(); });

	};

	//$(document).ready(function() {
		$('#pfwcarousel').show();
	    $('#pfwcarousel').jcarousel({
	        auto:5,
	        wrap: 'both',
			buttonNextHTML: null,
			buttonPrevHTML: null,
			scroll: 1,
	        initCallback: mycarousel_initCallback,
			itemFirstInCallback:  mycarousel_itemFirstInCallback
	    });
		$('#thumb-carousel').show();
	//});

