/*
 * form-overlay.js
 *
 * Copyright 2015, Leon Da Costa - http://leondacosta.me/
 * Released under the MIT Licence
 * http://opensource.org/licenses/MIT
 *
 * Github: https://github.com/LeonDaCosta/form-overlay
 * Version: 0.1
 */

var FormOverlay = function FormOverlay(){
	
	var settings = {
  		tnId: null,
  		formContainer: null,
  		postUrl: null
	}
	
	FormOverlay.prototype.count = 4;
	
	console.log("Length: " + arguments.length);
	console.log("arguments 0: " + arguments[0]);
	
	var json = arguments[0];
	var btnId = json.btnId;
	var formDiv = json.formContainer;
	
	console.log("formContainer: " + formDiv);
	console.log("btnId: " + btnId);
	
	var btn = document.getElementById(btnId);
	var formc = document.getElementById(formDiv);
	
	
	window.onload = function() {
		document.body.innerHTML += '<div id="overlay" class="overlay-hide"></div>';
    	document.getElementById(btnId).onclick = function btnClick() {
			 addBackground();
    	}
    	
    	document.getElementById('overlay').onclick = function btnClick() {
			 removeBackground();
    	}
    	
    	function removeBackground(){
    		console.log("removed");
    		document.getElementById('overlay').className = "";
    	}
    	
    	function addBackground(){
    		document.getElementById('overlay').className = "";
    		console.log("added");
    		document.getElementById('overlay').className += 'overlay';
    	}
    	var formc = document.getElementById(formDiv);
    	//formc.innerHTML = "whatever";
    	formc.style.display = 'none'

	}
	
}
@@ -695,55 +695,8 @@
 d);%0A
-%09var formc = document.getElementById(formDiv);%0A
 %09%0A%09%0A
@@ -1332,24 +1332,69 @@
 ay';%0A    %09%7D%0A
+    %09%0A    %09function addForm()%7B%0A    %09%09%0A    %09%7D%0A
     %09var for

Update 0.1.8