$(function() {
	$('.dialog').hide();
	$('#reports').hide();
	$('#requestform').submit(function() {
		return false;
		});
	});
	
function viewShow(sel) {
	$('.showinfo').fadeOut();
	$(sel).fadeIn();
	$(sel).draggable();
	}	


function addRequest() {
	//alert($('#requestform').serialize());

	$.ajax({
		type:"POST",
		data: $('#requestform').serialize(),
		url: "/admin/requests/push_request.php",
		success: function(msg) {
			if(msg == "success") {
				$('#requestform').fadeOut();
				$('#reports').fadeIn('def',function() {
					initJScrollPane();
					});
				}
			else {
				$('#requestdialog .msg').html("<p>Please provide your name, zip code, song request and show you're attending.</p>");
				$('#requestdialog').fadeIn();
				}	
			}
		});

	}

$(function() {
	$("#human").attr("value","1");
	});	
	
//Edit the counter/limiter value as your wish
var count = "250";
function limiter(id) {
	var tex = document.getElementById(id).value;
	var len = tex.length;
	if(len > count){
    	tex = tex.substring(0,count);
        document.getElementById(id).value =tex;
        return false;
		}
	}