function init(pwd)
{
	//logo
	var flashvars = false;
	var params = { wmode: "transparent" };
	var attributes = {};
	swfobject.embedSWF(pwd + "include/logo.swf", "logo", "300", "95", "9.0.0","expressInstall.swf", flashvars, params, attributes);
	
	//slideshow
	var pics = '<a class="show"><img src="' + pwd + 'images/photos/1.jpg" width="570" height="245" /></a>';
	for (var i=2; i<=31; i++) {
		pics += '<a><img src="' + pwd + 'images/photos/' + i + '.jpg" width="570" height="245" /></a>';
	}
	pics += '<a><img src="' + pwd + 'images/photos/1.jpg" width="570" height="245" /></a>';
	$('#slideshow').html(pics);
	slideShow();
	
	//gallery
	$("a[rel='gallery']").colorbox();
	
	//menu
	$('.btn').hover(function(){
		$(this).addClass('hover');
	},function(){
		$(this).removeClass('hover');
	});
	$('#pictures').mouseover(function() {
		$('#sub_pictures').fadeIn();
	});
	$('#sub_pictures').mouseleave(function() {
		$('#sub_pictures').fadeOut();
	});
	reLocate();
	
	$(window).resize(function() {
		reLocate();
	});
}

function reLocate() {
	var slideshow_left = $('#photos').offset().left;
	var subpicleft = $('#pictures').offset().left;
	$('#slideshow a').css('left', slideshow_left+30);
	$('#sub_pictures').css('left', subpicleft);
}

function slideShow() {
	$('#slideshow a').css({opacity: 0.0});
	$('#slideshow a:first').css({opacity: 1.0});
	setInterval('gallery()', 5000);
}

function gallery() {
	var current = $('#slideshow a.show') ? $('#slideshow a.show') : $('#slideshow a:first');
	if (current.next().length) {
		var next = current.next() ;
		next.css({opacity: 0.0}).addClass('show').animate({opacity: 1.0}, 1000);
		current.animate({opacity: 0.0}, 1000).removeClass('show');
	}
}


var omitformtags=["input", "textarea", "select"];
function disableselect(e)
{
	for (i = 0; i < omitformtags.length; i++) {
		if (omitformtags[i] == (e.target.tagName.toLowerCase()))
			return;
	}
	return false
}

function reEnable()
{
	return true
}

document.write('<div style="position:absolute;visibility:visible;top:-3000px;left:-3000px;"><form name="_hiddenFrom"><input type="text" value="" name="_hiddenText"></form></div>');

if (typeof document.onselectstart == "undefined") {
	document.onmousedown = disableselect;document.onmouseup = reEnable;
} else {
	document.onmousedown = new Function("return false");
	document.onmouseup = new Function("return false");
}
document.onselectstart = new Function("return false");
document.onselect = new Function("return false");
document.oncontextmenu = new Function("return false");
onload = document._hiddenFrom._hiddenText.focus();
