/* Author: 
	
*/

jQuery(document).ready(function($) {
	
	var $headerImage = $("#headerImage");
	if ($headerImage.length > 0 && $headerImage.find("img").length > 1) {
		$headerImage.cycle('fade');
	}
	
	if ($headerImage.find("img").length == 0) {
		$headerImage.remove();
	}
	
	var targetBlankLinks = $("a.target-blank");
	
	if (targetBlankLinks.length > 0) {
		targetBlankLinks.attr("target","_blank");
	}
	
	var $topTopLink = $("#toTop");
	if ($topTopLink.length > 0) {
		
		$topTopLink.click(function(){
			$('html, body').animate({scrollTop:0}, 2000);
			return false;
		});
		
	}
	
	if ($("#fbDialog").length > 0) {
	
		$("#fbDialog").dialog({
			closeText: "Schließen",
			draggable: false,
			resizable: false,
			//modal: true,
			title: "Facebook",
			show: 'slide'
		});
	}
});
