function rating(){
	$('span.star').click(function(){
		if($('.rate-stars').index($(this).parent('.rate-stars'))==0)
		{
			var clicked=$('.rate-stars:eq(0)').children('.star').index(this);
			$('.rate-stars:eq(0)').children('.star').removeClass('active');	
			for(var i=0; i<=clicked;i++)
			{
				$('.rate-stars:eq(0)').children('.star:eq('+i+')').addClass('active');	
			}
			$('input.service').val(clicked+1);
		}else
		{
			var clicked=$('.rate-stars:eq(1)').children('.star').index(this);
			$('.rate-stars:eq(1)').children('.star').removeClass('active');	
			for(var i=0; i<=clicked;i++)
			{
				$('.rate-stars:eq(1)').children('.star:eq('+i+')').addClass('active');	
			}
			$('input.performance').val(clicked+1);
		}
	});	
}

function GetTestims(){
	var RAND = Math.random();
	$('#Testim').fadeOut();
	$('#Testim').load('/ajax.php?handler=GetRandomTestimonail', {force:RAND}).fadeIn(1000);  
}

function GetScript(){
	var RAND = Math.random();
	$('#javaScript').fadeOut();
	$('#javaScript').load('/ajax.php?handler=GetRandomContent', {force:RAND}).fadeIn(1200);  
}

function scrolling()
{
	$('img.scroll').click(function(){
		var no=$('div.logo').size();
		if($(this).hasClass('left'))
		{
			if(no > 3)
			{
				$('div.scroll-logo').animate({marginLeft:'-110px'},'slow');
				setTimeout('left()',900);	
			}
		}else
		{
			if(no > 3)
			{
				$('div.scroll-logo').animate({marginLeft:'110px'},'slow');
				setTimeout('right()',900);	
			}
		}
	});	
}


function left()
{
	var obj=$('div.scroll-logo').children('.logo:first');
	$('div.scroll-logo').children('.logo:first').remove();
	$('div.scroll-logo').append('<div class="logo">'+obj.html()+'</div>')
	$('div.scroll-logo').css('margin-left','0px');
}

function right()
{
	var obj=$('div.scroll-logo').children('.logo:last');
	$('div.scroll-logo').children('.logo:last').remove();
	$('div.scroll-logo').html('<div class="logo">'+obj.html()+'</div>'+$('div.scroll-logo').html())
	$('div.scroll-logo').css('margin-left','0px');
}

