// This JS library handles adding articles to the CPD folder
// function to handle adding a specific article given the URL
// Add article to CPD folder
	
function addToCPDOrganiser(CPDUrl){
		$(document).ready(function(){
			$('.addCPD a, div#articleTools .cpd a').click(function() {
				// set variables for URL, title and ID based on harvester
				var articleURL = oHarvester.hostname + oHarvester.path;
				var articleTitle = oHarvester.contentMetrics.sTitle;
				var articleID = oHarvester.contentMetrics.nId;
				var sCPDUrl = CPDUrl;
				
				var f=sCPDUrl + articleURL + '&title=' + articleTitle + '&id=' + articleID + '&';
		
				var win = window.open(f+'jump=doclose','CPDFolder','location=yes,links=no,scrollbars=no,toolbar=no,width=850,height=655');
				
				win.focus(); // brings window into focus when you click on the Add to CPD link
				
				var a = function(){if(!win)
						location.href=f+'jump=yes';}
				
				if(/Firefox/.test(navigator.userAgent)){
					setTimeout(a,0)
				}else{
					a()
				}
			})
		
		});
	}

$(document).ready(function(){
	
	//print link
	$('#articleTools li.print a').click(function() {
		window.print();
	});
	
});
