/*
$(document).ready(function() {
	$('a.lightbox').lightBox();
});
*/



/* center div based on width of child element img
*/
$(window).load(function() {
	$("div.center img:first-child").each(function() {
		$(this).parent().css({
			width: $(this).width(), 
			height: $(this).height()
		});
	});
});

/*
$(window).load(function() {
	var maxheight = 0;
	$("div.pics img").each(function() {
		var height = $(this).height();
		if (height > maxheight) maxheight = height;
	});
	$("div.pics img").each(function() {
		var height = $(this).height();
		if (height <= maxheight) {
			var adj = (maxheight - height) / 2;
			$(this).css({
				marginTop: adj,
				height: height
			});
		}
	});
});
*/

/* Link types
*/
/* 
$(document).ready(function() {

	var fileTypes = {
		doc: 'doc',
		xls: 'xls',
		pdf: 'pdf',
		ppt: 'ppt'
	};
	
	$('a').each(function() {
	
		var $a = $(this);
		var href = $a.attr('href');
		
		if ((href.match(/^http/)) && (! href.match(document.domain))) {
		
			// make sure link doesn't contain an image
			if (!$a.find(">:first-child").is("img")) {
				// use a special image for external links
				var class_name = 'www';
			}
		
		} else {
			// get the extension from the href
			var hrefArray = href.split('.');
			var extension = hrefArray[hrefArray.length - 1];
			var class_name = fileTypes[extension];
		}
		
		if (class_name) { 
			$a.addClass("download "+ class_name);
		}
	
	});

});
 */


