var $jq = jQuery.noConflict();

$jq(document).ready(function() {
	
    //$jq('#search').attr('value', 'jQuery installiert!');
    
	initDefaultToggle();
    initFAQToggle();
    addFlashPlayerLinkToVideo();
    initTheRotator();
  })
  
function initFAQToggle() {
	//Hide (Collapse) the toggle containers on load
	$jq("#faq dd").hide(); 

	//Switch the "Open" and "Close" state per click
	$jq("#faq dt").toggle(function() {
		$jq(this).addClass("toggleopen");
		}, function () {
		$jq(this).removeClass("toggleopen");
	});

	//Slide up and down on click
	$jq("#faq dt").click(function(){
		$jq(this).next("dd").slideToggle();
	});
	
}

function initDefaultToggle() {
	//Hide (Collapse) the toggle containers on load
	$jq(".toggle_container").hide(); 
	
	//Switch the "Open" and "Close" state per click
	$jq(".trigger").toggle(function(){
		$jq(this).addClass("active");
		}, function () {
			$jq(this).removeClass("active");
	});

	//Slide up and down on click
	$jq(".trigger").click(function(){
		$jq(this).next(".toggle_container").slideToggle("fast");
	});
	
}

function addFlashPlayerLinkToVideo() {
	$jq(".video").append('<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>');
}
