//----------------------------------------------------------------------------------------------------------------
//										Preparation Lightbox
//----------------------------------------------------------------------------------------------------------------
	$(document).ready(function(){
		$(".lightbox").colorbox();
	
		//Decode email address
		if ( $("span.emailRewrite").length ) {
		  // variables, which will be replaced
		  var at = / AT /;
		  var dot = / DOT /g;
		  
		  // function, which replaces pre-made class
		  $('span.emailRewrite').each(function () {
			var addr = $(this).text().replace(at, '@').replace(dot, '.');
			//$(this).after(addr);
			$(this).after('<a href="mailto:' + addr + '">' + addr + '</a>');
			$(this).remove();
		  });
		}
		
		$("a[rel^='videoPlayer']").prettyPhoto({theme:'facebook',slideshow:false, autoplay_slideshow: false});
	});
//----------------------------------------------------------------------------------------------------------------
//	END										Preparation Lightbox
//----------------------------------------------------------------------------------------------------------------

//----------------------------------------------------------------------------------------------------------------
//										Preparation Lightbox
//----------------------------------------------------------------------------------------------------------------
	$(document).ready(function(){
		$("a[rel='lightbox']").colorbox(
		{
			width:"800",
			height:"600",
			iframe:true,
			scroll:true,
			current:"PAGE {current} / {total}"
		});
		$("a[rel='candidat']").colorbox(
		{
			width:"800",
			height:"600",
			iframe:true,
			scroll:true,
			current:"CANDIDAT {current} / {total}"
		});
		$("a[rel='kandidat']").colorbox(
		{
			width:"800",
			height:"600",
			iframe:true,
			scroll:true,
			current:"KANDIDAT {current} / {total}"
		});
		$("a[rel='youtube']").colorbox(
		{
			width:"800",
			height:"800",
			iframe:true,
			scroll:true,
			current:"VIDEO {current} / {total}"
		});
		$("a[rel='circonscription']").colorbox(
		{
			width:"800",
			height:"600",
			iframe:true,
			scroll:true,
			current:"PAGE {current} / {total}"
		});
		$("a[rel='section1']").colorbox(
		{
			width:"800",
			height:"600",
			iframe:true,
			scroll:true,
			current:"PAGE {current} / {total}"
		});
		$("a[rel='section2']").colorbox(
		{
			width:"800",
			height:"600",
			iframe:true,
			scroll:true,
			current:"PAGE {current} / {total}"
		});
		$("a[rel='section3']").colorbox(
		{
			width:"800",
			height:"600",
			iframe:true,
			scroll:true,
			current:"PAGE {current} / {total}"
		});
		$("a[rel='section4']").colorbox(
		{
			width:"800",
			height:"600",
			iframe:true,
			scroll:true,
			current:"PAGE {current} / {total}"
		});
		$("a[rel='staff']").colorbox(
		{
			width:"800",
			height:"600",
			iframe:true,
			scroll:true
		});
		$("a[rel='widgetGallery']").colorbox(
		{
			scalePhotos:true,
			current:"IMAGE {current} / {total}"
		});
		$("a[rel='agenda']").colorbox(
		{
			width:"500",
			height:"500",
			iframe:true,
			scroll:true,
			current:"AGENDA {current} / {total}"
		});
		$("a[rel='completeAgenda']").colorbox(
		{
			width:"500",
			height:"500",
			iframe:true,
			scroll:true,
			current:"AGENDA {current} / {total}"
		});
		$("a[rel='calendar']").colorbox(
		{
			width:"500",
			height:"500",
			iframe:true,
			scroll:true,
			current:"CALENDAR {current} / {total}"
		});
		$("a[rel='print']").colorbox(
		{
			width:"800",
			height:"600",
			iframe:true,
			scroll:true
		});
		$("a[rel='mail']").colorbox(
		{
			width:"500",
			height:"500",
			iframe:true,
			scroll:true
		});
		$("a[rel='video']").colorbox(
		{
			width:"900",
			height:"570",
			iframe:true,
			scroll:true,
			current:"VIDEO {current} / {total}"
		});
	});
//----------------------------------------------------------------------------------------------------------------
//	END										Preparation Lightbox
//----------------------------------------------------------------------------------------------------------------
