var isInFancybox = false;
try {
   isInFancybox = (parent.frames[0].name.indexOf("fancybox-frame") != -1) ? true : false;
} catch (e) {
}
			if (isInFancybox) {
				document.write('<style type="text/css" media="screen, projection">#sidebar, #navi, #subnavi, #header, #footer {display: none;} html {padding: 0; background-color: #ffffff;} body {margin: 0; width: auto; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } #content {margin: 20px; width: auto;} </style>');
			}

			$(document).ready(function() {

			/* This is basic - uses default settings */
	
			$('a[rel="lightbox"]').fancybox({
				'hideOnContentClick': true,
				'transitionIn'	:	'elastic',
				'transitionOut'	:	'elastic',
				'speedIn'		:	600, 
				'speedOut'		:	200, 
				'overlayColor'	:	'#000000',
				'overlayOpacity':	0.6
			});
	
			/* Using custom settings */
	
			$("a#inline").fancybox({
				'hideOnContentClick': true
			});

			/* Apply fancybox to multiple items */
	
			$("a.portrait").fancybox({
				'type'			:	'iframe',
				'hideOnContentClick':	true,
				'enableEscapeButton':	true,
				'speedIn'		:	600, 
				'speedOut'		:	200, 
				'width'         :	800,
				'height'		:	800,
				'overlayColor'	:	'#000000',
				'overlayOpacity':	0.6
				});
	
			});


