$(document).ready(function()
{
	$(document).pngFix();
});

// SPECIFIC JS FUNCTIONS



// GLOBAL JS FUNCTIONS

function autoFill(id, text, startColor, endColor)
{
	$(id).unbind().css({ color: startColor }).attr({ value: text }).focus(function()
	{
		if($(this).val()==text)
		{
			$(this).val("").css({ color: endColor });
		}
	}).blur(function()
	{
		if($(this).val()=="")
		{
			$(this).css({ color: startColor }).val(text);
		}
	});		
}

function ajaxLightbox(the_url, the_data)
{
	$.ajax({
		type: 'POST',
		url: the_url,
		data: the_data,
		success: function(data)
		{
			openLightbox(data);
		}
	});
	return false;
}

function openLightbox(content)
{
	$('#lightbox').overlay(
	{
	   	expose:
		{
			color: '#000', 
	       	loadSpeed: 200, 
	       	opacity: 0.7 
	   	},
	   	api: true
	}).load();
	$('#lightbox-content').html(content);
	$('#lightbox .close').addClass('pngfix').html('Close');
	return false;
}

function closeLightbox()
{
	$('#lightbox').close();
}
