$(document).ready(function(){

	$("a[rel^='prettyPhoto']").prettyPhoto({showTitle: false, theme:'facebook'});

	$(".rollover").mouseenter(function(){
		str = $(this).attr("src");
		str = str.replace('.png', '_highlight.png');
		$(this).attr("src",str);
	});

	$(".rollover").mouseleave(function(){
		str = $(this).attr("src");
		str = str.replace('_highlight.png', '.png');
		$(this).attr("src",str);
	});
	
	$.tabs = function(selector, start) {
		$(selector).each(function(i, element) {
			$($(element).attr('tab')).css('display', 'none');
			$(element).click(function() {
				$(selector).each(function(i, element) {
					$(element).removeClass('selected');
					$($(element).attr('tab')).css('display', 'none');
				});
				$(this).addClass('selected');
				$($(this).attr('tab')).css('display', 'block');
			});
		});
		if (!start) {
			start = $(selector + ':first').attr('tab');
		}
		$(selector + '[tab=\'' + start + '\']').trigger('click');
	};
	$.tabs('.tabs a'); 
});