
$(document).ready(function(){
						   
//function for Books
$("a#books").click(function(){ 

$.ajax({
				url: '/local/library/modules/books_v2.html',
				cache: false,
				success: function(html){
					//empty other tabs
					$('div#tabs-1').empty();
					$('div#tabs-2').empty();
					$('div#tabs-3').empty();
					$('div#tabs-4').empty();
					$('div#tabs-5').empty();
					//load tab content
					$("div#tabs-1").append(html);
					//alert ('content loaded');
					//for Articles Only
					// hides on load
				}
				});//end ajx func

});//end Books func

//function for Articles
$("a#articles").click(function(){ 

$.ajax({
				url: '/local/library/modules/articles.html',
				cache: false,
				success: function(html){
					//empty other tabs
					//$('div#tabs-1').empty();
					$('div#tabs-1').empty();
					$('div#tabs-2').empty();
					$('div#tabs-3').empty();
					$('div#tabs-4').empty();
					$('div#tabs-5').empty();
					//load tab content
					$("div#tabs-2").append(html);
					//alert ('content loaded');
					//for Articles Only
					// hides on load
					$('#databases1').hide();
					$('#journals1').hide();
					$('a#toggle-articles1').click(function() {
						  $('#databases1').hide();
						  $('#journals1').hide();
						  $('#articles1').show(400, function(){
 					$('a#toggle-articles1').addClass("current");
					$('a#toggle-journals1').removeClass("current");
					$('a#toggle-databases1').removeClass("current");
						});
					  return false;
			
					});
					$('a#toggle-journals1').click(function() {
						  $('#databases1').hide();
						  $('#articles1').hide();
						  $('#journals1').show(400, function(){
 					$('a#toggle-articles1').removeClass("current");
					$('a#toggle-journals1').addClass("current");
					$('a#toggle-databases1').removeClass("current");
						});
					  return false;
			
					});
					$('a#toggle-databases1').click(function() {
					  $('#journals1').hide();
					  $('#articles1').hide();
					  $('#databases1').show(400, function(){
 					$('a#toggle-articles1').removeClass("current");
					$('a#toggle-journals1').removeClass("current");
					$('a#toggle-databases1').addClass("current");
						});
					  return false;
			
					});
				}
								
				});//end ajx func
});//end Articles func


//function for LibGuides
$("a#guides").click(function(){ 

$.ajax({
				url: '/local/library/modules/libguides.html',
				cache: false,
				success: function(html){
					//empty other tabs
					//$('div#tabs-1').empty();
					$('div#tabs-1').empty();
					$('div#tabs-2').empty();
					$('div#tabs-3').empty();
					$('div#tabs-4').empty();
					$('div#tabs-5').empty();
					//load tab content
					$("div#tabs-3").append(html);
					//alert ('content loaded');
					//for Articles Only
					// hides on load
				}
				});//end ajx func

});//end LibGuides func



//function for Courses
$("a#courses").click(function(){ 

$.ajax({
				url: '/local/library/modules/docutek.html',
				cache: false,
				success: function(html){
					//empty other tabs
					$('div#tabs-1').empty();
					$('div#tabs-2').empty();
					$('div#tabs-3').empty();
					$('div#tabs-4').empty();
					$('div#tabs-5').empty();
					//load tab content
					$("div#tabs-4").append(html);
					//alert ('content loaded');
					//for Articles Only
					// hides on load
				}
				});//end ajx func

});//end courses func


//function for Courses
$("a#google").click(function(){ 

$.ajax({
				url: '/local/library/modules/google.html',
				cache: false,
				success: function(html){
					//empty other tabs
					$('div#tabs-1').empty();
					$('div#tabs-2').empty();
					$('div#tabs-3').empty();
					$('div#tabs-4').empty();
					$('div#tabs-5').empty();
					//load tab content
					$("div#tabs-5").append(html);
					//alert ('content loaded');
					//for Articles Only
					// hides on load
				}
				});//end ajx func

});//end google func

});

