$(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'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
				    return '<span id="fancybox-title-over">Image ' +  (currentIndex + 1) + ' / ' + currentArray.length + '</span>';
				}
			});
			
			/*
			*   Examples - various
			*/
			
			$("#various1").fancybox({
				'titlePosition'		: 'inside',
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
			});
			
			$("#various2").fancybox({
				ajax : {
				    type	: "POST",
				    example	: 'myexample=test'
				}
			});
	
			$("#iframe").fancybox({
				'width'				: '75%',
				'height'			: '75%',
		        'autoScale'     	: false,
		        'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe',
				'overlayColor': "#000000",
				'overlayOpacity': 0.6
			});
			
			$("#flash").fancybox({
			    'padding' : 0,
				'imageScale': true,
		        'autoScale' : true,
		        'transitionIn' : 'none',
				'transitionOut' : 'none',
				'overlayColor': "#000000",
				'overlayOpacity': 0.6
			});	
				
				$("#flash2").fancybox({
		        'transitionIn' : 'none',
				'transitionOut' : 'none',
				'overlayColor': "#000000",
				'overlayOpacity': 0.6,
				'width': 420,
				'height': 273
			});	
	
		});
	
	
	
	jQuery(function(){
jQuery.noConflict();
				jQuery.fn.getTitle = function() {
			var arr = jQuery("a.fancybox");
			jQuery.each(arr, function() {
				var title = jQuery(this).children("img").attr("title");
				jQuery(this).attr('title',title);
			})
		}

		// Supported file extensions
		var thumbnails = 'a:has(img)[href$=".bmp"],a:has(img)[href$=".gif"],a:has(img)[href$=".jpg"],a:has(img)[href$=".jpeg"],a:has(img)[href$=".png"],a:has(img)[href$=".BMP"],a:has(img)[href$=".GIF"],a:has(img)[href$=".JPG"],a:has(img)[href$=".JPEG"],a:has(img)[href$=".PNG"]';

	
		jQuery(thumbnails).addClass("fancybox").attr("rel","fancybox").getTitle();

			jQuery("a.fancybox").fancybox({
			'imageScale': true,
			'padding': 10,
			'zoomOpacity': true,
			'zoomSpeedIn': 300,
			'zoomSpeedOut': 300,
			'zoomSpeedChange': 300,
			'overlayShow': true,
			'overlayColor': "#000000",
			'overlayOpacity': 0.6,
			'enableEscapeButton': true,
			'showCloseButton': true,
			'hideOnOverlayClick': true,
			'hideOnContentClick': false,
			'frameWidth':  560,
			'frameHeight':  340,
			'callbackOnStart': null,
			'callbackOnShow': null,
			'callbackOnClose': null,
			'centerOnScroll': true
		});


})
