$().ready(function() {

		$('.lbox').lightBox({
			imageLoading:			main_host+'images/lightbox/lightbox-ico-loading.gif',		// (string) Path and the name of the loading icon
			imageBtnPrev:			main_host+'images/lightbox/lightbox-btn-prev.gif',			// (string) Path and the name of the prev button image
			imageBtnNext:			main_host+'images/lightbox/lightbox-btn-next.gif',			// (string) Path and the name of the next button image
			imageBtnClose:		main_host+'images/lightbox/lightbox-btn-close.gif',		// (string) Path and the name of the close btn
			imageBlank:				main_host+'images/lightbox/lightbox-blank.gif'			// (string) Path and the name of a blank image (one pixel)
			});

	if($('.lightbox, .lightbox_inside').size() > 0) {

		$('.lightbox_inside').each(function() {
		 $(this).lightBox({
			imageLoading:			main_host+'images/lightbox/lightbox-ico-loading.gif',		// (string) Path and the name of the loading icon
			imageBtnPrev:			main_host+'images/lightbox/lightbox-btn-prev.gif',			// (string) Path and the name of the prev button image
			imageBtnNext:			main_host+'images/lightbox/lightbox-btn-next.gif',			// (string) Path and the name of the next button image
			imageBtnClose:		main_host+'images/lightbox/lightbox-btn-close.gif',		// (string) Path and the name of the close btn
			imageBlank:				main_host+'images/lightbox/lightbox-blank.gif'			// (string) Path and the name of a blank image (one pixel)
			});
		});

		$('.lightbox').lightBox({
			imageLoading:			main_host+'images/lightbox/lightbox-ico-loading.gif',		// (string) Path and the name of the loading icon
			imageBtnPrev:			main_host+'images/lightbox/lightbox-btn-prev.gif',			// (string) Path and the name of the prev button image
			imageBtnNext:			main_host+'images/lightbox/lightbox-btn-next.gif',			// (string) Path and the name of the next button image
			imageBtnClose:		main_host+'images/lightbox/lightbox-btn-close.gif',		// (string) Path and the name of the close btn
			imageBlank:				main_host+'images/lightbox/lightbox-blank.gif'			// (string) Path and the name of a blank image (one pixel)
			});

	}

  $('.email2').nospam({
    replaceText: false,    // BOOLEAN, optional default false. If set to true, replaces matched elements' text with the e-mail address
    filterLevel: 'normal' // STRING, optional accepts 'low' or 'normal', default 'normal'.
                          // low: email//domain/tld
                          // normal: dlt/niamod//liame (email//domain/tld reversed)

  });

});

function showvideo(title, contenuto) {
	$('<div id="youtubeplayer">&nbsp;</div>').dialog({
		title: title,
		modal : true,
		overlay: {
			backgroundColor: '#000',
			opacity: 0.5
		},
		width:'425px',
		height:'388px',
		close:function() {
			$(this).dialog('destroy').remove();
		}
	});

}

var ytplayer;
function onYouTubePlayerReady(playerId) {
	ytplayer = document.getElementById("youtubeplayer");
	playVideo();
}
function playVideo() {
	ytplayer.playVideo();
}

