(function($){
  //teleTab
  $.fn.teleTabys = function(i_height){
    //a tabOpen class-al rendelkezo elem kinyitasa
    var nyitottElem=$(".tabOpen").attr("id");                        
    $("div#"+nyitottElem+"c").show().addClass("tabContentOpened tabContentActive");
    $("li#"+nyitottElem).addClass("tabButtonOpened tabButtonActive").removeClass("tabOpen");
		
    if (i_height!=0)
  		$("div.tabLiContent").css("height",i_height);

    $(this).click(function(){
      //li id pl.: lorem
      var liId=$(this).attr("id");
      //div id = li id+c pl.: loremc
      var actDiv=$(this).next("div.tabContentActive").attr("id");
      
      //ha a kattintas megegyezik, akkor nem foglalkozunk vele
      if( (liId +"c")==actDiv ) {
        return false;
      }
                            
      //levesszuk az elozo aktiv osztalyokat
      $("li."+this.className).removeClass("tabButtonOpened tabButtonActive");
      $("div.tabLiContent").removeClass("tabContentOpened").removeClass("tabContentActive").hide();

      //aktiv stilusok hozzaadasa
      $("#"+liId).addClass("tabButtonOpened tabButtonActive");
      $("#"+liId+"c").addClass("tabContentOpened tabContentActive").show();
    });
  }
})(jQuery);

