/* ---------- Go Up ---------- */
$(document).ready(function() {
$("#rauf a").click(function() {
$("html, body").animate({ scrollTop:0 });
return false;
});
});


/* ---------- Google Analytics ---------- */

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-27919812-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

/* ---------- Cookie Einstellungen ---------- */
$(document).ready(function() {
        // the div that will be hidden/shown
	var panel = $("#panel");
	//the button that will toggle the panel
	var button = $("#slide");
	// do you want the panel to start off collapsed or expanded?
	var initialState = "expanded"; // "expanded" OR "collapsed"
	// the class added when the panel is hidden
	var activeClass = "hidden";
	// the text of the button when the panel's expanded
	var visibleText = "Über Uns";
	// the text of the button when the panel's collapsed
	var hiddenText = "Über Uns";
        //---------------------------
	// don't    edit    below    this    line,<
	// unless you really know what you're doing
	//---------------------------</p>
	if($.cookie("panelState") == undefined) {
		$.cookie("panelState", initialState);
	}
	var state = $.cookie("panelState");
	if(state == "collapsed") {
		panel.hide();
		button.text(hiddenText);
		button.addClass(activeClass);
	}
	button.click(function(){
		if($.cookie("panelState") == "expanded") {
			$.cookie("panelState", "collapsed");
			button.text(hiddenText);
			button.addClass(activeClass);
		} else {
			$.cookie("panelState", "expanded");
			button.text(visibleText);
			button.removeClass(activeClass);
		}
		panel.slideToggle("fast");
		return false;
	});
});
