var teaserArray = ["01.jpg", "02.jpg", "03.jpg", "04.jpg", "05.jpg", "06.jpg", "07.jpg", "08.jpg"];
var pathToImages = "static/img/header/";
var currentImage = 0;

function changeHeader() 
{
	currentImage = ( currentImage < teaserArray.length - 1) ? currentImage + 1 : 0; 
	
	$("#teaser").ImageSwitch({NewImage:pathToImages + teaserArray[currentImage]});
	
};
var teaserInterval = setInterval(changeHeader, 5000);

var win=null;
function NewWindow(mypage,myname,w,h,pos,infocus){
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=100;mytop=100}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";win=window.open(mypage,myname,settings);
win.focus();}

$(document).ready(function(){
	
	$(".column .accordion h2").click(function()
	{
		
		if ( $(this).hasClass("active") )
		{
			$(this).toggleClass("active").next("div").slideToggle("fast");
		}
		else
		{
			$(".column .accordion h2.active").toggleClass("active").next("div").slideToggle("fast");
			$(this).toggleClass("active").next("div").slideToggle("fast");
		}
	});
});
