function callBack1(carousel,liObject,index,state) { 
var rel1 = $(liObject).find('a').attr('rel');
$('#mycarousel li a').removeClass('active');
$(liObject).find('a').addClass('active');
$('#slideContainer1 div.contentdiv').hide();
$('#slideContainer1 div.contentdiv:eq('+ (rel1 - 1) +')').fadeIn();
}



$(function() {

$('#slideContainer1 div.contentdiv').hide();
$('#slideContainer1 div.contentdiv:eq(0)').show();
$('#mycarousel').jcarousel({'scroll': 1, 'auto': 6,  'wrap': 'last', 'visible': 4 , 'buttonNextHTML':'<a><span></span></a>', 'buttonPrevHTML':'<a><span></span></a>', 'itemFirstInCallback': callBack1 }); //end of jcarousel

var carousel = jQuery('#mycarousel').data('jcarousel'); // get carousel instance
//stop on mouseover and  start  on mouseout
$('#mycarousel li').hover(function(){carousel.stopAuto();}, function(){carousel.startAuto(); });



$('#mycarousel li:first a').addClass('active');
$('#mycarousel li a').click(function(e){
e.preventDefault();
$('#mycarousel li a').removeClass('active');
$(this).addClass('active');
var i= $(this).attr('rel');
$('#slideContainer1 div.contentdiv').hide();
$('#slideContainer1 div.contentdiv:eq('+ (i - 1) +')').fadeIn();
});
      $('.sliderLogo a').click(function() {
        $(this).parent().parent().find('a').removeClass('active');
        $(this).addClass('active');
      });
      
      if($('.scroll-pane').length != 0)
      {
        $('.scroll-pane').jScrollPane({
          verticalDragMinHeight: 24,
          verticalDragMaxHeight: 24
        });
      }
    
    });
    
    function imgHov(e) {
      if(e.src.match('_h.gif')) {
        e.src = e.src.replace(/_h.gif/i, ".gif");
      } else {
        e.src = e.src.replace(/.gif/i, "_h.gif");
      }
    }
