$(function() {
	$("div.scrollable").scrollable({ keyboard: false });
	
	$.localScroll.defaults.axis = 'y';
	$.localScroll({duration:800});
	
	$(".offerimage img").reflect({opacity: 0.5, height: 0.5});
	
	$(".multiple-tabs").tabs("div.multiple-panes > div", { effect: 'fade'});
	
	//Switch the "Open" and "Close" state per click
	$("a.trigger").toggle(function(){
		$(this).addClass("activetrigger");
		}, function () {
		$(this).removeClass("activetrigger");
	});

	//Slide up and down on click
	$("a#triggeradress").click(function(){
		$("#adresscontainer").slideToggle("slow");
	});
	$("a#triggerprofil").click(function(){
		$("#profilcontainer").slideToggle("slow");
	});
	$("a#triggerorder").click(function(){
		$("#ordercontainer").slideToggle("slow");
	});
	$("a#triggersocial").click(function(){
		$("#socialcontainer").slideToggle("slow");
	});
	

	$(".open-empfehlung").click(function(){
    	$("#empfehlung-schreiben").slideToggle("slow");
	});
	$(".open-bewertung").click(function(){
    	$("#bewertung-schreiben").slideToggle("slow");
	});
	
	//Switch the "Open" and "Close" state per click
	$("a.greybutton").toggle(function(){
		$(this).addClass("activetriggergreybutton");
		}, function () {
		$(this).removeClass("activetriggergreybutton");
	});
	
	$(".formbox").click(function() { 
   		$(".mod-rounded").removeClass("mod-rounded-light");
		$(this).addClass("mod-rounded-light");
	 });
	

	if ($("a.iframe").length > 0) {
		$("a.iframe").fancybox({
			'autoDimensions': true,
			'hideOnContentClick': false,
			'overlayColor': '#000',
			'overlayOpacity': 0.7,
			'frameWidth': 740,
			'frameHeight': 480
		});
	}

	 
});

Cufon.replace('.offertext h1, .offertext p');



