
//<![CDATA[    

function openwindow(url, name, title, width, height) {
	var params = 'scrollbars=yes,resizable=yes,dependent=yes';
	if (!width) width = 800;
	if (!height) height = 600;
	params = 'width='+width+',height='+height+','+params;
	var win = window.open(url, name, params);
	win.focus();
	return false;
}

function openimage(image, title, width, height) {
	var params = 'menubar=yes,scrollbars=no,resizable=yes,dependent=yes,locationbar=no,statusbar=no';
	if (!width) width = 300;
	if (!height) height = 200;
	params = 'width='+width+',height='+height+','+params;
	var win = window.open('image.html?image_='+image+'&amp;title_='+title, 'image', params);
	return false;
}

function openmedia(media, title, width, height, type) {
	var params = 'menubar=yes,scrollbars=no,resizable=yes,dependent=yes,locationbar=no,statusbar=no';
	if (!width) width = 300;
	if (!height) height = 200;
	params = 'width='+width+',height='+height+','+params;
	var win = window.open('media.html?media_='+media+'&amp;title_='+title+'&amp;width_='+width+'&amp;height_='+height+'&amp;type_='+type, 'media', params);
	win.focus();
	return false;
}

$(function() {
	var base = $('img#emis').attr('src').split('images/')[0]
	$('a.lightbox').lightBox({
		imageLoading  : base+'misc_/lightbox-loading.gif',
		imageBtnPrev  : base+'misc_/lightbox-prev.gif',
		imageBtnNext  : base+'misc_/lightbox-next.gif',
		imageBtnClose : base+'misc_/lightbox-close.gif',
		imageBlank    : base+'misc_/lightbox-blank.gif',
		txtImage      : 'Photo',
		txtOf         : 'of'
	});
});

$(function() {
	$('img.bookmark').hover(
		function () {
			$(this).attr('src', $(this).attr('src').replace(/-bw\./, "."));
		}, 
		function () {
			$(this).attr('src', $(this).attr('src').replace(/\./, "-bw."));
		}
	);
});

//]]>

