//******************* EDWIN ************************//
//*      Funktionsdatei für Jquery Fancybox         *//
//**************************************************//
//   copyright, 03.2009, office@q2e.at   //

// document ready - start
jQuery(document).ready(function() {
  // remove fancybox group attribute - this avoids wrong content in fancybox
  // a link without a source specified shouldn't be displayes by fancybox
  jQuery("span.fancybox a[href='']").removeAttr('rel');
  jQuery("span.fancybox a").fancybox();
  // create fancybox for share / recommend function
  jQuery("span.mail_fancybox a").fancybox({
			'titleShow'		: true,
			'titlePosition'	: 'over',
			'overlayShow'	: true,
			'overlayOpacity': 0.9,
			'overlayColor'	: '#333',
			'transitionIn'	: 'elastic',
			'centerOnScroll' : true,
			'showCloseButton' : false,
			'autoscale' : true,
			'width' :300,
			'height' :450,
			'titleFormat' : function(title, currentArray, currentIndex, currentOpts) {
        return '<div id="tip7-title"><span><a href="javascript:;" onclick="$.fancybox.close();"><img src="{main_surl}prog/tps/jquery.fb-1.3.1/closelabel.gif" /></a></span>' + (title && title.length ? '<b>' + title + '</b>' : '' ) + '</div>';
      },
      'hideOnOverlayClick' :false

});

//Image zoom
jQuery("a[rel=lightbox-group]").fancybox({
			'overlayShow'	: true,
			'overlayOpacity': 0.8,
			'overlayColor'	: '#333',
			'titleShow'		: true,
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic',
			'titlePosition'	: 'over',
			'titleFormat'	: function(title, currentArray, currentIndex, currentOpts) {
			  if(title == 'zoom'){title='';}
			  return '<span id="fancybox-title-over">' + c_site_fancybox_group_title+ ' ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
			  },
			'onComplete'	:	function() {
			   $("#fancybox-wrap").hover(function() {
			   $("#fancybox-title").show();
			   }, function() {
			   $("#fancybox-title").hide();
			   });
			   }
});



//document ready - end
});


