 jQuery.noConflict();
 jQuery(document).ready(function(){		

   //reasons to subscribe display
    jQuery("#reasons").click(function(){
    jQuery("#reasonsDisplay").slideToggle("slow");
	jQuery(this).toggleClass("active"); return false;
});
    jQuery('a[name=modal]').click(function(e) {
    		    		e.preventDefault();
		//Get the screen height and width
		var maskHeight = jQuery(document).height();
		var maskWidth = jQuery(document).width();
	
		//Set heigth and width to mask to fill up the whole screen
		jQuery("#fade").css({"width":maskWidth,"height":maskHeight});
		//document.getElementById('fade').style.display='block';
		//transition effect		
		jQuery("#fade").fadeIn(600);	
		jQuery("#fade").fadeTo("slow",0.8);	
		jQuery("#fade").show();
	
		//Get the window height and width
		var winH = jQuery(window).height();
		var winW = jQuery(window).width();
              
		//Set the popup window to center
		jQuery("#light").css("top",  winH/2-jQuery("#light").height()/2);
		//jQuery("#light").css("left", winW/2-jQuery("#light").width()/2);
	
		//transition effect
		jQuery("#light").fadeIn(900); 


});
    //if mask is clicked
	jQuery('#fade').click(function () {
		jQuery(this).hide();
		jQuery('#light').hide();
	});	
	
	jQuery('.close_button').click(function (e) {
			e.preventDefault();
			document.getElementById('light').style.display='none';
			document.getElementById('fade').style.display='none';		
	});
	
    
});

