$(document).ready(function() {
//settings
	var opacity = 0.5, toOpacity = 0.9, duration = 150;
	//set opacity ASAP and events
	$('.opacity').css('opacity',opacity).hover(function() {
			$(this).fadeTo(duration,toOpacity);
		}, function() {
			$(this).fadeTo(duration,opacity);
		}
	);
});

function changeclass() { 
var t1 = document.getElementById("t1") 
var t2 = document.getElementById("t2") 
var t3 = document.getElementById("t3") 
var t4 = document.getElementById("t4") 
t1.className="current"
t2.className=""
t3.className=""
t4.className=""
}
function changeclass2() { 
var t1 = document.getElementById("t1") 
var t2 = document.getElementById("t2") 
var t3 = document.getElementById("t3") 
var t4 = document.getElementById("t4") 
t1.className=""
t2.className="current"
t3.className=""
t4.className=""
} 
function changeclass3() { 
var t1 = document.getElementById("t1") 
var t2 = document.getElementById("t2") 
var t3 = document.getElementById("t3") 
var t4 = document.getElementById("t4") 
t1.className=""
t2.className=""
t3.className="current"
t4.className=""
} 
function changeclass4() { 
var t1 = document.getElementById("t1") 
var t2 = document.getElementById("t2") 
var t3 = document.getElementById("t3") 
var t4 = document.getElementById("t4") 
t1.className=""
t2.className=""
t3.className=""
t4.className="current"
} 
$(document).ready(function(){
$('#overlayfull').hide();
$('#flowpanes').hide();
$('a.openmenu').click(function(){
$('#overlayfull').show('fast');
$('#flowpanes').show('fast');
});
$('#closemenu').click(function(){
$('#overlayfull').hide('fast');
$('#flowpanes').hide('fast');
})
});
/* PRELOAD IMAGES */
$(function () {
		$('div#galleryview img').hide();//hide all the images on the page
	});

	var i = 0;//initialize
	var int=0;//Internet Explorer Fix
	$(window).bind("load", function() {//The load event will only fire if the entire page or document is fully loaded
		var int = setInterval("doThis(i)",200);//500 is the fade in speed in milliseconds
	});

	function doThis() {
		var images = $('div#galleryview img').length;//count the number of images on the page
		if (i >= images) {// Loop the images
			clearInterval(int);//When it reaches the last image the loop ends
		}
		$('div#galleryview img:hidden').eq(0).fadeIn(500);//fades in the hidden images one by one
		i++;//add 1 to the count
}