// CurvyCorners
addEvent(window, 'load', initBCQJ);

// JQuery
jQuery(document).ready(function(){
	 /*
	  * RoudCorner generatoren:
	  * 	http://www.roundedcornr.com/rc5.php
	  * 	http://www.generateit.net/rounded-corner/index.htm?r=8&fg=DFE0E2&f=jpg&w=300&bg=4E5559&h=200&bc=000000&aa=1&bw=1&submit=Generate+It
	  * 	http://wigflip.com/cornershop/
	  * 	http://spiffybox.com/
	  *
	  *		Button Generator:
	  *			http://www.iwebtoolsonline.com/html-and-css-rounded-corner-button-generator
	  *
	  *		JQ RoundCornders Demo:
	  *			http://www.malsup.com/jquery/corner/
	  * 
	  * Techniken:
	  * 	http://www.cssjuice.com/25-rounded-corners-techniques-with-css/
	  *
	  *	Sonstiges: 
	  *		Async laden von JQPlugins: http://hublog.hubmed.org/archives/001816.html (funkt nur mit timer...)
	  */
	
	//alert("Init JQ");

	//jQuery("a").click(function(event) { alert("Thanks for visiting!"); });
	   
	// Sample f. JQ Round Corners (Backgroundcolor + Border muss gesetzt sein)
	// jQuery('#navi-sub').corner();
	  
	  //csc-header-n2
	  initJQToggle();
	  initCycle();
	  jQuery("#banner-slideshow").css("visibility","visible");
});

/* 
 * Andere Frameworks initialisieren
 */
function initBCQJ() {
	//alert("Init other frameworks...");
	//initCurvyCorners();
}

function initCurvyCorners() {
  var settings = {
    tl: { radius: 8 },
    tr: { radius: 8 },
    bl: { radius: 8 },
    br: { radius: 8 },
    antiAlias: true
  	}
  
  curvyCorners(settings, ".roundcorners");
  curvyCorners(settings, ".csc-frame-frame1");
  curvyCorners(settings, ".csc-frame-frame2");
}

function initJQToggle() {
	//Hide (Collapse) the toggle containers on load
	jQuery(".csc-frame-frame1 h1").parent().next().hide(); 

	//Switch the "Open" and "Close" state per click
	jQuery(".csc-frame-frame1 h1").toggle(function(){
		jQuery(this).addClass("toggleopen");
		}, function () {
		jQuery(this).removeClass("toggleopen");
	});

	//Slide up and down on click
	jQuery(".csc-frame-frame1 h1").click(function(){
		jQuery(this).parent().next().slideToggle();
	});
  }

/*
 * http://medienfreunde.com/lab/innerfade/
 */
function initCycle() { 
	jQuery('#slideshow').cycle({ 
	    fx:    'fade', 
	    speed:  2500 
	 });
}

 
