Shadowbox.init();

  function toggle_visibility(id) {
       var e = document.getElementById(id);
       if(e.style.display == 'block')
          e.style.display = 'none';
       else
          e.style.display = 'block';
    }
	
window.addEvent('domready', function(){
	 
	new FormCheck('contact_form', {	
		submitByAjax: true,
		ajaxResponseDiv: 'contact-response',
		display : {	errorsLocation : 1,indicateErrors : 3}
		
	})
	
	new FormCheck('newslet_form', {	
		display : {	errorsLocation : 1, indicateErrors : 3}
	})
	
	$('contact-window').set('styles',{display:'none'});
	
	
	$('home-image').addEvent('dblclick',function() {			
			document.getElementById('home-image').src = "images/scott-kristie-mcdonald-goofy.jpg";
			alert('Bazinga!');
		});
	
	/* hide using opacity on page load */
			$('fb-modal').setStyles({
				opacity:0,
				display:'block'
			});
			/* hiders */
			$('fb-close').addEvent('click',function(e) { $('fb-modal').fade('out'); });
			window.addEvent('keypress',function(e) { if(e.key == 'esc') { $('fb-modal').fade('out'); } });
			$(document.body).addEvent('click',function(e) { 
				if($('fb-modal').get('opacity') == 1 && !e.target.getParent('.dialog-wrap')) { 
					$('fb-modal').fade('out'); 
				} 
			});
			/* click to show */
			$('fb-trigger').addEvent('click',function() {
				$('fb-modal').fade('in');
			});
			
			$('fb-trigger2').addEvent('click',function() {
				$('fb-modal').fade('in');
			});
			
			$('fb-trigger3').addEvent('click',function() {
				$('fb-modal').fade('in');
			});			
	
});

    function toggle_visibility(id) {
       var e = document.getElementById(id);
       if(e.style.display == 'block')
          e.style.display = 'none';
       else
          e.style.display = 'block';
    }
    
