


		$(document).ready(function() {
			/*
			*   Examples - images
			*/

			$("a#example1").fancybox({
				'titleShow'     : false
			});

			$("a#example2").fancybox({
				'titleShow'     : false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic'
			});

			$("a#example3").fancybox({
			    'titleShow'     : false,
				'transitionIn'	: 'none',
				'transitionOut'	: 'none'
			});

			$("a#example4").fancybox();

			$("a#example5").fancybox({
				'titlePosition'  : 'inside'
			});

			$("a#example6").fancybox({
				'titlePosition'  : 'over'
			});

			$("a[rel=example_group]").fancybox({
				'transitionIn'		: 'elastic',
				'transitionOut'		: 'elastic',
				'titlePosition' 	: 'inside',
				'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
				    return '<span id="fancybox-title-over">Image ' +  (currentIndex + 1) + ' / ' + currentArray.length + '</span>';
				}
			});
			
			$("a[rel=external_group]").fancybox({
				'width'			: '75%',
				'height'		: '75%',
		        	'autoScale'     	: false,
		        	'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'			: 'iframe'
			});
			
			/*
			*   Examples - various
			*/
			
			$("#various1").fancybox({
				'titlePosition'		: 'inside',
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
			});
			
			$("#various2").fancybox({
				ajax : {
				    type	: "POST",
				    example	: 'myexample=test'
				}
			});
	
			$("#various3").fancybox({
				'width'			: '75%',
				'height'		: '75%',
		        	'autoScale'     	: false,
		        	'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'			: 'iframe'
			});
			
			$("#various4").fancybox({
			    'padding'           : 0,
		        'autoScale'     	: false,
		        'transitionIn'		: 'none',
				'transitionOut'		: 'none'
			});
		});


// ----- Init lightBox plugin
//$(function() {  $('.lightbox').lightBox(); });


// ----- Init Jquery Cross Slide
jQuery(function($) {$(document).ready(function() {

var effect="Static cross-fade";// effect="Slide + cross-fade"; effect="Static cross-fade"; effect="Ken Burns";


var image_01='../../library/jquery-cross-slide/images/pic_01.jpg';
var image_02='../../library/jquery-cross-slide/images/pic_02.jpg';
var image_03='../../library/jquery-cross-slide/images/pic_03.jpg';
var image_04='../../library/jquery-cross-slide/images/pic_04.jpg';

if (document.getElementById('image_01')!=null) image_01=document.getElementById('image_01').src;

// ----- We do not use cross fading if we have only one image
if (document.getElementById('image_02')!=null) {

	if (document.getElementById('image_02')!=null) image_02=document.getElementById('image_02').src; else image_02=image_01;
	if (document.getElementById('image_03')!=null) image_03=document.getElementById('image_03').src; else image_03=image_02;
	if (document.getElementById('image_04')!=null) image_04=document.getElementById('image_04').src; else image_04=image_03;

	//-------------	Effect : Slide + cross-fade
	if (effect=="Slide + cross-fade") {
	$('#title').crossSlide(
	{speed: 45, fade: 1	},
	[
	{ src: image_01, dir: 'up'   },
	{ src: image_02, dir: 'down' },
	{ src: image_03, dir: 'up'   },
	{ src: image_04, dir: 'down' }
	]);
	}

	//-------------	Effect : Static cross-fade
	if (effect=="Static cross-fade") {
	$('#title').crossSlide(
	{sleep: 2, fade: 1, debug: true},
	[
	{src: image_01, href: '/'},
	{src: image_02, href: '/'},
	{src: image_03, href: '/'},
	{src: image_04, href: '/'}
	]);
	}

	//------------- Effect : Ken Burns effect
	if (effect=="Ken Burns") {
	$('#title').crossSlide({
	  fade: 2
	}, [
	  {
	    src:  image_01,
	    href: 'http://flickr.com/photos/spacetrucker/94209642/',
	    from: '100% 80% 1x',
	    to:   '100% 0% 1.7x',
	    time: 5
	  }, {
	    src:  image_02,
	    href: 'http://flickr.com/photos/hichako/1125341449/',
	    from: 'top left',
	    to:   'bottom right 1.5x',
	    time: 5
	  }, {
	    src:  image_03,
	    href: 'http://flickr.com/photos/jayniebell/1125216143/',
	    from: '100% 80% 1.5x',
	    to:   '80% 0% 1.1x',
	    time: 2
	  }, {
	    src:  image_04,
	    href: 'http://flickr.com/photos/ruminatrix/1125292682/',
	    from: '100% 50%',
	    to:   '30% 50% 1.5x',
	    time: 2
	  }
	]);
	}

}

			});});
		/* ]]> */

