// MENU
$(document).ready(function(){ 
	$('ul.sf-menu').superfish({ 
        	animation: { height:'show' },
        	delay:     1200
	});
});

// Slideshow
$(document).ready(function(){
	$('#slideshow')
		.before('<div id="slideshowNav">')
		.cycle({
			timeout: 5000,
			speed: 1500,
			pager: '#slideshowNav'
		});
});

// Tooltip FZG-Rotator
$(document).ready(function() {
	$('.tooltip_show').tooltip({
		onBeforeShow: function() {
			var tooltipHTML = this.getTrigger().next('div').html();
			$('#tooltip').find('*').remove();
			$('#tooltip').append(tooltipHTML);
		},
		events: {
			def: 'mouseenter, mouseleave',
			tooltip: 'mouseenter, mouseleave'
        	},		
        	tip: '#tooltip',
		position: 'top left',
		effect: 'fade',
		fadeInSpeed: 500,
		fadeOutSpeed: 500,
		delay: 500
	});
});

// Scrollable FZG-Rotator
$(document).ready(function() {
	$('#fzgRotationBox').scrollable({
		circular: true,
		speed: 1000
	});
});

// Fancybox Fahrzeugsuche
$(document).ready(function() {
	$('#link10').attr('href', 'http://automobilangebot.de/fileadmin/site/template/htm/gwsuche.htm');
	$('#link10, #fzgRotationBox a').fancybox({
		width: 700,
		height: 720,
		scrolling: 'no',
		titleShow: false
	});
});

$('#tooltip').live('mouseenter', function() {
	$('#tooltip a').fancybox({
		width: 700,
		height: 730,
		titleShow: false
	});
});
	

// Extruder
$(document).ready(function() {
	$("#extrMobile").buildMbExtruder({
		position: "left",
		width: 220,
		positionFixed: false,
		top: 20,
		extruderOpacity: .8,
		onExtOpen:function() {},
		onExtContentLoad:function() {},
		onExtClose:function() {}
	});
});
