$(document).ready(function(){
	$("a#email-a-friend").fancybox({
		'titleShow'		: false,
		'width'         : 336, 
		'height'        : 436, 
		'autoScale'     : true, 
		'type'          : 'iframe', 
		'scrolling'     : 'no' 
	});

	$("a#email-a-friend").click(function(){
		$.fancybox.showActivity();
	});
	
	if (window.location.href.indexOf('email-a-friend') == -1 && $('[placeholder]').length) {
		$('[placeholder]').defaultValue();
	}

	$("#gantry-details a").fancybox({
		'titleShow'          : false,
		'width'              : 960,
		'frameWidth'         : 960,
		'height'             : 440,
		'frameHeight'        : 440,
		'type'               : 'iframe', 
		'hideOnContentClick' : false,
		'scrolling'          : 'no',
		'padding'            : 20,
		'onComplete'         : resizeFancyBox
	});
	
	$("a.fancytabs").fancybox({
		'titleShow'          : false,
		'width'              : 960,
		'frameWidth'         : 960,
		'height'             : 440,
		'frameHeight'        : 440,
		'autoScale'          : true, 
		'type'               : 'iframe', 
		'hideOnContentClick' : false,
		'scrolling'          : 'yes',
		'padding'            : 0
	});
	
	$("a.fancytabsimage").fancybox({
		'titleShow'          : true,
		'width'              : 655,
		'frameWidth'         : 655,
		'height'             : 540,
		'frameHeight'        : 540,
		'autoScale'          : false, 
		'type'               : 'iframe', 
		'hideOnContentClick' : false,
		'scrolling'          : 'no',
		'padding'            : 4
	});

	$('a.ezpass-flex').fancybox({
		'type'               : 'inline',
		'autoDimensions'     : false,
		'width'              : 300,
		'height'             : 160,
		'overlayShow'        : false,
		'padding'            : 20
	}).hover(function() {
		$(this).click();
	}, function() {
		$('#fancybox-close').click();
	});

	$(document).bind('fb_resize', function(){
		resizeFancyBox();
	});

	$('#entryPtSel_chzn').css('zIndex',10000);
	$('#exitPtSel_chzn').css('zIndex',9999);

	$('ul#clickable-icons li a').click(function(e){
		e.stopImmediatePropagation();
		window.location.href = $(this).attr('href');
	});

	$('ul#clickable-icons li').click(function(e) {
		$('a:first', this).click();
	});

	$('ul#clickable-icons li p').click(function() {
		event.preventDefault();
	});
});

function resizeFancyBox() {
	$.fancybox.resize();
	$.fancybox.center();
}


