
jQuery(document).ready(function() {

var url = window.location.href;


var qparts = url.split("?km");


if(qparts.length > 1){



 // Then find the querystring, everything after the ?
  var query = qparts[1];


var vars = query.split("=");

}

if ( typeof(hide_news_matt) != "undefined" ){
		if(hide_news_matt==true){		
		jQuery('#hide_newsletters').hide();
					}
			  }	
if ( typeof(hide_qp_matt) != "undefined" ){	
	if(hide_qp_matt==false){		
		jQuery('#hide_qp').hide();
					}	
				}
if ( typeof(hide_rep_matt) != "undefined" ){
	if(hide_rep_matt==true){		
		jQuery('#hide_reports').hide();
					}
				}


if ( typeof(hide_isa_matt) != "undefined" ){
	if(hide_isa_matt==true){
		jQuery('#hide_isa').hide();
					}
				}
if ( typeof(hide_specmat) != "undefined" ){	
	if(hide_specmat==true){
		jQuery('#hide_specmat').hide();
					}
				}
	
if ( typeof(vars) != "undefined" ){	
	
	if(vars[1] =="spec"){
		jQuery('#mat1').toggle("slow");
			}
	if(vars[1] =="qp"){
		jQuery('#mat2').toggle("slow");
			}
	if(vars[1] =="newsletter"){
		jQuery('#mat8').toggle("slow");
			}
	if(vars[1] =="candexemplar"){
		jQuery('#mat7').toggle("slow");
			}
	if(vars[1] =="trb"){
		jQuery('#mat6').toggle("slow");
			}
	if(vars[1] =="sw"){
		jQuery('#mat6').toggle("slow");
		jQuery('#gce_comms_programmestudy').toggle("slow");
			}
	if(vars[1] =="spms"){
		jQuery('#mat11').toggle("slow");
			}

	}


	jQuery('#spec').click(function () {
			jQuery('#mat2').slideUp();
			jQuery('#mat2_no_drop').slideUp();
			jQuery('#getyear').slideUp();
			jQuery('#mat3').slideUp();
			jQuery('#mat4').slideUp();
			jQuery('#mat5').slideUp();
			jQuery('#mat6').slideUp();			
			jQuery('#mat7').slideUp();			
			jQuery('#mat1').toggle("slow");
			jQuery('#mat8').slideUp();
			jQuery('#mat9').slideUp();
			jQuery('#mat2_3302').hide();
			jQuery('#mat3_3302').hide();
			jQuery('#mat4_4302').hide()
			jQuery('#mat7_4302').hide()
			jQuery('#mat3_4302').hide();	
			jQuery('#mat2_4302').hide();			
			jQuery('#mat10').slideUp();			
			jQuery('#mat11').slideUp();
			jQuery('#mat12').slideUp();
			jQuery('#mat13').slideUp();
			jQuery('#mat14').slideUp();
			jQuery('#mat15').slideUp();
			jQuery('#mat16').slideUp();
			jQuery('#mat17').slideUp();
			return false;
	});


	jQuery('#modified_papers').click(function () {
			jQuery('#mat1').slideUp();
			jQuery('#mat2').slideUp();
			jQuery('#mat2_no_drop').slideUp();
			jQuery('#getyear').slideUp();
			jQuery('#mat3').slideUp();
			jQuery('#mat4').slideUp();
			jQuery('#mat5').slideUp();
			jQuery('#mat6').slideUp();			
			jQuery('#mat7').slideUp();			
			jQuery('#mat16').toggle("slow");
			jQuery('#mat8').slideUp();
			jQuery('#mat9').slideUp();
			jQuery('#mat2_3302').hide();
			jQuery('#mat3_3302').hide();
			jQuery('#mat4_4302').hide()
			jQuery('#mat7_4302').hide()
			jQuery('#mat3_4302').hide();	
			jQuery('#mat2_4302').hide();			
			jQuery('#mat10').slideUp();			
			jQuery('#mat11').slideUp();
			jQuery('#mat12').slideUp();
			jQuery('#mat13').slideUp();
			jQuery('#mat14').slideUp();
			jQuery('#mat15').slideUp();
			jQuery('#mat17').slideUp();
			return false;
	});




	jQuery('#qp_and_mar').click(function () {
			jQuery('#mat1').slideUp();
			jQuery('#mat2_no_drop').slideUp();
			jQuery('#mat3').slideUp();
			jQuery('#mat4').slideUp();
			jQuery('#mat5').slideUp();
			jQuery('#mat6').slideUp();			
			jQuery('#mat7').slideUp();			
			jQuery('#mat2').toggle("slow");
			jQuery('#mat8').slideUp();
			jQuery('#mat9').slideUp();
			jQuery('#mat2_3302').hide();
			jQuery('#mat3_3302').hide();
			jQuery('#mat4_4302').hide()
			jQuery('#mat7_4302').hide()
			jQuery('#mat3_4302').hide();	
			jQuery('#mat2_4302').hide();
			jQuery('#mat10').slideUp();
			jQuery('#mat11').slideUp();
			jQuery('#mat12').slideUp();
			jQuery('#mat13').slideUp();
			jQuery('#mat14').slideUp();
			jQuery('#mat16').slideUp();
			jQuery('#mat15').slideUp();
			jQuery('#mat17').slideUp();
			return false;
	});
	


	jQuery('#rep_on_ex').click(function () {
			jQuery('#mat1').slideUp();
			jQuery('#mat2').slideUp();
			jQuery('#mat2_no_drop').slideUp();
			jQuery('#mat4').slideUp();
			jQuery('#mat5').slideUp();
			jQuery('#mat6').slideUp();			
			jQuery('#mat7').slideUp();			
			jQuery('#mat3').toggle("slow");
			jQuery('#mat8').slideUp();
			jQuery('#mat9').slideUp();
			jQuery('#mat2_3302').hide();
			jQuery('#mat3_3302').hide();
			jQuery('#mat4_4302').hide()
			jQuery('#mat7_4302').hide()
			jQuery('#mat3_4302').hide();	
			jQuery('#mat2_4302').hide();
			jQuery('#mat10').slideUp();
			jQuery('#mat11').slideUp();
			jQuery('#mat12').slideUp();
			jQuery('#mat13').slideUp();
			jQuery('#mat14').slideUp();
			jQuery('#mat15').slideUp();
			jQuery('#mat16').slideUp();
			jQuery('#mat17').slideUp();
			return false;
	});

	jQuery('#supp_mat').click(function () {
			jQuery('#mat1').slideUp();
			jQuery('#mat2').slideUp();
			jQuery('#mat2_no_drop').slideUp();
			jQuery('#mat3').slideUp();
			jQuery('#mat5').slideUp();
			jQuery('#mat6').slideUp();			
			jQuery('#mat7').slideUp();			
			jQuery('#mat9').slideUp();
			jQuery('#mat8').slideUp();
			jQuery('#mat4').toggle("slow");
			jQuery('#mat2_3302').hide();
			jQuery('#mat3_3302').hide();
			jQuery('#mat4_4302').hide()
			jQuery('#mat7_4302').hide()
			jQuery('#mat3_4302').hide();	
			jQuery('#mat2_4302').hide();
			jQuery('#mat10').slideUp();			
			jQuery('#mat11').slideUp();
			jQuery('#mat12').slideUp();
			jQuery('#mat13').slideUp();
			jQuery('#mat14').slideUp();
			jQuery('#mat15').slideUp();
			jQuery('#mat16').slideUp();
			jQuery('#mat17').slideUp();
			return false;
	});

	jQuery('#c_exemplar').click(function () {
			jQuery('#mat1').slideUp();
			jQuery('#mat2').slideUp();
			jQuery('#mat2_no_drop').slideUp();
			jQuery('#mat3').slideUp();
			jQuery('#mat4').slideUp();

			jQuery('#mat5').slideUp();
			jQuery('#mat6').slideUp();			
			jQuery('#mat7').toggle("slow");
			jQuery('#mat8').slideUp();
			jQuery('#mat9').slideUp();			
			jQuery('#mat10').slideUp();
			jQuery('#mat11').slideUp();
			jQuery('#mat12').slideUp();
			jQuery('#mat13').slideUp();
			jQuery('#mat14').slideUp();
			jQuery('#mat15').slideUp();
			jQuery('#mat16').slideUp();
			jQuery('#mat17').slideUp();
			return false;
	});



	jQuery('#res_bank').click(function () {
			jQuery('#mat1').slideUp();
			jQuery('#mat2').slideUp();
			jQuery('#mat2_no_drop').slideUp();
			jQuery('#mat3').slideUp();
			jQuery('#mat4').slideUp();
			jQuery('#mat5').slideUp();
			jQuery('#mat7').slideUp();			
			jQuery('#mat6').toggle("slow");
			jQuery('#mat8').slideUp();
			jQuery('#mat9').slideUp();
			jQuery('#mat10').slideUp();
			jQuery('#mat11').slideUp();
			jQuery('#mat12').slideUp();
			jQuery('#mat13').slideUp();
			jQuery('#mat14').slideUp();
			jQuery('#mat15').slideUp();
			jQuery('#mat16').slideUp();
			jQuery('#mat17').slideUp();
			return false;
	});
	
	jQuery('#newsletters').click(function () {
			jQuery('#mat1').slideUp();
			jQuery('#mat2').slideUp();
			jQuery('#mat2_no_drop').slideUp();
			jQuery('#mat3').slideUp();
			jQuery('#mat5').slideUp();
			jQuery('#mat6').slideUp();			
			jQuery('#mat7').slideUp();			
			jQuery('#mat9').slideUp();
			jQuery('#mat8').toggle("slow");
			jQuery('#mat4').slideUp();
			jQuery('#mat10').slideUp();
			jQuery('#mat11').slideUp();
			jQuery('#mat12').slideUp();
			jQuery('#mat13').slideUp();
			jQuery('#mat14').slideUp();
			jQuery('#mat15').slideUp();
			jQuery('#mat16').slideUp();
			jQuery('#mat17').slideUp();
			return false;
	});	




	jQuery('#isa_mat').click(function () {
			jQuery('#mat1').slideUp();
			jQuery('#mat2').slideUp();
			jQuery('#mat2_no_drop').slideUp();
			jQuery('#mat3').slideUp();
			jQuery('#mat4').slideUp();
			jQuery('#mat5').slideUp();
			jQuery('#mat6').slideUp();			
			jQuery('#mat7').slideUp();						
			jQuery('#mat8').slideUp();						
			jQuery('#mat9').toggle("slow");
			jQuery('#mat10').slideUp();
			jQuery('#mat11').slideUp();
			jQuery('#mat12').slideUp();
			jQuery('#mat13').slideUp();			
			jQuery('#mat14').slideUp();
			jQuery('#mat15').slideUp();
			jQuery('#mat16').slideUp();
			jQuery('#mat17').slideUp();
			return false;
	});

	jQuery('#standardisation').click(function () {
			jQuery('#mat1').slideUp();
			jQuery('#mat2').slideUp();
			jQuery('#mat2_no_drop').slideUp();
			jQuery('#mat3').slideUp();
			jQuery('#mat4').slideUp();
			jQuery('#mat5').slideUp();
			jQuery('#mat6').slideUp();			
			jQuery('#mat7').slideUp();						
			jQuery('#mat8').slideUp();						
			jQuery('#mat9').slideUp();
			jQuery('#mat10').toggle("slow");
			jQuery('#mat11').slideUp();
			jQuery('#mat12').slideUp();
			jQuery('#mat13').slideUp();
			jQuery('#mat14').slideUp();
			jQuery('#mat15').slideUp();
			jQuery('#mat16').slideUp();
			jQuery('#mat17').slideUp();
			return false;
	});
	
	jQuery('#spec_mat').click(function () {
			jQuery('#mat1').slideUp();
			jQuery('#mat2').slideUp();
			jQuery('#mat2_no_drop').slideUp();
			jQuery('#mat3').slideUp();
			jQuery('#mat4').slideUp();
			jQuery('#mat5').slideUp();
			jQuery('#mat6').slideUp();			
			jQuery('#mat7').slideUp();						
			jQuery('#mat8').slideUp();						
			jQuery('#mat9').slideUp();
			jQuery('#mat10').slideUp();
			jQuery('#mat11').toggle("slow");
			jQuery('#mat12').slideUp();
			jQuery('#mat13').slideUp();
			jQuery('#mat14').slideUp();
			jQuery('#mat15').slideUp();
			jQuery('#mat16').slideUp();
			jQuery('#mat17').slideUp();
			return false;
	});	
	
	
	
	jQuery('#student_guide').click(function () {
			jQuery('#mat1').slideUp();
			jQuery('#mat2').slideUp();
			jQuery('#mat2_no_drop').slideUp();
			jQuery('#mat3').slideUp();
			jQuery('#mat4').slideUp();
			jQuery('#mat5').slideUp();
			jQuery('#mat6').slideUp();			
			jQuery('#mat7').slideUp();						
			jQuery('#mat8').slideUp();						
			jQuery('#mat9').slideUp();
			jQuery('#mat10').slideUp();
			jQuery('#mat11').slideUp();
			jQuery('#mat12').toggle("slow");
			jQuery('#mat13').slideUp();			
			jQuery('#mat14').slideUp();
			jQuery('#mat15').slideUp();
			jQuery('#mat16').slideUp();
			jQuery('#mat17').slideUp();
			return false;
	});	
	
	jQuery('#practice_papers').click(function () {
			jQuery('#mat1').slideUp();
			jQuery('#mat2').slideUp();
			jQuery('#mat2_no_drop').slideUp();
			jQuery('#mat3').slideUp();
			jQuery('#mat4').slideUp();
			jQuery('#mat5').slideUp();
			jQuery('#mat6').slideUp();			
			jQuery('#mat7').slideUp();						
			jQuery('#mat8').slideUp();						
			jQuery('#mat9').slideUp();
			jQuery('#mat10').slideUp();
			jQuery('#mat11').slideUp();
			jQuery('#mat12').slideUp();
			jQuery('#mat13').toggle("slow");
			jQuery('#mat15').slideUp();
			jQuery('#mat14').slideUp();
			jQuery('#mat16').slideUp();
			jQuery('#mat17').slideUp();
			return false;
	});	
	
	jQuery('#listening_test').click(function () {
			jQuery('#mat1').slideUp();
			jQuery('#mat2').slideUp();
			jQuery('#mat2_no_drop').slideUp();
			jQuery('#mat3').slideUp();
			jQuery('#mat4').slideUp();
			jQuery('#mat5').slideUp();
			jQuery('#mat6').slideUp();			
			jQuery('#mat7').slideUp();						
			jQuery('#mat8').slideUp();						
			jQuery('#mat9').slideUp();
			jQuery('#mat10').slideUp();
			jQuery('#mat11').slideUp();
			jQuery('#mat12').slideUp();
			jQuery('#mat13').slideUp();
			jQuery('#mat14').toggle("slow");
			jQuery('#mat41').slideUp();			
			jQuery('#mat15').slideUp();
			jQuery('#mat42').slideUp();			
			jQuery('#mat16').slideUp();
			jQuery('#mat17').slideUp();
			return false;
	});
	
	jQuery('#asq').click(function () {
			jQuery('#mat1').slideUp();
			jQuery('#mat2').slideUp();
			jQuery('#mat2_no_drop').slideUp();
			jQuery('#mat3').slideUp();
			jQuery('#mat4').slideUp();
			jQuery('#mat5').slideUp();
			jQuery('#mat6').slideUp();			
			jQuery('#mat7').slideUp();						
			jQuery('#mat8').slideUp();						
			jQuery('#mat9').slideUp();
			jQuery('#mat10').slideUp();
			jQuery('#mat11').slideUp();
			jQuery('#mat12').slideUp();
			jQuery('#mat13').slideUp();
			jQuery('#mat14').slideUp();
			jQuery('#mat41').slideUp();			
			jQuery('#mat42').slideUp();			
			jQuery('#mat15').toggle("slow");
			jQuery('#mat16').slideUp();
			jQuery('#mat17').slideUp();
			return false;
	});	


	jQuery('#assessment_advisers').click(function () {
			jQuery('#mat1').slideUp();
			jQuery('#mat2').slideUp();
			jQuery('#mat2_no_drop').slideUp();
			jQuery('#mat3').slideUp();
			jQuery('#mat4').slideUp();
			jQuery('#mat5').slideUp();
			jQuery('#mat6').slideUp();			
			jQuery('#mat7').slideUp();						
			jQuery('#mat8').slideUp();						
			jQuery('#mat9').slideUp();
			jQuery('#mat10').slideUp();
			jQuery('#mat11').slideUp();
			jQuery('#mat12').slideUp();
			jQuery('#mat13').slideUp();
			jQuery('#mat14').slideUp();
			jQuery('#mat41').slideUp();			
			jQuery('#mat42').slideUp();			
			jQuery('#mat15').slideUp();
			jQuery('#mat16').slideUp();
			jQuery('#mat17').toggle("slow");

			return false;
	});	
		
	jQuery('#geo_exemplar_answers').click(function () {
			jQuery('#ul_geo_exemplar_answers').toggle("slow");
			jQuery('#ul_geo_teacher_support').slideUp();
			jQuery('#ul_teacher_standardising_meeting_materials').slideUp();
			return false;
	});	


	jQuery('#geo_teacher_support').click(function () {
			jQuery('#ul_geo_teacher_support').toggle("slow");
			jQuery('#ul_geo_exemplar_answers').slideUp();
			jQuery('#ul_teacher_standardising_meeting_materials').slideUp();
			return false;
	});	
	
	jQuery('#geo_teacher_standardising_meeting_materials').click(function () {
			jQuery('#ul_teacher_standardising_meeting_materials').toggle("slow");
			jQuery('#ul_geo_exemplar_answers').slideUp();
			jQuery('#ul_geo_teacher_support').slideUp();			
			return false;
	});

<!-- the following JQuery is used on the A level Communication and Culture page //-->	

	jQuery('#gce_comms_programmestudy_mat2').click(function () {
			jQuery('#gce_comms_programmestudy').toggle("slow");			
			jQuery('#gce_comms_addsamplequestions').slideUp();	
			jQuery('#gce_comms_cand_ex_wk_comm4').slideUp();
			jQuery('#gce_comms_teachersuppmeet').slideUp();			
			jQuery('#gce_comms_other_guidance').slideUp();
			jQuery('#gce_comms_cwkguidance_comm2').slideUp();
			jQuery('#trb6').slideUp();
			return false;
	});	
	
	jQuery('#gce_comms_addsamplequestions_mat2').click(function () {
			jQuery('#gce_comms_addsamplequestions').toggle("slow");			
			jQuery('#gce_comms_programmestudy').slideUp();
			jQuery('#gce_comms_cand_ex_wk_comm4').slideUp();
			jQuery('#gce_comms_teachersuppmeet').slideUp();	
			jQuery('#gce_comms_other_guidance').slideUp();
			jQuery('#gce_comms_cwkguidance_comm2').slideUp();
			jQuery('#trb6').slideUp();
			return false;
	});

	jQuery('#gce_comms_cwkguidance_comm2_mat2').click(function () {
			jQuery('#gce_comms_cwkguidance_comm2').toggle("slow");			
			jQuery('#gce_comms_programmestudy').slideUp();
			jQuery('#gce_comms_addsamplequestions').slideUp();	
			jQuery('#gce_comms_cand_ex_wk_comm4').slideUp();
			jQuery('#gce_comms_teachersuppmeet').slideUp();	
			jQuery('#gce_comms_other_guidance').slideUp();
			jQuery('#trb6').slideUp();
			return false;
	});
	
	jQuery('#gce_comms_cand_ex_wk_comm4_mat2').click(function () {
			jQuery('#gce_comms_cand_ex_wk_comm4').toggle("slow");			
			jQuery('#gce_comms_programmestudy').slideUp();
			jQuery('#gce_comms_addsamplequestions').slideUp();	
			jQuery('#gce_comms_teachersuppmeet').slideUp();	
			jQuery('#gce_comms_other_guidance').slideUp();
			jQuery('#gce_comms_cwkguidance_comm2').slideUp();
			jQuery('#trb6').slideUp();
			return false;
	});	

	jQuery('#gce_comms_teachersuppmeet_mat2').click(function () {
			jQuery('#gce_comms_teachersuppmeet').toggle("slow");			
			jQuery('#gce_comms_programmestudy').slideUp();
			jQuery('#gce_comms_addsamplequestions').slideUp();	
			jQuery('#gce_comms_cand_ex_wk_comm4').slideUp();
			jQuery('#gce_comms_other_guidance').slideUp();
			jQuery('#gce_comms_cwkguidance_comm2').slideUp();
			jQuery('#trb6').slideUp();
			return false;
	});	
	
	jQuery('#gce_comms_other_guidance_mat2').click(function () {
			jQuery('#gce_comms_other_guidance').toggle("slow");			
			jQuery('#gce_comms_programmestudy').slideUp();
			jQuery('#gce_comms_addsamplequestions').slideUp();	
			jQuery('#gce_comms_cand_ex_wk_comm4').slideUp();
			jQuery('#gce_comms_teachersuppmeet').slideUp();	
			jQuery('#gce_comms_cwkguidance_comm2').slideUp();
			jQuery('#trb6').slideUp();
			return false;
	});
	
	
	jQuery('#trb6_mat2').click(function () {
			jQuery('#trb6').toggle("slow");
			jQuery('#gce_comms_other_guidance').slideUp();			
			jQuery('#gce_comms_programmestudy').slideUp();
			jQuery('#gce_comms_addsamplequestions').slideUp();	
			jQuery('#gce_comms_cand_ex_wk_comm4').slideUp();
			jQuery('#gce_comms_teachersuppmeet').slideUp();	
			jQuery('#gce_comms_cwkguidance_comm2').slideUp();
			return false;
	});	
<!-- the above JQuery is used on the A level Communication and Culture page //-->	
	
<!-- the JQuery below is used on the A level English Language A page //-->		
	
	jQuery('#gce_englaa_addsamplequestions_mat2').click(function () {
			jQuery('#gce_englaa_addsamplequestions').toggle("slow");			
			jQuery('#gce_englaa_schemeofwork').slideUp();	
			return false;
	});
	
	jQuery('#gce_englaa_schemeofwork_mat2').click(function () {
			jQuery('#gce_englaa_schemeofwork').toggle("slow");			
			jQuery('#gce_englaa_addsamplequestions').slideUp();	
			return false;
	});	
<!-- the JQuery above is used on the A level English Language A page //-->


<!-- the JQuery below is used on the A level English Literature A page //-->		
	
	jQuery('#gce_eng_lit_a_cwk_mat2').click(function () {
			jQuery('#gce_eng_lit_a_cwk').toggle("slow");			
			jQuery('#gce_eng_lit_a_cwk_guid').slideUp();	
			jQuery('#gce_eng_lit_a_other').slideUp();
			return false;
	});
	
	jQuery('#gce_eng_lit_a_cwk_guid_mat2').click(function () {
			jQuery('#gce_eng_lit_a_cwk_guid').toggle("slow");			
			jQuery('#gce_eng_lit_a_cwk').slideUp();	
			jQuery('#gce_eng_lit_a_other').slideUp();
			return false;
	});	
	
	jQuery('#gce_eng_lit_a_other_mat2').click(function () {
			jQuery('#gce_eng_lit_a_other').toggle("slow");			
			jQuery('#gce_eng_lit_a_cwk').slideUp();	
			jQuery('#gce_eng_lit_a_cwk_guid').slideUp();
			return false;
	});	
<!-- the JQuery above is used on the A level English Literature A page //-->



<!-- the JQuery below is used on the GCE Legacy Materials tabs & the Projects page //-->		
	
	jQuery('#leg_qp_and_mar').click(function () {
			jQuery('#leg_mat1').toggle("slow");			
			jQuery('#leg_mat2').slideUp();	
			jQuery('#dd_mat3').slideUp();
			return false;
	});
	
	jQuery('#leg_rep_on_ex').click(function () {
			jQuery('#leg_mat2').toggle("slow");			
			jQuery('#leg_mat1').slideUp();	
			jQuery('#dd_mat3').slideUp();
			return false;

	});	
	
	jQuery('#dd3').click(function () {
			jQuery('#dd_mat3').toggle("slow");
			jQuery('#leg_mat2').slideUp();			
			jQuery('#leg_mat1').slideUp();	
			return false;
	});	
<!-- the JQuery above is used on the A level English Language A page //-->

<!-- the JQuery below is used with the legddchooseseries plugin eg GCSE law 3161 tab //-->	

jQuery('#leg_dd_qp_and_mar').click(function () {
			jQuery('#leg_dd_mat1').toggle("slow");			
			jQuery('#leg_dd_mat2').slideUp();
			return false;
	});


jQuery('#leg_rep_on_ex').click(function () {
			jQuery('#leg_dd_mat2').toggle("slow");			
			jQuery('#leg_dd_mat1').slideUp();
			return false;
	});


<!-- the JQuery above is used with the legddchooseseries plugin eg GCSE law 3161 tab //-->
<!-- the JQuery below is used on the GCE Geography page //-->		
	
	jQuery('#leg_qp_and_mar2').click(function () {
			jQuery('#leg_mat3').toggle("slow");			
			jQuery('#leg_mat4').slideUp();	
			return false;
	});
	
	jQuery('#leg_rep_on_ex2').click(function () {
			jQuery('#leg_mat4').toggle("slow");			
			jQuery('#leg_mat3').slideUp();	
			return false;

	});	
	
		
<!-- the JQuery above is used on the A level Geogrphy page //-->

	
	jQuery('#goButton').click(function() {	
		var series = document.getElementById('series').value;
		var s_code = document.getElementById('s_code').value;

		jQuery('#test').remove;
		jQuery.get("/return_qp.php?series=" + series + "&code="+s_code, function(data){
		 jQuery('#test').remove();
		 jQuery('#mat2').append ("<div id='test'><div>")
		 jQuery('#test').fadeIn();
		 jQuery('#test').append(jQuery(data));	
		 

		<!-- producing the open pdf icon in new window stuff //-->

		if (!document.getElementsByTagName) return false;
 
 		var div = document.getElementById("test");
 
		var links = div.getElementsByTagName("a");

 
		for (var eleLink=0; eleLink < links.length; eleLink ++) {


 		if ((links[eleLink].href.indexOf('.PDF') !== -1)|| (links[eleLink].href.indexOf('.pdf') !== -1)) {
	
		
 		links[eleLink].onclick =
 
			function() {
 
 				
				window.open(this.href,"mywindow","status=1,toolbar=1,resizable=1"); 
 
				return false;
 
				}
 
			var img = document.createElement("img");
 
			img.setAttribute("src", "/fileadmin/templates/img/new-win-icon.gif");
 
			img.setAttribute("alt", "opens in a new window");
			img.setAttribute("title", "opens in a new window");			
			
 
			img.setAttribute("height", "10");

			img.setAttribute("width", "20");
			
			links[eleLink].appendChild(img);
 
			}
 
		}

		});


	



	});
	

<!-- the JQuery used for the go button within the Modified Papers drop down //-->
	
	jQuery('#goButton2').click(function() {	

		var series = document.getElementById('series2').value;
		var s_code = document.getElementById('s_code').value;
 
		jQuery('#test3').remove;
		jQuery.get("/return_modified_qp.php?series=" + series + "&code="+s_code, function(data){
		 jQuery('#test').remove();
		 jQuery('#mat16').append ("<div id='test3'><div>")
		 jQuery('#test3').fadeIn();
		 jQuery('#test3').append(jQuery(data));	
		<!-- producing the open pdf icon in new window stuff //-->

		if (!document.getElementsByTagName) return false;
 
 		var div = document.getElementById("test3");
 
		var links = div.getElementsByTagName("a");

 
		for (var eleLink=0; eleLink < links.length; eleLink ++) {


 		if ((links[eleLink].href.indexOf('.PDF') !== -1)|| (links[eleLink].href.indexOf('.pdf') !== -1)) {
	
		
 		links[eleLink].onclick =
 
			function() {
 
 				
				window.open(this.href,"mywindow","status=1,toolbar=1,resizable=1"); 
 
				return false;
 
				}
 
			var img = document.createElement("img");
 
			img.setAttribute("src", "/fileadmin/templates/img/new-win-icon.gif");
 
			img.setAttribute("alt", "opens in a new window");
			img.setAttribute("title", "opens in a new window");			
			
 
			img.setAttribute("height", "10");

			img.setAttribute("width", "20");
			
			links[eleLink].appendChild(img);
 
			}
 
		}

	});


})

	

<!-- the JQuery below is used with the legddchooseseries plugin eg GCSE law 3161 tab //-->

	jQuery('#goButtonLegacy').click(function() {
		

		var series = document.getElementById('legacy_series').value;

		var s_code = document.getElementById('legacy_s_code').value;

		jQuery('#test_legacy').remove;
		jQuery.get("/return_qp_legacy.php?series=" + series + "&code="+s_code, function(data){
		 jQuery('#test_legacy').remove();
		 jQuery('#leg_dd_mat1').append ("<div id='test_legacy'><div>")
		 jQuery('#test_legacy').fadeIn();
		 jQuery('#test_legacy').append(jQuery(data))	

		});
	});	


});





