// document onready handler -- before images load
$(function() {
	/**
	* IMAGE REPLACED LINKS
	* All image replcement headers that have <a> tags in them, apply the link to the whole image
	*/ 
	$(":header.image-replace:has(a)").click(function() {
		window.location = $("a", this).attr("href");
	}).mouseover(function() {
		$(this).css("cursor", "pointer");
	});
	
	/**
	* LIGHTBOX
	* Applies lightBox() to all <a> tags inside the entry content area that link to an image (jpg, gif, or png)
	*/
	$('#main .entry .content a[href$=.jpg], #main .entry .content a[href$=.gif], #main .entry .content a[href$=.png]').lightBox({
		imageLoading: 	'/wp-content/themes/reboot/images/lightbox-ico-loading.gif',
		imageBtnPrev: 	'/wp-content/themes/reboot/images/lightbox-btn-prev.gif',
		imageBtnNext: 	'/wp-content/themes/reboot/images/lightbox-btn-next.gif',
		imageBtnClose: 	'/wp-content/themes/reboot/images/lightbox-btn-close.gif'
	});
	
	/**
	* RECENT COMMENTS ODD/EVEN STRIPING
	*/
	$("#sidebar #recent-comments li:odd").addClass("odd");

});

// window onload handler - after entire page has loaded
$(window).load(function() {
	
	/**
	* EQUALIZE COLUMNS
	* Set the height of the sidebar to whatever the height of the main content area is, or vice versa. Whichever is longer.
	*/
	$("#main, #sidebar .border").equalizeCols();

});