//add thickbox class to all elements with .gif or .jpg in the href
$(document).ready(function(){
			$("a[href$='.jpg']", this).addClass('thickbox');
			$("a[href$='.gif']", this).addClass('thickbox');
			tb_init('a.thickbox, area.thickbox, input.thickbox, a span.thickbox');


			$('#nav li ul li a').tooltip({ 
				track: true, 
				delay: 400, 
				showURL: false, 
				showBody: " - ", 
				fade: 250 
			});


});

// Pagination (Get rid of this when the new home page goes live
$(document).ready(function(){
	// Create pagination element
	this_height = $("#home-news-content-1").height();
	$("#Pagination1").pagination(this_height, {
		callback:function(page_id, jq){
			//alert (page_id);
			$("#home-news-content-1").animate({top: -(page_id*315)},"slow", function() {
				//$(this).css('top', '210px');
			});
			return false;
		},
		items_per_page:315,
		current_page:0,
		num_edge_entries:0,
		ellipse_text:"..."
	});
});

$(document).ready(function(){
	// Create pagination element
	this_height = $("#home-news-content-2").height();
	$("#Pagination2").pagination(this_height, {
		callback:function(page_id, jq){
			//alert (page_id);
			$("#home-news-content-2").animate({top: -(page_id*211)},"slow", function() {
				//$(this).css('top', '210px');
			});
			return false;
		},
		items_per_page:201,
		num_display_entries:4,
		current_page:0,
		num_edge_entries:0,
		ellipse_text:"..."
	});
});

$(document).ready(function(){
	// Create pagination element
	this_height = $("#home-news-content-3").height();
	$("#Pagination3").pagination(this_height, {
		callback:function(page_id, jq){
			//alert (page_id);
			$("#home-news-content-3").animate({top: -(page_id*211)},"slow", function() {
				//$(this).css('top', '210px');
			});
			return false;
		},
		num_display_entries: 20,
		current_page:0,
		num_edge_entries:0,
		ellipse_text:"..."
	});
});
	

// Left side Slide Menu	
$(document).ready(function(){
$("#slide-menu li a.header").click(function() {
	$('#slide-menu li a.header').css('color', '#b0aeae');
	$('#slide-menu li div').slideUp('normal');
	$(this).next().toggle('normal');
	$(this).css('color', '#222222');
	$(this).next().hide();
	return false;
});
$('#slide-menu li div').hide();
$('#def2').slideDown('normal');


// Right Side Slide Menu
$("#slide-menu2 li a.header").click(function() {
	$('#slide-menu2 li a.header').css('color', '#b0aeae');
	$('#slide-menu2 li ul').slideUp('normal');
	$(this).next().toggle('normal');
	$(this).css('color', '#222222');
	$(this).next().hide();
	return false;
});
// keep references open as default
$('#slide-menu2 li ul').hide();
$('#default').slideDown('normal');




// Text Size Adjust - Makes text larger or smaller
$('a.text-lg').click(function() {
	if ( $('p.large') ) {
		$('p.large').addClass('larger');
		$('p.large').removeClass('large');
	}
	if ( $("p.normal") ) {
		$('p.normal').addClass('large');
		$('p.normal').removeClass('normal');
	}
	if ( $('p.small') ) {
		$('p.small').addClass('normal');
		$('p.small').removeClass('small');
	}
	return false;
});

$('a.text-sm').click(function() {
	if ( $('p.normal') ) {
		$('p.normal').addClass('small');
		$('p.normal').removeClass('normal');
	}
	if ( $('p.large') ) {
		$('p.large').addClass('normal');
		$('p.large').removeClass('large');
	}
	if ( $("p.larger") ) {
		$('p.larger').addClass('large');
		$('p.larger').removeClass('larger');
	} 
	return false;
});

});