try
{
	GLOBALS.isIE == true;
}
catch (exc)
{
	var GLOBALS = {
		isIE : false,
		isIE6: false,
		isIE7: false
	};
}

$(document).ready(
	function()
	{
		GLOBALS.webBasepath = '';

		// fix transparent png's for best pal IE6
		if(GLOBALS.isIE6)
		{
			$.ifixpng(GLOBALS.webBasepath+ '/resources/gfx/dot/alpha.gif');
			$('img.alpha').ifixpng();
		}

		// linklist onchange event
		$('.keyvisual select').change(function() {
			window.location.href = $(this).val();
		});

		$(".linklist form[@method='post'] select").change(function() {
			window.location.href = $(this).val();
		});

		$(".linklist form[@method='get'] select").change(function() {
			$(this).parents('form').get(0).submit();
		});

		$("#f_quicksearch_s").bind("focus", function() {
			if ($(this).attr('rel') == undefined || $(this).attr('rel') == '')
			{
				$(this).attr("rel", $(this).val());
				$(this).val('');
			}
			else if ($(this).attr('rel') != '')
			{
				$(this).select();
			}
		});

		$("#f_quicksearch_s").bind("blur", function() {
			if ($(this).val() == '')
			{
				$(this).val($(this).attr("rel"));
				$(this).attr('rel', '');
			}
		});

		// jquery selectboxes
		try
		{
			$('select').selectbox();
		}
		catch (e) {}

		// jquery lightboxes
		try
		{
			$('a[@rel*=lightbox]').lightBox();
		}
		catch (e) {}

		// external links
		$('a.ext').click(function() {
			try
			{
				if ($(this).attr('href') != '')
				{
					var ext = window.open($(this).attr('href'));
					ext.focus();
				}
			}
			catch (e) {}

			return false;
		});
	}
);