$(document).ready(function(){

	// Form
	$("#search label").inFieldLabels();
	$("#search_form label").inFieldLabels();
	
	//slideshow
    $('#slideshow').cycle({
		fx: 'turnDown' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});
	
	//search box
	$('#search_btn').click(function(event)
	{
		if ($('#search_box').val() != '')
		{	
			window.location = "search.php?searchtext="+$('#search_box').val();
		}
		event.preventDefault();
	});
	$('#search_box').keypress(function(event) {
		if (event.keyCode == '13') {
			window.location = "search.php?searchtext="+$('#search_box').val();
		}
	});

 });
 
 function openWin(page) {
	PWidth = "500";
	PHeight = "403";
	amopenwin=window.open(page, "opennewwin", "toolbar=0, scrollbars=0, location=0, status=0, menubars=0, resizable=0, width="+PWidth+", height="+PHeight);
	amopenwin.window.moveTo((screen.width/2)-(PWidth/2),(screen.height/2)-(PHeight/2));
	}

function popHelp(page) {
	PWidth = "300";
	PHeight = "320";
	ampophelp=window.open(page, "pophelp", "toolbar=0, scrollbars=0, location=0, status=0, menubars=0, resizable=0, width="+PWidth+", height="+PHeight);
	ampophelp.window.moveTo((screen.width/2)-(PWidth/2),(screen.height/2)-(PHeight/2));
	}

function popWin(page, PWidth, PHeight) {
	ampopwin=window.open(page, "popwin", "toolbar=0, scrollbars=1, location=0, status=0, menubars=0, resizable=1, width="+PWidth+", height="+PHeight);
	}

function resizeWin(width, height) {
	window.resizeTo(width, height);
	// window.moveTo((screen.width/2)-(width/2),(screen.height/2)-(height/2));
}

