// JavaScript Document

$(document).ajaxComplete(function()
{

	/* This is basic - uses default settings */
	
	$("a.single_image").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200,
		'titleShow'		: false 
	});
	
	$("a.fancybox").fancybox({
		'titleShow'			: false 
	});
	
	$("a.fancybox_noclose").fancybox({
		'showCloseButton'	:	false,
		'titleShow'			: false 
	});
	
	$("a.iframe_small").fancybox({
		'showCloseButton'	:	false,
		'width'				:	600, 
		'height'			:	160,
		'type'				: 'iframe',
		'titleShow'			: false 
		
	});
	
	$("a.iframe_medium").fancybox({
		'showCloseButton'	:	false,
		'width'				:	460, 
		'height'			:	265,
		'type'				: 'iframe',
		'titleShow'			: false 
	});
	
	$("a.iframe_lp1").fancybox({
		'showCloseButton'	:	true,
		'width'				:	460, 
		'height'			:	560,
		'type'				: 'iframe',
		'titleShow'			: false,
		'hideOnOverlayClick': false 
		
	});
	
	$("a.iframe_tall").fancybox({
		'showCloseButton'	:	false,
		'width'				:	660, 
		'height'			:	360,
		'type'				: 'iframe',
		'titleShow'			: false 
	});
	
	$("a.iframe_premium").fancybox({
		'showCloseButton'	:	false,
		'width'				:	660, 
		'height'			:	670,
		'type'				: 'iframe',
		'titleShow'			: false 
	});
	
	
	$("a.iframe_people").fancybox({
		'showCloseButton'	:	true,
		'width'				:	600, 
		'height'			:	565,
		'type'				: 'iframe',
		'titleShow'			: false 
	});
	
	$("a.iframe_account").fancybox({
		'showCloseButton'	:	true,
		'width'				:	515, 
		'height'			:	445,
		'type'				: 'iframe',
		'titleShow'			: false 
	});
	
	$("a.iframe_reviews").fancybox({
		'showCloseButton'	:	true,
		'width'				:	765, 
		'height'			:	567,
		'type'				: 'iframe',
		'titleShow'			: false 
	});
	
	$("#youtube").click(function() {
	$.fancybox({
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'title'			: this.title,
			'width'			: 680,
			'height'		: 495,
			'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
			'type'			: 'swf',
			'swf'			: {
			   	 'wmode'		: 'transparent',
				'allowfullscreen'	: 'true'
			}
		});

	return false;
	});
	


});


$(document).ready(function() {

	/* This is basic - uses default settings */
	
	$("a.single_image").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200,
		'titleShow'		: false 
	});
	
	$("a.fancybox").fancybox({
		'titleShow'			: false 
	});
	
	$("a.fancybox_noclose").fancybox({
		'showCloseButton'	:	false,
		'titleShow'			: false 
	});
	
	$("a.iframe_small").fancybox({
		'showCloseButton'	:	false,
		'width'				:	600, 
		'height'			:	160,
		'type'				: 'iframe',
		'titleShow'			: false 
		
	});
	
	$("a.iframe_medium").fancybox({
		'showCloseButton'	:	false,
		'width'				:	460, 
		'height'			:	265,
		'type'				: 'iframe',
		'titleShow'			: false 
	});
	
	$("a.iframe_lp1").fancybox({
		'showCloseButton'	:	true,
		'width'				:	460, 
		'height'			:	560,
		'type'				: 'iframe',
		'titleShow'			: false,
		'hideOnOverlayClick': false 
	});
	
	$("a.iframe_tall").fancybox({
		'showCloseButton'	:	false,
		'width'				:	660, 
		'height'			:	360,
		'type'				: 'iframe',
		'titleShow'			: false 
	});
	
	$("a.iframe_premium").fancybox({
		'showCloseButton'	:	false,
		'width'				:	660, 
		'height'			:	670,
		'type'				: 'iframe',
		'titleShow'			: false 
	});
	
	
	$("a.iframe_people").fancybox({
		'showCloseButton'	:	true,
		'width'				:	600, 
		'height'			:	565,
		'type'				: 'iframe',
		'titleShow'			: false 
	});
	
	$("a.iframe_account").fancybox({
		'showCloseButton'	:	true,
		'width'				:	515, 
		'height'			:	445,
		'type'				: 'iframe',
		'titleShow'			: false 
	});
	
	$("a.iframe_reviews").fancybox({
		'showCloseButton'	:	true,
		'width'				:	765, 
		'height'			:	567,
		'type'				: 'iframe',
		'titleShow'			: false 
	});
	
	$("#youtube").click(function() {
	$.fancybox({
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'title'			: this.title,
			'width'			: 680,
			'height'		: 495,
			'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
			'type'			: 'swf',
			'swf'			: {
		     	 'wmode'		: 'transparent',
				'allowfullscreen'	: 'true'
			}
		});

	return false;
});
	
});

