function moveTo(mainId, id) {			
	if(window.prevLeft == mainId) return;
	var leftIn = jQuery("#main_services").css("left");
	jQuery("#main_services").stop();
	leftIn = leftIn.replace(/px/, "");
	var leftIn = 0 - mainId;
	window.prevLeft = mainId;
        id = parseInt(id.substr(3));
        var margin = $('#q' + id).css('marginTop');
   jQuery("#main_services").animate({ 
		left: leftIn
	}, { duration: 500, complete: function() {
	  $('#q' + id).animate({'marginTop':  -50}, { duration: 500, easing: 'swing', complete: function() {
	     //$('.page[id!=q' + id + ']').animate({'marginTop': margin}, 500);
             window.prevDiv = $('#q' + id);
	  }})[0].origMargin = margin;
            if(window.prevDiv) {
              window.prevDiv.animate({'marginTop': window.prevDiv[0].origMargin}, 500, 'swing');
	    }
	}} );	
return;
};	  


$(document).ready(function(){

$(".services").click(function(){
	$(".services").css("color", "");
	$(".services").css("text-decoration", "underline");
	$(this).css("color", "#e16afc");
	$(this).css("text-decoration", "none");
});

    $(".q1").click(function(){
        $(".q1").css("color","");

		   if((this.id == 'zzz1')||(this.id == 'ppp1')) {
				$(".line_left").css("display", "none");
				$(".line_right").css("display", "none");
				$(".img1").css("display", "block");
				$(".l1").css("color", "");
				$(".q1").css("text-decoration", "underline");
				$("#zzz1").css("color", "#e16afc");
				$("#zzz1").css("text-decoration", "none");
				$("#q1 h1 a").css("color", "#e16afc");
         }
         else if ((this.id == 'zzz2')||(this.id == 'ppp2')){
				$(".line_left").css("display", "none");
				$(".line_right").css("display", "none");
				$(".img2").css("display", "block");			
				$(".l1").css("color", "");
				$(".q1").css("text-decoration", "underline");
				$("#zzz2").css("color", "#e16afc");
				$("#zzz2").css("text-decoration", "none");
				$("#q2 h1 a").css("color", "#e16afc");
          }
         else if ((this.id == 'zzz3')||(this.id == 'ppp3')){
				$(".line_left").css("display", "none");
				$(".line_right").css("display", "none");
				$(".img3").css("display", "block");			
				$(".l1").css("color", "");
				$(".q1").css("text-decoration", "underline");
				$("#zzz3").css("color", "#e16afc");
				$("#zzz3").css("text-decoration", "none");				
				$("#q3 h1 a").css("color", "#e16afc");
          }
         else if ((this.id == 'zzz4')||(this.id == 'ppp4')){
				$(".line_left").css("display", "none");
				$(".line_right").css("display", "none");
				$(".img4").css("display", "block");			
				$(".l1").css("color", "");
				$(".q1").css("text-decoration", "underline");
				$("#zzz4").css("color", "#e16afc");
				$("#zzz4").css("text-decoration", "none");				
				$("#q4 h1 a").css("color", "#e16afc");
          }
         else if ((this.id == 'zzz5')||(this.id == 'ppp5')){
				$(".line_left").css("display", "none");
				$(".line_right").css("display", "none");
				$(".img5").css("display", "block");			
				$(".l1").css("color", "");
				$(".q1").css("text-decoration", "underline");
				$("#zzz5").css("color", "#e16afc");
				$("#zzz5").css("text-decoration", "none");				
				$("#q5 h1 a").css("color", "#e16afc");
          }
         else if ((this.id == 'zzz6')||(this.id == 'ppp6')){
				$(".line_left").css("display", "none");
				$(".line_right").css("display", "none");
				$(".img6").css("display", "block");			
				$(".l1").css("color", "");
				$(".q1").css("text-decoration", "underline");
				$("#zzz6").css("color", "#e16afc");
				$("#zzz6").css("text-decoration", "none");				
				$("#q6 h1 a").css("color", "#e16afc");
          }
         else if ((this.id == 'zzz7')||(this.id == 'ppp7')){
				$(".line_left").css("display", "none");
				$(".line_right").css("display", "none");
				$(".img7").css("display", "block");			
				$(".l1").css("color", "");
				$(".q1").css("text-decoration", "underline");
				$("#zzz7").css("color", "#e16afc");
				$("#zzz7").css("text-decoration", "none");				
				$("#q7 h1 a").css("color", "#e16afc");
          }
         else if ((this.id == 'zzz8')||(this.id == 'ppp8')){
				$(".line_left").css("display", "none");
				$(".line_right").css("display", "none");
				$(".img8").css("display", "block");			
				$(".l1").css("color", "");
				$(".q1").css("text-decoration", "underline");
				$("#zzz8").css("color", "#e16afc");
				$("#zzz8").css("text-decoration", "none");				
				$("#q8 h1 a").css("color", "#e16afc");
          }
         else if ((this.id == 'zzz9')||(this.id == 'ppp9')){
				$(".line_left").css("display", "none");
				$(".line_right").css("display", "none");
				$(".img9").css("display", "block");			
				$(".l1").css("color", "");
				$(".q1").css("text-decoration", "underline");
				$("#zzz9").css("color", "#e16afc");
				$("#zzz9").css("text-decoration", "none");				
				$("#q9 h1 a").css("color", "#e16afc");
          }
         else if ((this.id == 'zzz10')||(this.id == 'ppp10')){
				$(".line_left").css("display", "none");
				$(".line_right").css("display", "none");
				$(".img10").css("display", "block");			
				$(".l1").css("color", "");
				$(".q1").css("text-decoration", "underline");
				$("#zzz10").css("color", "#e16afc");
				$("#zzz10").css("text-decoration", "none");				
				$("#q10 h1 a").css("color", "#e16afc");
          }
         else if ((this.id == 'zzz11')||(this.id == 'ppp11')){
				$(".line_left").css("display", "none");
				$(".line_right").css("display", "none");
				$(".img11").css("display", "block");			
				$(".l1").css("color", "");
				$(".q1").css("text-decoration", "underline");
				$("#zzz11").css("color", "#e16afc");
				$("#zzz11").css("text-decoration", "none");				
				$("#q11 h1 a").css("color", "#e16afc");
          }
         else if ((this.id == 'zzz12')||(this.id == 'ppp12')){
				$(".line_left").css("display", "none");
				$(".line_right").css("display", "none");
				$(".img12").css("display", "block");			
				$(".l1").css("color", "");
				$(".q1").css("text-decoration", "underline");
				$("#zzz12").css("color", "#e16afc");
				$("#zzz12").css("text-decoration", "none");				
				$("#q12 h1 a").css("color", "#e16afc");
          }
         else if ((this.id == 'zzz13')||(this.id == 'ppp13')){
				$(".line_left").css("display", "none");
				$(".line_right").css("display", "none");
				$(".img13").css("display", "block");			
				$(".l1").css("color", "");
				$(".q1").css("text-decoration", "underline");
				$("#zzz13").css("color", "#e16afc");
				$("#zzz13").css("text-decoration", "none");				
				$("#q13 h1 a").css("color", "#e16afc");
          }
         else if ((this.id == 'zzz14')||(this.id == 'ppp14')){
				$(".line_left").css("display", "none");
				$(".line_right").css("display", "none");
				$(".img14").css("display", "block");			
				$(".l1").css("color", "");
				$(".q1").css("text-decoration", "underline");
				$("#zzz14").css("color", "#e16afc");
				$("#zzz14").css("text-decoration", "none");				
				$("#q14 h1 a").css("color", "#e16afc");
          }
         else if ((this.id == 'zzz15')||(this.id == 'ppp15')){
				$(".line_left").css("display", "none");
				$(".line_right").css("display", "none");
				$(".img15").css("display", "block");			
				$(".l1").css("color", "");
				$(".q1").css("text-decoration", "underline");
				$("#zzz15").css("color", "#e16afc");
				$("#zzz15").css("text-decoration", "none");				
				$("#q15 h1 a").css("color", "#e16afc");
          }
         else if ((this.id == 'zzz16')||(this.id == 'ppp16')){
				$(".line_left").css("display", "none");
				$(".line_right").css("display", "none");
				$(".img16").css("display", "block");			
				$(".l1").css("color", "");
				$(".q1").css("text-decoration", "underline");
				$("#zzz16").css("color", "#e16afc");
				$("#zzz16").css("text-decoration", "none");				
				$("#q16 h1 a").css("color", "#e16afc");
          }			 		
			$(".l1").css("text-decoration", "none");
    });
});