$(document).ready(function()
{
	
	
	
	var originalSizes = new Array();
	$('#pane').jScrollHorizontalPane({scrollbarHeight:17, scrollbarMargin:0, resize:false});
	
	$("#subscribe").hide();
	$("#subscribe-now a").click(function(event)
	{
		$(this).blur();
		event.preventDefault();
		$("#subscribe").show("fast");
		$("#subscribe").draggable({ containment: 'window' });		
	});
	
	$("#close a").click(function(event)
	{
		event.preventDefault();
		$("#subscribe").hide("fast");
	});	
	
	
	$("a.subscribe-now").click(function(event)
	{
		$(this).blur();
		event.preventDefault();
		$("#subscribe").show("fast");
		$("#subscribe").draggable({ containment: 'window' });		
	});	
	
    var options = { 
        dataType:  'json',
        success:   showSubmitResponse
	}

	function showSubmitResponse(data)
	{
		if(data.submit == "true")
		{
			$("#response").html(data.message);
			$("#subscribe #wrapper").hide();				
		}
		else
		{
			$("#response").html(data.message);				
		}
	};
	
    $("#subscribe-form").ajaxForm(options);	

	$('#pane').pngFix( );
	$('#subscribe-now').pngFix( );

});
