$(document).ready( function() {
	
	function formatTitle(title, currentArray, currentIndex, currentOpts) {
				 return '<span id="fancybox-title-over"><div style="float:left;">'+$(".tab-content-container .title:first").text()+'&nbsp;&nbsp;<a href="'+$("a[rel=all_images]")[currentIndex]+'">'+fancy_3+'</a></div><div style="float:right;">'+ fancy_1 + ' ' + (currentIndex + 1) + ' ' + fancy_2 + ' ' + currentArray.length +'</div><div class="clear"></div></span>';
				
//	    return '<div style="text-align:left; color:#000; padding:10px;">' + 'Image ' + (currentIndex + 1) + ' of ' + currentArray.length + '</div>';
	}
        //jQuery.ajaxSettings.url=jQuery.ajaxSettings.url.substr(0,jQuery.ajaxSettings.url.indexOf('#'));
	$("a[rel=all_images]").fancybox({
        'transitionIn'      : 'none',
        'transitionOut'     : 'none',
        'titleShow'					:	true,
        'titlePosition' 		: 'over',
       	'titleFormat'		: formatTitle,
       	'overlayOpacity'  : 0.8,
       	'onStart' : function(){$("object").hide(); $("embed").hide();}, // change th id here to thing you want to hide
        'onClosed' : function(){$("object").show(); $("embed").show();} // change the id here-enable it re-enable it on close
    });
});


//alert(jQuery.ajaxSettings.url.substr(0,jQuery.ajaxSettings.url.indexOf('#')));
