$(function(){
	
	if(typeof console === "undefined") {
		console = { log: function() { } };
	}

	var $ = jQuery;

	var WEINER = {
		
		ui: function() {
			if ($('.right.slideshow .wrapper .slide').length > 0) {
				$('.right.slideshow .wrapper').cycle({
					fx: 'fade',
					timeout: 4000,
					speed: 1000,
					prev: '.right.slideshow span .prev',
					next: '.right.slideshow span .next'
				});
			}

			$('.right.slideshow').mouseover(function()
			{	
				$('.right.slideshow .wrapper').cycle('pause');		
			}); 

			$('.right.slideshow').mouseout(function() {
				$('.right.slideshow .wrapper').cycle('resume');
			});
		},

		init: function() {
			WEINER.ui();
		}

	}

	WEINER.init();

});
