//replace text
(function($){
  '$:nomunge';   
  $.fn.replaceText = function( search, replace, text_only ) {
    return this.each(function(){
      var node = this.firstChild,
        val,
        new_val,
        remove = [];
      if ( node ) {
        do {
          if ( node.nodeType === 3 ) {
            val = node.nodeValue;
            new_val = val.replace( search, replace );
            if ( new_val !== val ) {
              
              if ( !text_only && /</.test( new_val ) ) {
                $(node).before( new_val );
                remove.push( node );
              } else {
                node.nodeValue = new_val;
              }
            }
          }
          
        } while ( node = node.nextSibling );
      }
      remove.length && $(remove).remove();
    });
  };    
})(jQuery);

$(document).ready(function(){
		$(".expandBody").hide();
		$(".expand").toggle(function(){

			$(this).prev(".expandBody").slideDown(100);
			
			$(this).replaceText( /\bAfiseaza toate\b/gi, 'Strange' );

        }, 
		function(){
			$(this).prev(".expandBody").hide();
			$(this).replaceText( /\bStrange\b/gi, 'Afiseaza toate' );
		});
});

$(function() {
          $(this).bind("contextmenu", function(e) {
              e.preventDefault();
          });
 }); 
 
var cTab=0;
var runSlide=1;
var hpnowDate = new Date();
var hpbeforeDate = new Date();
$(document).ready(function() {
  autoChangeTab = function() {
    if (!runSlide)
      return;
	  hpnowDate = new Date();
	  var elapsedTime = (hpnowDate.getTime() - hpbeforeDate.getTime());
	  if(elapsedTime > 4500) 
      cTab+=Math.floor(1*(elapsedTime/4500));
	  else
      cTab++;
	  if ($('._selTab').length<=cTab)
	  	cTab=0;
 		$('._selTab').removeClass('curent');
		i=$('._selTab').index($($('._selTab')[cTab]));		
		$($('._selTab')[cTab]).addClass('curent');		
		$('#sliders').animate({left: -i*529},500,function(){ setTimeout("autoChangeTab()",4500); });
    hpbeforeDate = new Date();  
  }
  
	setTimeout("autoChangeTab()",4500);
	
	$('._selTab').click(function(){
    runSlide=0;
		$('._selTab').removeClass('curent');
		i=$('._selTab').index($(this));		
		cTab=i;
		$(this).addClass('curent');
		$('#sliders').animate({left: -i*529});
	}); 
	 
});


