/* Author: 

*/
var desctiptions=new Array();
desctiptions[0]="Very unsatisfied";
desctiptions[1]="Unsatisfied";
desctiptions[2]="Neither satisfied nor unsatisfied";
desctiptions[3]="Satisfied";
desctiptions[4]="Very satisfied";
var s=new Array();
var s;

$(document).ready(function() {
	$('.rating .s1').click(function(){
		s=desctiptions[0];
		$(this).parent().parent().find('span.description').html(s).css('color','#006EF3');
		var qa='q'+$(this).parent().parent().find('label').attr('for');
		$('input.'+qa).val('Very Unsatisfied');
	});
	$('.rating .s2').click(function(){
		s=desctiptions[1];
		$(this).parent().parent().find('span.description').html(s).css('color','#006EF3');
		var qa='q'+$(this).parent().parent().find('label').attr('for');
                $('input.'+qa).val('Unsatisfied');
	});
	$('.rating .s3').click(function(){
		s=desctiptions[2];
		$(this).parent().parent().find('span.description').html(s).css('color','#006EF3');
		var qa='q'+$(this).parent().parent().find('label').attr('for');
                $('input.'+qa).val('Neither unsatisfied nor satisfied');
	});
	$('.rating .s4').click(function(){
		s=desctiptions[3];
		$(this).parent().parent().find('span.description').html(s).css('color','#006EF3');
		var qa='q'+$(this).parent().parent().find('label').attr('for');
                $('input.'+qa).val('Satisfied');
	});
	$('.rating .s5').click(function(){
		s=desctiptions[4];
		$(this).parent().parent().find('span.description').html(s).css('color','#006EF3');
		var qa='q'+$(this).parent().parent().find('label').attr('for');
                $('input.'+qa).val('Very satisfied');
	});
	
	$('.rating .s1').hover(function(){
		s=$(this).parent().parent().find('span.description').html();
		$(this).parent().parent().find('span.description').html(desctiptions[0]).css('color','#4D4D4D');
	},
	function()
	{
		$(this).parent().parent().find('span.description').html(s).css('color','#006EF3');
		s='';
	});
	
	$('.rating .s2').hover(function(){
		s=$(this).parent().parent().find('span.description').html();
		$(this).parent().parent().find('span.description').html(desctiptions[1]).css('color','#4D4D4D');
		
	},
	function()
	{
		$(this).parent().parent().find('span.description').html(s).css('color','#006EF3');
		s='';
	});
	
	$('.rating .s3').hover(function(){
		s=$(this).parent().parent().find('span.description').html();
		$(this).parent().parent().find('span.description').html(desctiptions[2]).css('color','#4D4D4D');
	},
	function()
	{
		$(this).parent().parent().find('span.description').html(s).css('color','#006EF3');
		s='';
	});
	
	$('.rating .s4').hover(function(){
		s=$(this).parent().parent().find('span.description').html();
		$(this).parent().parent().find('span.description').html(desctiptions[3]).css('color','#4D4D4D');
	},
	function()
	{
		$(this).parent().parent().find('span.description').html(s).css('color','#006EF3');
		s='';
	});
	$('.rating .s5').hover(function(){
		s=$(this).parent().parent().find('span.description').html();
		$(this).parent().parent().find('span.description').html(desctiptions[4]).css('color','#4D4D4D');
	},
	function()
	{
		$(this).parent().parent().find('span.description').html(s).css('color','#006EF3');
		s='';
	});
	
	
	$('.achievements .slide').slideUp(1);
	$('.achievements h4').each(function()
	{
		$(this).click(function(){
			var id=$(this).parent().attr('id');
			$('.achievements .slide').each(function()
			{
				var thisid=$(this).parent().attr('id');
				if (id==thisid)
				{
					$(this).slideDown('fast');
					$(this).parent().find('h4').css('border-bottom','none').css('color','#545B62');
				}
				else 
				{
					$(this).slideUp('fast');
					$(this).parent().find('h4').css('border-bottom','5px solid #006EF3').css('color','#006EF3');
				}
			});
		});
	});
});	


















