/**
 * Provides animation sequences and special effects for menus and images.
 */


$("document").ready(function() {
	//PNG fix
	
	$("document").pngFix();
	
	//dropdown
	ddsmoothmenu.init({
	mainmenuid: "nav_top", //menu DIV id
	orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
	classname: 'ddsmoothmenu', //class added to menu's outer DIV
	//customtheme: ["#1c5a80", "#18374a"],
	contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})
	
	// Transparency effects
/*
	$("#nav_top_bg").animate({opacity: 0.5}, 0);
*/
/*
	$("#nav_top").animate({opacity: 1}, 0);
*/
	$("#top-menu_bottom").animate({opacity: 0.54}, 0);
	$(".nav_left_titles_bg").animate({opacity: 0.14}, 0);
	$(".nav_left_separation").animate({opacity: 0.15}, 0);
//	$("#nav_bar_left_bg").animate({opacity: 0.75}, 0);
	$("#footer_ln").animate({opacity: 0.23}, 0);
	$(".ti_ttl_underline").animate({opacity: 0.24}, 0);
	$(".table_ttl_underline").animate({opacity: 0.24}, 0);
	$(".ln_separation").animate({opacity: 0.24}, 0);
	$(".row_separation").animate({opacity: 0.24}, 0);
//	$(".tbx_shadow").animate({opacity:0.44}, 0);
	$(".tour_details_bg").animate({opacity: 0.75}, 0);
	$(".icon_bg").animate({opacity: 0.75}, 0);
	$(".ti_boxes_overlay").animate({opacity: 1}, 0);
	$(".black_bg").animate({opacity:0.75},0);
	//$("#corner_static_bg").animate({opacity: 1}, 0);
//	$("#tbx_overlay").animate({opacity: 0.75}, 0);
	

	var tbxBgs = [
		'#tbx_mid'
	];


	for(y in tbxBgs) {
		$(tbxBgs[y]).animate({opacity: 0.85}, 0);
	}


/**
 * Nav bar right hover effect
 */
$("#nav_bar_right .content div").hover(function(){
		$(this).toggleClass('hover');
}, function (){
		$(this).toggleClass('hover');
})
//	/**
//	 * Slideshow settings. Pictures are listed in the given element below (#flash_box).
//	 * doc: http://jquery.malsup.com/cycle/lite/
//	 */
	$('.slideshow').cycle({
		fx: 'fade',			// choose your transition type, ex: fade, scrollUp, shuffle, etc...
		speed: 3000,		// milliseconds. 1000ms = 1s
		timeout: 10000,		// transition between pictures
		before: onBefore	// name of the callback method used
	});

	function onBefore() {
    $('#img_title')
        .html(this.alt);
	}

	//video lightbox
	if(('#video'))
	{
		$("#video a").fancybox();
	}
	$("a.lightbox").fancybox();


}); // End document.ready
