// JavaScript Document for http://plonk.in/

// formcheck validator

//window.addEvent('domready', function(){
//        new FormCheck ('poop');
//});

// Error slide in		   
//$(document.body).click(function () {
//	if ($("div").is(":hidden")) {
//        $("#invalid").fadeIn("slow");
//      } else {
//        $("#invalid").fadeIn("slow");
//      }
//    });

// jquery validator

$(document).ready(function(){
    $("#poop").validate({
   errorLabelContainer: "#invalid"
})
  });

// On focus clear

function clearText(el) {
	if (el.defaultValue==el.value) el.value = ""
}

// Copy Plonk URL

function copy() {
	copiedTxt = document.getElementById('boxfg').getElementsByTagName('a');
	copiedTxt = execCommand('Copy');
}

function ClipBoard() 
{
holdtext.innerText = url.innerText;
Copied = holdtext.createTextRange();
Copied.execCommand("Copy");
}