// JavaScript Document

jQuery.noConflict();

// Add last-child class to last child elements of li
// Helpful for old browsers that do not support the last-child pseudo-class
jQuery(document).ready(function($){
	$("ul.sub-menu li:last-child").addClass('last-child');  
});

// For running the header slideshow
jQuery(document).ready(function($){
    $('#header-slideshow').cycle({
		fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		delay: 0,
		random: 1
	});
});

// For Fancybox photo galleries
jQuery(document).ready(function($){
	
	$("a.dvda_fancybox").fancybox({
		'zoomSpeedIn': 500,
		'zoomSpeedOut': 500,
		'overlayShow':true,
		'overlayOpacity':0.5,
		'overlayColor':'#000',
		'titleShow':true,
		'centerOnScroll':true
	});
	
	$("a#ie-warning-anchor").fancybox({
		'type'           : 'inline',
		'centerOnScroll' : true,
		'transitionIn'   : 'fade',
		'transitionOut'  : 'fade',
		'autoDimensions' : false,
		'width'          : 550,
		'height'         : 200
	}).trigger('click');
	
});
