jQuery(document).ready(function() {
    
	jQuery("ul.sf-menu").superfish({
		autoArrows:  false,
		delay:       400,                             // one second delay on mouseout 
		animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
		speed:       'fast',                          // faster animation speed 
		autoArrows:  false,                           // disable generation of arrow mark-up 
		dropShadows: false                            // disable drop shadows 			
	}); 
	
	// wrap 'span' to nav page link
	jQuery('.topnav ul').children('li').each(function() {
		jQuery(this).children('a').html('<span>'+jQuery(this).children('a').text()+'</span>'); // add tags span to a href
	})
	
	Cufon.replace('h2');
	Cufon.replace('.wtitle h3');
	Cufon.replace('span.h21');

	jQuery(function(){
			jQuery('#slides').slides({
				preload: true,
				preloadImage: '/images/preload.gif',
				play: 5000,
				pause: 2500,
				hoverPause: true,
				animationStart: function(current){
					jQuery('.caption').animate({
						bottom:-35
					},100);
					
				},
				animationComplete: function(current){
					jQuery('.caption').animate({
						bottom:0
					},200);
					
				},
				slidesLoaded: function() {
					jQuery('.caption').animate({
						bottom:0
					},200);
				}
			});
		});
});





