/**
 * 									J Q U E R Y
 ******************************************************************************/

// relinquish jQuery's control of the $ variable
jQuery.noConflict();

// add bookmark to browser
function bookmark(url,title) {
	if ((navigator.appName == 'Microsoft Internet Explorer') && (parseInt(navigator.appVersion) >= 4)) {
		window.external.AddFavorite(url,title);
	} else if (navigator.appName == 'Netscape') {
		window.sidebar.addPanel(title,url,'');
	} else {
		alert('Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark');
	}
}

jQuery(document).ready(function($) {
	
	// carousel with pagination
	// http://thomlx.free.fr/jquery/jquery_carousel.htm
	$('div.slider').carousel({
		autoSlide:			true,
		autoSlideInterval:	7000,
		loop:				true,
		pagination:		true,
		paginationPosition:	'outside'
	});
	
	// increase the size of click targets
	// http://newism.com.au/blog/post/58/bigtarget-js-increasing-the-size-of-clickable-targets/
	$(".bigTarget a").bigTarget();
	
	// equalizes the heights of multiple elements
	// http://tomdeater.com/jquery/equalize_columns/
	$(".box-02 .body").equalizeCols();
	
	// table adjustments (zebra)
	$("table.table_04 tbody > tr:even").addClass("even");
	$("table.table_04 tbody > tr:first").addClass("first");
	
	// page header height
	var pageHeaderSize = $("h1.page-header").height() + 28;
	
	// change the margin top size (see also in newsletter.js)
	$(".pt-01-01-01 #content").css("margin-top", pageHeaderSize + "px");
	$(".pt-01-02 #content").css("margin-top", pageHeaderSize + "px");
	$(".pt-01-02 #sidebar-right").css("margin-top", pageHeaderSize + "px");
	$(".pt-01-03 #content").css("margin-top", pageHeaderSize + "px");
	$(".pt-01-03 #sidebar-right").css("margin-top", pageHeaderSize + "px");
	
	// Tabs by http://blog.ginader.de/archives/2009/02/07/jQuery-Accessible-Tabs-How-to-make-tabs-REALLY-accessible.php
	$('.tabs').accessibleTabs({
		tabhead: 'h2',
		fx: 'show',
		fxspeed: null
	});
});
