$(document).ready(function(){
  control_listTeaser(isListTeaserActiv);
});

jQuery.fn.listTeaser = function(activ) {
   show_listTeaserCnt(activ)
}

jQuery.fn.listTeaserCnt = function(activ) {
   show_listTeaserCnt(activ)
}


function show_listTeaserCnt(get_index){
    var aListElTeaser = $(idListTeaser).children('li');
    var aListElTeaserCnt = $(idListTeaserCnt).children('li');
    
    aListElTeaser.each(
		function() {
         var set_index = $(this).index();
			if (set_index == get_index) {
            $(this).unbind('click');
            $(this).addClass('activ')
               .mouseover(
                  function(){
                     $(this).removeClass('hover');
                  }
               );
			   $(this).find(areaListTeaserActiv).addClass('activ')
               .mouseover(
                  function(){
                     $(this).removeClass('hover');
                  }
               );
			} else {
            $(this).bind('click',function(){
				   show_listTeaserCnt(set_index);
               if (addonExist == 1) {
                  addon_listTeaser(set_index);
               }
			   });
            
            $(this).removeClass('activ')
               .mouseover(
                  function() {
                     $(this).addClass('hover');
                  }
               )
               .mouseout(
                  function(){
                     $(this).removeClass('hover');
                  }
               );
            $(this).find(areaListTeaserActiv).removeClass('activ')
               .mouseover(
                  function() {
                     $(this).addClass('hover');
                  }
               )
               .mouseout(
                  function(){
                     $(this).removeClass('hover');
                  }
               );
         } //if else
      } //function
    ); //each

    aListElTeaserCnt.each(
		function() {
         var set_index = $(this).index();
			if (set_index == get_index) {
            $(this).show();
         } else {
            $(this).hide();
         }
      }
    );
} // show_listTeaserCnt

function control_listTeaser(activ){
    var oListElTeaser = $(idListTeaser).children('li');
    var oListElTeaserCnt = $(idListTeaserCnt).children('li');
    oListElTeaser.listTeaser(activ);
    oListElTeaserCnt.listTeaserCnt(activ);
} // control_listTeaser
