﻿// Variables


$(document).ready(function() {
	$("#SignUpLink").bind('click',function(){
	  SPGuyAweberSignUpForm();  
	});


	if(SPEditMode){
		// if there is a field on the page the we can use the editor, let's do it!
	} // SPEditMode 
	
});



function SPGuyAweberSignUpForm(){
    var options = SP.UI.$create_DialogOptions();
    options.width = 300;
    options.height = 650;
    options.url = "/Pages/aWeberSignUpForm861998399.aspx";
    SP.UI.ModalDialog.showModalDialog(options);
}




//returns items to array
function generateItem(itemData, viewFields){
	var result = {};
	$.each(viewFields, function(idx, field){
		var value = $(itemData).find(field).text();
		if(value == undefined) value = null;
		if(field.indexOf(":") != -1){
			field = field.replace(/:.*/g,"");
		}
		result[field] = value;
	});
	return result;
}


