// JavaScript Document

var quiz= new Array();
quiz[0]= Array('a',39,22,'correct');
quiz[1]= Array('b',199,21,'wrong');
quiz[2]= Array('c',40,248,'correct');
quiz[3]= Array('d',185,248,'wrong');


var quiz2= new Array();
quiz2[0]= Array('a',74,340,'wrong');
quiz2[1]= Array('b',179,265,'wrong');
quiz2[2]= Array('c',54,189,'correct');

var quiz3= new Array();
quiz3[0]= Array('a',85,50,'wrong');
quiz3[1]= Array('b',165,50,'correct');
quiz3[2]= Array('c',234,50,'wrong');
quiz3[3]= Array('d',104,180,'wrong');


var answer="<p>The Peace Symbol was designed by Gerald Holtom, a British designer, in 1958 for the Nuclear Disarmament. Holtom combined the semaphore signals for the letters N and D (Nuclear Disarmament) and explained his personal connections to the symbol.</p><p><em>&quot;I was in despair. Deep despair. I drew myself: the representative of an individual in despair, with my hands palm outstretched outwards and downwards in the manner of Goya's peasant before the firing squad. I formalized the drawing into a line and put a circle around it.&quot;</p>";

var answer2="<p>Wiliam Playfair, is considered to be the inventor of the pie chart, the bar chart, the circle graph and also the line graph. The pie chart made it\'s debut in Playfair publication Statistical Breviary in 1801, where he used it to protest the excessive taxation system in Britain.</p>";

var answer3="<p><b>Harry Beck</b> was an unemployed electrical draftsman in 1931, when he approached the Publicity Department of the Underground Group, where he had previously worked, with the concept for a map of the London Underground.</p><p>His unsolicited submission was a radical departure from the geographically accurate maps of the day. His map which resembled an electrical circuit diagram, simplified the sequence of stations and interchanges in a sprawling network to horizontal, vertical and diagonal lines.</p><p>His project was rejected as being &quot;too revolutionary&quot;.</p><p>A year later, after he was hired back by the Underground Group, he resubmitted his project which was accepted and eventually published in 1933.</p>";

	$(window).load( function() { 
if(whquiz){

 ///quiz1
	if(whquiz=='quiz'){

 		for (i=0; i<quiz.length;i++){   
   			$('<div id="letters"><a href="#" class="'+quiz[i][0]+'" id="'+i+'">-</a></div>').css("marginTop", quiz[i][1]).css("marginLeft", quiz[i][2]).prependTo("#quiz-box");  
 			}

	
      $('#letters a').click(function() {        
    	for (i=0; i<quiz.length;i++){
       $('#'+i).removeClass(quiz[i][0]).addClass(quiz[i][3]); 
 		} 
       $('#answer').html(answer);    
       });





	}//end quiz1



///quiz2
	if(whquiz=='quiz2'){

 		for (i=0; i<quiz2.length;i++){   
   			$('<div id="letters"><a href="#" class="'+quiz2[i][0]+'" id="'+i+'">-</a></div>').css("marginTop", quiz2[i][1]).css("marginLeft", quiz2[i][2]).prependTo("#quiz-box");  
 			}

	
      $('#letters a').click(function() {        
    	for (i=0; i<quiz2.length;i++){
       $('#'+i).removeClass(quiz2[i][0]).addClass(quiz2[i][3]); 
 		} 
       $('#answer').html(answer2);    
       });





	}//end quiz2


///quiz3
	if(whquiz=='quiz3'){

 		for (i=0; i<quiz3.length;i++){   
   			$('<div id="letters"><a href="#" class="'+quiz3[i][0]+'" id="'+i+'">-</a></div>').css("marginTop", quiz3[i][1]).css("marginLeft", quiz3[i][2]).prependTo("#quiz-box");  
 			}

	
      $('#letters a').click(function() {        
    	for (i=0; i<quiz3.length;i++){
       $('#'+i).removeClass(quiz3[i][0]).addClass(quiz3[i][3]); 
 		} 
       $('#answer').html(answer3);    
       });





	}//end quiz2


}

});
