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

  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({
    'overlayOpacity': 0.6,
    'overlayColor'	: '#000000',
    });
    // 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	
	$("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) {
				  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();
				   });
				   }

	});	


/*
if($("div.c_box_preview_cont").length){
  var newValue = ($("div.c_box_preview_cont").height()+186)+'px';
  alert(newValue);
  $("div.left").css({'top':newValue});
}
*/


  });



