$jq = jQuery.noConflict();

$jq(document).ready(function()
	{
		$jq('div#slideshow div').cycle();
		
		// Auto-populate form fields with their titles
		$jq('input.populate').each(function(){
			var e = $jq(this);
			if (!e.val()) { e.val(e.attr('title')); }
			e.focus(function(){
				var e = $jq(this);
				if (e.attr('title') == e.val()) { e.val(''); }
			});
					
			e.blur(function(){
				var e = $jq(this);
				if (!e.val()) { e.val(e.attr('title')); }
			});
		});
		
		function popUp(URL,width,height) {
			day = new Date();
			id = day.getTime();
			eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width="+width+",height="+height+"');");
		}
		
		// Jump menus
		$jq('form.jump input:submit').hide();
		$jq('form.jump select').change(function()
		{
			if($jq(this).val() != '')
			{
				if( $jq(this).parents('form').attr('target') == '_blank' )
				{
					window.open($jq(this).val(), 'window_' + Math.floor(Math.random()*101));
				}
				else
				{
					window.location = $jq(this).val();
				}
			}
		});		

	}
);
