/* Author: 
   Guido Bittner
*/

$(function() {
	var galleries = $('.ad-gallery').adGallery({
		loader_image: './files/loader.gif',
		width: ".$imgwidth.",
		height: ".$imgheight.",
		start_at_index: 0,
		description_wrapper: false,
		animate_first_image: true,
		animation_speed: 1000,
		slideshow: {
			enable: true,
			autostart: true,
			speed: 5000,
			onStart: function() {
				$("div.ad-nav").slideUp("slow");
			},
			onStop: function() {
				//$("div.ad-nav").slideDown("slow");
			}
		},
		//effect: '".$cheffect."'
		effect: 'fade',
		enable_keyboard_move: true,
		cycle: true
	});
});

$("#lightbox").mouseenter(function(){
	 $("div.ad-nav").slideDown("300");
}).mouseleave(function(){
	 $("div.ad-nav").slideUp("300");
});

$(".ifbox").fancybox({
	'width'				: 920,
	'height'			: 560,
	'autoScale'     	: false,
	'autoDimensions'	: false,
	'centerOnScroll'	: true,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'scrolling'			: 'yes',
	'hideOnOverlayClick': false,
	'type'				: 'iframe'
});

$(".lightbox").fancybox({
	'autoDimensions'	: true,
	'autoScale'     	: true,
	'width'				: 920,
	'height'			: 560,
	'centerOnScroll'	: true,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none'
});

