﻿$(function(){
	$("img.rollover").mouseover(function(){
		$(this).attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_on$2"))
	}).mouseout(function(){
		$(this).attr("src",$(this).attr("src").replace(/^(.+)_on(\.[a-z]+)$/, "$1$2"));
	}).each(function(){
		$("<img>").attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_on$2"))
	})
})

$(document).ready(function(){
$('div.text').toggle(
	function(){
		$(this).parent('div').css({zIndex:'3'});
		$(this).animate({width:'18em',height:'18em',top:'-45px',left:'-45px'},'normal',
			function(){
				$(this).children('ul').fadeIn('slow');
				$(this).children('ul').children('li').fadeIn('slow');
			}
		);
	},
	function(){
		$(this).children('ul').fadeOut('fast');
		$(this).children('ul').children('li').fadeOut('fast');
		$(this).animate({width:'110',height:'110',top:'4px',left:'4px'},'normal',
			function(){
				$(this).parent('div').css({zIndex:'2'})
			}
		);
	}
);

$('.photo a').lightBox({
	overlayBgColor: '#FFF',
	overlayOpacity: 0.7,
	imageLoading: 'images/loading.gif',
	containerResizeSpeed: 400,
	txtImage: 'Image',
	txtOf: '/'
});
});