$(function() {
	//alert(typeof framework_init ); 
	$('a.lb').lightBox( lbOptions ); 
	encryptEmail(); 
}); 

function encryptEmail() {
	//*
	$('a.email').each( function() {
		var a = $(this); 
		var enc = ''; 
		$.getJSON(
			'/emails/get_encoded_address/'+ a.attr('rel'), 
			function(ret) { 
				enc = ret; 
				var encryptedemail_id96='' ; 
				for (var i=0; i<enc.length; i++)
					encryptedemail_id96+= String.fromCharCode(enc[i]); 
				
				var text = a.html().length > 0?
					a.html() : 
					encryptedemail_id96; 	
				
				a.attr('href', 'mailto:'+encryptedemail_id96).html(text); 
			}
		); 
		
	}); 
	/* */
}


function appendAjaxLoading(target, id) {
	//* 
	id = typeof(id) != 'undefined' ? id : '0';
	target.append('<div class= "ajax_load_overlay" id= "overlay-' + id + '"><img src= "'+ theme_folder+ '/img/ajax_loading-'+ season+ '.gif" alt= "loading..." /></div>');
	/* */
}




