/*
container  	string  	mandatory  	the HTML element's id that will contain the slideshow
loader 	string 	optional 	the path to a image used as a preloader indicator
linksPosition 	sting('top' or 'bottom') 	optional 	the place for navigation links container
linksClass 	string 	optional 	the CSS class aplied to navigation links container
linksSeparator 	string 	optional 	links separator
activeLinkClass 	string 	optional 	active link CSS class name
nextslideClass 	string 	optional 	CSS class aplied to next slide link
prevslideClass 	string 	optional 	CSS class aplied to prev slide link
fadeDuration 	integer 	optional 	the fade duration in miliseconds
captionPosition 	sting('top' or 'bottom') 	optional 	the place for caption container
captionClass 	string 	optional 	the CSS class aplied to caption container
autoplay 	integer 	optional 	if this is set the slideshow will autoplay slides with a pause in seconds defined by this option
images 	array 	optional 	an array of objects with 'src' and 'caption' for each image 
*/

/*
function initMenu() {
	$('ul#nav li ul').hide();
	$('ul#nav ul:first').show();
	//$('#menu li a').click(
    $("ul#nav li a").each(function(){
		$(this).hover(
				function() {
					var checkElement = $(this).next();
					if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
						return false;
					}
					if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
						checkElement.slideDown('normal');
						return false;
					}
				},
				function() {
					var checkElement = $(this).next();
					if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
						checkElement.slideUp('normal');
						return false;
					}
				}
	    }
			
	);
}
*/
/*
function initMenu() {
	$('ul#nav li ul').hide();
	//$('ul#nav ul:first').show();
	//$('#menu li a').click(
    $("ul#nav li a:first").each(function(){
		$(this).hover(
				function() {
					var checkElement = $(this).next();
					if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
						return false;
					}
					if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
						checkElement.slideDown('normal');
						return false;
					}
				},
				function() {
					var checkElement = $(this).next();
					if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
						checkElement.slideUp('normal');
						return false;
					}
				}
		);
    });
};
*/

$(document).ready(function()
{
	$("ul#nav li:last").css( "border-bottom", "0px" );
	$("ul#menu_bottom li:last").css( "border-right", "0px" );
	//initMenu();
			/*loader: 'images/slide/slideshow_loader.gif',*/
	
	if ( $("div#slideShow").length > 0 )
	{
		$.slideshow(
			{
				container : 'slideShow',
				loader: 'images/slide/spacer.gif',
				fadeDuration : 500,
				linksClass: 'pagelinks',
				linksSeparator : ' | ',
				activeLinkClass: 'activeSlide',
				nextslideClass: 'nextSlide',
				prevslideClass: 'prevSlide',
				captionClass: 'slideCaption',
				autoplay: 5,
				images : [
					{
						src: 'images/slide/home1.jpg',
						caption: 'Hotel Aurora 1'
					},
					{
						src: 'images/slide/home2.jpg',
						caption: 'Hotel Aurora 2'
					},
					{
						src: 'images/slide/home3.jpg',
						caption: 'Hotel Aurora 3'
					}
				]
			}
		);
	}
	
	if ( $("a[rel^='prettyPhoto']").length > 0 )
	//if ( $("h2#fotogallery").length > 0 )
	{
		$("a[rel^='prettyPhoto']").prettyPhoto();
		/*
		images = ['/images/fullscreen/1.jpg',
		          '/images/fullscreen/2.jpg',
		          '/images/fullscreen/3.jpg',
		          '/images/fullscreen/4.jpg',
		          '/images/fullscreen/5.jpg'
		          ];
		titles = ['Title 1',
		          'Title 2',
		          'Title 3',
		          'Title 4',
		          'Title 5'
		          ];
		descriptions = ['Description 1',
		                'Description 2',
		                'Description 3',
		                'Description 4',
		                'Description 5'
		                ];
		$( "#fotogallery" ).click( function(){
				$.prettyPhoto.open('/images/fullscreen/1.jpg','Title 1','Description 1');
			}
		);
		*/
	}

	/*
	//@ active scroll
    var _active = null;
	//@ max expand in pixel
    var _hmax = 80;
	//@ min height in pixel
    var _hmin = 10;
    
    $("ul#nav li a").each(function(){
		$(this).hover(
			//@ slide hover
			function(){
				$(this).find('span').stop().animate({height: _hmax+"px"}, {queue:false, duration:500, easing:'easeOutBack'});
				_active = $(this);
				return false;
			},
			function() {
				//@ slide back
				//$(_active).find('span').animate({height: _hmin+"px"}, {queue:false, duration:300,easing:'easeInBack'});
				$(_active).find('span').stop().animate({height: _hmin + "px"}, {queue:false, duration:300,easing:'easeInBack'});
				//$(_active).css("height", "0px");
				return false;
			}
		);
	});
	*/
    /*
	// OPACITY OF BUTTON SET TO 100%
	$("ul#nav a").css("opacity","1.0");
	
	// ON MOUSE OVER
	$("ul#nav a").hover(
		function () {
			// SET OPACITY TO 30%
			$(this).stop().animate({
				opacity: 0.5
			}, "slow");
		},
	
		// ON MOUSE OUT
		function () {
			// SET OPACITY BACK TO 100%
			$(this).stop().animate({
				opacity: 1.0
			}, "slow");
		}
	);
	*/
	
});
