jQuery(document).ready(function($)
{
	$("#showEnter").click(function(){
		$("#form-enter").fadeIn("fast");
		$("#whereSearch").fadeOut("fast");
		return false;
	});
	$("#hide-form-enter").click(function(){
		$("#form-enter").fadeOut("fast");
		return false;
	});
	$("#openWhere").click(function(){
		$("#whereSearch").fadeIn("fast");
		$("#enterForm").fadeOut("fast");
		return false;
	});
	$("#whereSearch .flR a").click(function(){
		$("#whereSearch").fadeOut("fast");
		return false;
	});
	$("#whereSearch a.flL").click(function(){
		$("#whereSearch").fadeOut("fast");
		return false;
	});

	$(".tabs-nav a.tab").click(function()
	{
		var tabs_nav = $(this).parents(".tabs-nav");

		if (!tabs_nav.hasClass("tab-switch"))
		{
			return true;
		}
		var active_tab = tabs_nav.find(".tab-wrapper-active");
		var inactive_tab = tabs_nav.find(".tab-wrapper-inactive");

		active_tab.hide().removeClass("tab-wrapper-active").addClass("tab-wrapper-inactive");
		inactive_tab.show().removeClass("tab-wrapper-inactive").addClass("tab-wrapper-active");

		return false;
	})

	$('.rounded').corners();
//	$('a[tooltip]').each(function()
//	{
//		$(this).qtip({
//			content: $(this).attr('tooltip'), // Use the tooltip attribute of the element for the content
//			position: {
//				corner: {
//					tooltip: 'topRight'
//				}
//			},
//			style: {
//				tip:false,
//				color: '#000000',
//				name: 'cream',
//				border:
//				{
//					width:0
//				}
//
//			}
//		});
//
//	});
//	$('span[tooltip]').each(function()
//	{
//		$(this).qtip({
//			content: $(this).attr('tooltip'), // Use the tooltip attribute of the element for the content
//			position: {
//				corner: {
//					tooltip: 'topRight'
//				}
//			},
//			style: {
//				tip:false,
//				color: '#000000',
//				name: 'cream',
//				border:
//				{
//					width:0
//				}
//
//			}
//		});
//
//	});
	$('a.popupLink').click(function() {
		$.blockUI({
			message: $('#'+$(this).attr('id')+"Window"),
			css: {
				width:'950px',
				top:  ($(window).height() - $('#'+$(this).attr('id')+"Window").height()) /2 + 'px',
				left: ($(window).width() - 950) /2 + 'px',
				overflow: 'auto',
				cursor:'default'
			}
		});
		return false;
	});
	$('a.closePopup').click(function() {
		$.unblockUI();
	});

});
