// JScript source code
/*$(document).ready(function(){



       initScroller();
       mainfadeinout();

     $("#div_Promotions").hide(); 
    $("#div_muc").hide(); 
    $("#div_Educational").hide(); 
    $("#div_Products").hide();
    $(".div_Promotions").show("slow"); 
 
     $(".link_Products").click(function () {
    $("#div_Promotions").hide("slow");
    $("#div_muc").hide("slow");
    $("#div_Educational").hide("slow");
      $(".div_Products").show("slow");     
    });    
    $(".link_Promotions").click(function () {
    
    $("#div_Products").hide("slow");
    $("#div_muc").hide("slow");
    $("#div_Educational").hide("slow");
      $(".div_Promotions").show("slow");      
    });   
     
    $(".link_muc").click(function () {
    
    $("#div_Products").hide("slow");
    $("#div_Promotions").hide("slow");
    $("#div_Educational").hide("slow");
      $(".div_muc").show("slow");      
    }); 
    $(".link_Educational").click(function () {
     
    $("#div_Products").hide("slow");
    $("#div_Promotions").hide("slow");
    $("#div_muc").hide("slow");
      $(".div_Educational").show("slow");      
    }); 
//       scrollmethod();

     
    


  });*/
  
  

var scrollerStep = 3;
var scrollerIntervalMs = 500;

function initScroller()
{

	$('.autoscroll').each( function() {

		$(this).mouseover(function() { doPause(this); });

		$(this).mouseout(function() { doPause(this); });

		$(this).css('overflow', 'auto');

	});

	setInterval("doScroll()", scrollerIntervalMs);	
}

function doScroll()
{
	$('.autoscroll').filter(':not(".paused")').each( function() {

		var x = this.scrollTop;

		// The height of the div, as defined by CSS
		var divHeight = parseInt($(this).css('height'));

		// The height of the div's contents
		var contentHeight = this.scrollHeight;

		// Increment the position we're scrolling to by 1px
		x += scrollerStep;

		// Start over if we've scrolled too far
		if(x > (contentHeight - divHeight)) x = 0;

		// Scroll!
		this.scrollTop = x;

	});
}

function doPause(el)
{

	$(el).toggleClass('paused');
}

/*$(document).ready(function() {
   initScroller();
});*/
function mainfadeinout()
{
$('.testimonal_contents').hide();
  
   $('.testimonal_contents:eq(0)').fadeIn(500,function(){     
   $(this).fadeOut(10000,function(){   
   var divindex= $('.testimonal_contents:eq(0)').index(this) + 1;   
   fadeinout(divindex);  
   });
   });
}

function fadeinout(divindex)
  {  
  $('.testimonal_contents:eq('+divindex+')').fadeIn(10000,function(){  
  $('.testimonal_contents:eq('+divindex+')').fadeOut(10000,function(){
  
var last_count= $('.testimonal_contents').length;
  var sam= divindex + 1;
  if(sam >= last_count)
  {
  sam=0;
  }  
  fadeinout(sam);

  });
  });
  }
  
  
  /*function scrollmethod()
  {
  var ocontainer;	
  var ocontent;	
  var spaceToScroll;	
		
  ocontainer = $('div.news_container');			
  ocontent = $('div.news_content');						
  containerSize = jQuery.iUtil.getSize(ocontainer.get(0));			
  containerPosition = jQuery.iUtil.getPosition(ocontainer.get(0));			
  containerInner = jQuery.iUtil.getClient(ocontainer.get(0));						
  contentSize = jQuery.iUtil.getSize(ocontent.get(0));						
  $('div.slider').css('top', containerPosition.y + 'px').css('left', containerPosition.x + containerSize.wb + 'px').css('height', containerSize.hb + 'px');
  spaceToScroll = contentSize.hb - containerInner.h;						
  $('div.indicator').css('height', containerInner.h * containerSize.hb / contentSize.hb + 'px')						
  $('.slider').Slider(				
  {					
  accept : '.indicator',					
  onSlide : function( cordx, cordy, x , y)					
  {						
  ocontent							
  .css('top', - spaceToScroll * cordy / 100 + 'px');					
  }
  }
  );
  }

  }*/
  
  
  $(function()			
{				
// this initialises the demo scollpanes on the page.				
$('#pane1').jScrollPane();		});

