$(document).ready(function() {

$(".sub").hide();

$("#navigation a").not(".sub a").mouseover(function() {
		$(this).animate({
		marginLeft: "0",
		width: "108px"
		}, 80);
	});
	$("#navigation a").not(".sub a").mouseout(function() {
		$(this).animate({
		marginLeft: "8px",
		width: "100px"
		}, 200);
	});
	
	$("#side-bar-main ul a").click(function() {
		if ($(this).next(".sub").is(":hidden"))
			{
				$(".sub").slideUp(400);
				$(this).next(".sub").slideDown(400);
			}
		else
			{
				$(this).next(".sub").slideUp(400);
			}
	});
	
$('#athlete-gallery-images a').lightBox();
	
/* athletes js */

$(".hidden").hide();
$("#athletes-range li a").mouseover(function() {
	$(".hidden", this).stop(true, true).fadeIn(3500);
});
$("#athletes-range li a").mouseout(function() {
	$(".hidden", this).fadeOut(3500);
});


$(".setLive").click(function()
{
	$(this).submit();
});

//external link
$('a[rel="external"]').click( function()
{
	window.open( $(this).attr('href') );
	return false;
});

//quick tips for form fields
$('[rel="tip"]').stop(true, true).each(function()
{
	$(this).qtip(
	{
		//this line is causing the problem:
		content: $(this).attr('title'),
		show:
		{
			delay: 500,
			when:
			{
				event: 'mouseover'
			}
		},			
		hide: 'mouseout',
		position:
		{
			corner:
			{
				target: 'topLeft',
				tooltip: 'bottomRight'
			}
		},
		style:
		{
			border:
			{
				width: 5,
				radius: 10
			},
			padding: 10, 
			textAlign: 'center',
			tip: true, // Give it a speech bubble tip with automatic corner detection
			name: 'cream' // Style it according to the preset 'cream' style
        }
	});
});


});

function confirmDelete()
	{
		var agree=confirm("Are you sure you wish to delete this entry?");
		if (agree)
			return true;
		else
			return false;
	}
