
/**
* Switch to the URL of the selected Item in the Dropdown-Menu
*/
function go2url(formEl){
 if (formEl.options[formEl.selectedIndex].value != "none") {
	document.location.href = formEl.options[formEl.selectedIndex].value
 }                       
}

function addBookmark(){

  URL = window.location.href;
  Text = document.title;

  if (window.sidebar)
    {
    // firefox
    window.sidebar.addPanel(Text,URL, "");
    }
  else if(window.opera && window.print)
    {
    // opera
    var elem = document.createElement('a');
    elem.setAttribute('href',URL);
    elem.setAttribute('title',Text);
    elem.setAttribute('rel','sidebar');
    elem.click();
    }
  else if(document.all)
    {
    // ie
    window.external.AddFavorite(URL,Text);
    }
    
   return false;
}

jQuery.noConflict();

jQuery(document).ready(function($) {

	// Uniform
//	$("select, textarea, :submit, :text, :checkbox, :radio, :file").uniform();

	// Anker-Scrolling
	$.localScroll();
	
	// Accordion
	$(".accordion .content-inner-wrapper").hide();
//	$('<img src="fileadmin/templates/images/icons/arrow-down.png" class="arrow" />').appendTo('.accordion h2'); 				   
	$(".accordion h2").click(function(){
		if($(this).is(".active")) {
//			$('.active .arrow.active').attr('src','fileadmin/templates/images/icons/arrow-down.png'); // change the image src of the current ACTIVE image to have an INACTIVE state.
			$(this).toggleClass("active");
			$(this).next(".content-inner-wrapper").slideToggle();
			return false;
		} else {
			$(".accordion .content-inner-wrapper:visible").slideUp("slow"); // close all visible divs with the class of .content
			$(".accordion h2.active").removeClass("active");  // remove the class active from all h1's with the class of .active
			$(this).toggleClass("active");
//			$('.arrow.active').attr('src','fileadmin/templates/images/icons/arrow-down.png'); // change the image src of the current ACTIVE image to have an INACTIVE state.
			$(".accordion .active .arrow").addClass('active');
			$('.accordion .arrow.active').attr('src','fileadmin/templates/images/icons/arrow-up.png'); // change the image src of the new active image to have an active state.
			$(this).next(".content-inner-wrapper").slideToggle();
			return false;
		}
	});

	// Slider
	$('.slider li').eq(0).attr("id", "slider_0");
	$('.slider li').eq(1).attr("id", "slider_1");
	$('.slider li').eq(2).attr("id", "slider_2");
//	$('<a href="#slider_1"><img src="fileadmin/templates/images/icons/arrow-down.png" class="arrow" /></a>').appendTo(".slider");

	// Fullscreen background
	$(function(){
		$.fn.supersized.options = {  
			startwidth: 640,  
			startheight: 480,
			vertical_center: 1,
			slideshow: 0,
			navigation: 0,
			transition: 0, //0-None, 1-Fade, 2-slide top, 3-slide right, 4-slide bottom, 5-slide left
			pause_hover: 0,
			slide_counter: 0,
			slide_captions: 0,
			slide_interval: 0  
		};
        $('#supersize').supersized(); 
    });
	

});

function formatText(index, panel) {
		  return index + "";
}


