////////////////////////////////////////////////////
// Image Cycle

$(document).ready(function() {
    $('.slideshow').cycle({
		fx: 'fade',
		speed:  2500,
		timeout:  2000,
		random:1,
		pause:1
	});
});


// Validate Form   
$(document).ready(function(){
	$("#commentForm").validate();
});

///////Javascript Email Address Encoder
//  by www.stevedawson.com
function emailAddress()
{
	var first = 'ma';
	var second = 'il';
	var third = 'to:';
	var name1 = 'sales';
	var domain = 'bela';
	var ext = 'co.uk'; 
	document.write('<a href="');
	document.write(first+second+third);
	document.write(name1);
	document.write('&#64;');
	document.write(domain);
	document.write('.');
	document.write(ext);  
	document.write('">'); 
	document.write('sales@bela.co.uk</a>');}

// Slicker Show and Hide, by Karl Swedberg

$(document).ready(function() {
  
       // hides the slickbox as soon as the DOM is ready
 
       // (a little sooner than page load)
  
        $('#slickbox').hide();
  
       // shows the slickbox on clicking the noted link  
  
        $('a#slick-show').click(function() {
  
          $('#slickbox').show('slow');
  
          return false;
  
        });
  
       // hides the slickbox on clicking the noted link  
  
        $('a#slick-hide').click(function() {
  
          $('#slickbox').hide('slow');
  
          return false;
  
        });
 
       
 
       // toggles the slickbox on clicking the noted link  
  
        $('a#slick-toggle').click(function() {
  
          $('#slickbox').slideToggle('slow');
 
          return false;
 
        });
  
      });
