
// JAVASCRIPT BY THOMAS EHRAT
// LAST EDIT ON 10/29/2006 820 684


// WINDOW OPEN
// popup Window - thanks to forss, very nice script, indeed.
function popupMaster(sURL, iWidth, iHeight) { 
	posLeft = (screen.width - iWidth)/2; posTop = (screen.height - iHeight)/2; 
	hPopup = window.open(sURL, 'EDIT'+Math.round(Math.random() * 10000), 'left='+posLeft+',top='+posTop+',width=' + iWidth + ',height=' + iHeight + ',resizable=no,scrollbars=0'); 
	hPopup.moveTo((screen.width - iWidth)/2, (screen.height - iHeight)/2);
	hPopup.focus(); 
}

function popupMasterScroll(sURL, iWidth, iHeight) { 
	posLeft = (screen.width - iWidth)/2; posTop = (screen.height - iHeight)/2; 
	hPopup = window.open(sURL, 'EDIT'+Math.round(Math.random() * 10000), 'left='+posLeft+',top='+posTop+',width=' + iWidth + ',height=' + iHeight + ',resizable=no,scrollbars=1'); 
	hPopup.moveTo((screen.width - iWidth)/2, (screen.height - iHeight)/2);
	hPopup.focus(); 
}


/* Div's auf Teamseite einblenden */
$(document).ready(function(){        
	$("#gregDiv").click(function(event){
		$("#gregDet").slideToggle("slow");
	});
	
	$("#vincentDiv").click(function(event){
		$("#vincentDet").slideToggle("slow");
	});	
	
	$("#andriDiv").click(function(event){
		$("#andriDet").slideToggle("slow");
	});	
	
	$("#estebanDiv").click(function(event){
		$("#estebanDet").slideToggle("slow");
	});	
	
	$("#fabianvDiv").click(function(event){
		$("#fabianvDet").slideToggle("slow");
	});
	
	$("#patrikDiv").click(function(event){
		$("#patrikDet").slideToggle("slow");
	});
	
	$("#evelineDiv").click(function(event){
		$("#evelineDet").slideToggle("slow");
	});
	
	$("#reneDiv").click(function(event){
		$("#reneDet").slideToggle("slow");
	});
	
	$("#daniDiv").click(function(event){
		$("#daniDet").slideToggle("slow");
	});	
	
	$("#leslieDiv").click(function(event){
		$("#leslieDet").slideToggle("slow");

	});	
	
	
	$("#thomaskDiv").click(function(event){
		$("#thomaskDet").slideToggle("slow");

	});	
	$("#beniDiv").click(function(event){
		$("#beniDet").slideToggle("slow");

	});
	
});


/* Auf Teamseite Text toggeln */
$(document).ready(function(){
$("a.moreDet").click(function () {
      $(this).toggleClass("moreDetactive");
 });   
$("a.moreDet").toggle(
  function () {
    $(this).find("span").text("schliessen");
  },
  function () {
    $(this).find("span").text("anzeigen");
  });

});

/* Auf Teamseite Bilder Sliden */
$(document).ready(function(){
$(function() {

    $("#picSliderGreg").cycle({
        fx:      'scrollHorz',
        speed:    500,
		timeout:  0,
        prev:    'span.prev',
        next:    'span.next',
       
    });
	
	 $("#picSliderDani").cycle({
        fx:      'scrollHorz',
        speed:    500,
		timeout:  0,
        prev:    'span.prev',
        next:    'span.next',
       
    });
	 
	 $("#picSliderLeslie").cycle({
        fx:      'scrollHorz',
        speed:    500,
		timeout:  0,
        prev:    'span.prev',
        next:    'span.next',
       
    });
	 $("#picSliderBeni").cycle({
        fx:      'scrollHorz',
        speed:    500,
		timeout:  0,
        prev:    'span.prev',
        next:    'span.next',
       
    });
    
});
});

/*******

	***	Anchor Slider by Cedric Dugas   ***
	*** Http://www.position-absolute.com ***
	
	Never have an anchor jumping your content, slide it.

	Don't forget to put an id to your anchor !
	You can use and modify this script for any project you want, but please leave this comment as credit.
	
*****/
		
$(document).ready(function() {
	$("a.anchorLink").anchorAnimate()
});

jQuery.fn.anchorAnimate = function(settings) {

 	settings = jQuery.extend({
		speed : 1100
	}, settings);	
	
	return this.each(function(){
		var caller = this
		$(caller).click(function (event) {	
			event.preventDefault()
			var locationHref = window.location.href
			var elementClick = $(caller).attr("href")
			
			var destination = $(elementClick).offset().top;
			$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination}, settings.speed, function() {
				window.location.hash = elementClick
			});
		  	return false;
		})
	})
}