function jqContentSlider() {
  
  var animSpeed = 1500; // tempo do fadein
  var animSpeedClick = 200; // tempo do fadeinClick
  var intervalElements = 6000; //tempo de uma imagem para a outra
  var elementSel = 0;
  var intervalo = 0;
  var pauseActiva = false;
  var click = true;
  
  arrImages = jQuery("#sliderHome .relative").children();
  totalArr = arrImages.size();
  
  for(i=0;i<totalArr;i++){
  	var newA = $('<a />');
  	newA.attr('rel', i);
  	$('.homepagination').append(newA);
  }
  
  $('.homepagination a').first().addClass('sel');
  
  var newClear = $('<div />');
  newClear.addClass('clear');
  $('.homepagination').append(newClear);
  
  arrBolas = jQuery(".homepagination").children("a");
  totalBolas = arrBolas.length;
  
  jQuery('.homeWrapperText p').text(jQuery(arrImages[elementSel]).attr('texto'));
  //jQuery('.homeWrapperText h1').text(jQuery(arrImages[elementSel]).attr('textotit'));
  jQuery('.homeWrapperText h3').text(jQuery(arrImages[elementSel]).attr('textotit'));
  jQuery('.homeWrapperText h3').attr('link', jQuery(arrImages[elementSel]).attr('lnktit'));
  if(jQuery('.homeWrapperText h3').attr('link') == ''){
    jQuery('.homeWrapperText h3').css('cursor', 'default');
  }
  else{
    jQuery('.homeWrapperText h3').css('cursor', 'pointer')
  }
  
  // auto interval
  
  intervalo = setInterval(changeImgae, intervalElements);
  
  function changeImgae() {
    click = false;
    elementSel++;
    if(elementSel == totalArr) {
      elementSel = 0;
    }
    
    jQuery(arrBolas).removeClass();
    
    for(i=0; i<totalBolas; i++) {
      if(jQuery(arrBolas[i]).attr("rel") == elementSel) {
        jQuery(arrBolas[i]).addClass("sel");
      }
    }
    
    jQuery(arrImages).css({
      "z-index" : "0"
    });
    
    jQuery(arrImages[elementSel]).css("z-index", "10").fadeIn(animSpeed, function(){
      jQuery(arrImages).hide();
      jQuery(arrImages[elementSel]).show();
      
    });
    
    jQuery('.homeWrapperText p').fadeOut(animSpeed/2, function(){
      jQuery(this).text(jQuery(arrImages[elementSel]).attr('texto'));
      jQuery(this).fadeIn(animSpeed/2);
    });
    //jQuery('.homeWrapperText h1').fadeOut(animSpeed/2, function(){
    jQuery('.homeWrapperText h3').fadeOut(animSpeed/2, function(){
      jQuery(this).text(jQuery(arrImages[elementSel]).attr('textotit'));
      jQuery(this).attr('link', jQuery(arrImages[elementSel]).attr('lnktit'));
      if(jQuery(this).attr('link') == ''){
        jQuery(this).css('cursor', 'default');
      }
      else{
        jQuery(this).css('cursor', 'pointer');
      }
      jQuery(this).fadeIn(animSpeed/2);
      click = true;
    });
    
    
  }
  
  
  // click bolas
  
  jQuery(".homepagination a").click(function(e){
       e.preventDefault();
       clearInterval(intervalo);
       //setTimeout(intervalo);
    
     
      jQuery(".homepagination  a").removeClass();
      
      relBola = jQuery(this).attr("rel");
      elementSel = relBola;
      
      jQuery(this).addClass("sel");
      
     
      
      jQuery(arrImages).css({
        "z-index" : "0"
      });
      
      //alert(elementSel);
      jQuery(arrImages).stop(true,true);
      jQuery(arrImages[elementSel]).css("z-index", "10").fadeIn(animSpeedClick, function(){
        jQuery(arrImages).hide();
        jQuery(arrImages[elementSel]).show();
        
       
        
      });
      
      jQuery('.homeWrapperText p').fadeOut(animSpeed/2, function(){
        jQuery(this).text(jQuery(arrImages[elementSel]).attr('texto'));
        jQuery(this).fadeIn(animSpeed/2);
      });
      
      //jQuery('.homeWrapperText h1').fadeOut(animSpeed/2, function(){
      jQuery('.homeWrapperText h3').fadeOut(animSpeed/2, function(){
        jQuery(this).text(jQuery(arrImages[elementSel]).attr('textotit'));
        jQuery(this).attr('link', jQuery(arrImages[elementSel]).attr('lnktit'));
        if(jQuery(this).attr('link') == ''){
          jQuery(this).css('cursor', 'default');
        }
        else{
          jQuery(this).css('cursor', 'pointer');
        }
        jQuery(this).fadeIn(animSpeed/2);
      });
      
      
      intervalo = setInterval(changeImgae, intervalElements);
           
      //clearTimeout(intervalo);
  });

}

