jQuery(document).ready(function($) {

	// Image
	$("a.lightbox").fancybox({
		"padding":		30,
		"zoomSpeedIn":	300,
		"zoomSpeedOut":	300,
		"overlayShow":	true,
		"overlayColor":	"#444",
		"titleShow":	false
	});

	// iFrame Content
	$("a.lightbox-iframe").fancybox({
		'zoomSpeedIn': 300,
		'zoomSpeedOut': 300,
		'overlayShow': true,
		'width': 650,
		'height': 480,
		'titleShow': false,
		'autoScale' : true,
		'type': 'iframe'
	});
	
	$("a.faq-link").click(function() {
		$(this).parent().next().slideToggle("normal", function() {
			if ($(this).css("display") != "block") {
				$(this).prev("div").children().children().css("color", "#333333");
			}
			else {
				$(this).prev("div").children().children().css("color", "#f36f18");
			}
		});
		return false;
	});
	$("a.faq-link p").mouseover(function() {
		$(this).css("color", "#f36f18");
		$(this).css("cursor", "pointer");
	});
	$("a.faq-link p").mouseout(function() {
		if ($(this).parent().parent().next().css("display") != "block") {
			$(this).css("color", "#333333");
			$(this).css("cursor", "auto");
		}
	});

	jQuery(window).bind("load", function() {
		jQuery(document).ready(function($) {

			$("div#teaser div.csc-default").fadeIn(1000);

			var img_sources = [];
				$( "div.fce-crossslide-element img").each(
				function() {
					img_sources.push({src: $(this).attr("src")});
				}
			);

			$("div.fce-crossslide-container").fadeIn("slow", function() {
				$(this).crossSlide({
					sleep: 5,
					fade: 2
				}, img_sources);
			});

		});
	});
});

