
// ... jquery FTW 

(function($) {

        $().ready(function() {
		 $('#top10-advisors-video-dynamic').hide();
	});

	var toggleVideos = function( qs1, qs2, qs3 ) {
		
		var static_container  = $('#top10-advisors-video-static');
		var dynamic_container = $('#top10-advisors-video-dynamic');

		if( $(static_container).is(':visible') ) {
			$.get( '_scripts/getTopAdvisorsVideo.php',
				function( result ) {
				
					$(dynamic_container).html(result);
					$(static_container).hide();
					$(dynamic_container).slideDown('slow');

					$('#topAdvisorsToggleVideo').html( "Weniger Videos" );
			});
		}
		else {
			$(dynamic_container).slideUp('slow');
			$(static_container).show();
			$('#topAdvisorsToggleVideo').html( "Top 10 Videos" );
		}	
	};

	// export public function
	$.extend( this, {
		toggleTop10AdvisorsVideo: toggleVideos
	});

})(jQuery);


/// NEWS SLIDER
(function($) {
 $().ready( function() {
	var news = $('#news-slider').scrollable({
		api:true,
		size:1, 
		loop:true,
		speed: 600,
		interval: 4000
	});
			
	$('#news-slider .nav-prev').click( function() {
		news.prev();
	});

	$('#news-slider .nav-next').click( function() {
                news.next();
        });	
 });
})(jQuery);


