jQuery(document).ready(function() {
 jQuery('#no-js').hide();
 
 // hides the slickbox as soon as the DOM is ready
  jQuery('#toggle-box').hide();
  
  
 // toggles the slickbox on clicking the noted link
  jQuery('a#slick-slidetoggle').click(function() {
        jQuery('#toggle-box').slideToggle(700);
        return false;
  });
  
  

  // check form
   jQuery('#check_site :submit').click(function(e) {
     jQuery('#no-js').html(jQuery('#check_site :text').val());
   	 jQuery('#error').hide();
	 jQuery('#check_site :text').each(function() {
		mystring = jQuery(this).val();
		if (mystring.match(/[a-zA-Z0-9\-_]+[.]+[A-Za-z0-9\.\/%&=\?\-_;]/)) {
			jQuery('#form').fadeOut(1000);
			jQuery('#show_result')
				.html('<div align="center"><img class="noborder" src="/addons/img/loading.gif"><br/>Please wait a few seconds.</div>')
				.load('http://weeboost.com/addons/'+jQuery('input[name=script]').val()+'.php?url='+jQuery('#check_site :text').val()+'&form='+jQuery('input[name=submitted]').val());
		 } else {
		 jQuery(this)
			.css('border', '2px solid red')
			.after('<span id="error"> Please enter a valid URL address!</span>');
		 }		
		  e.preventDefault();
	 });
	 });
	//end check form
});


	


