/***********************************************************************

Author:     Sander Tiekstra
Company:    Tiekstramedia
URL:        http://www.tiekstramedia.nl

***********************************************************************/


if (typeof(window.jQuery) != 'undefined') {

	$(function() {
		
		initNewsTicker();
		initFaq();
		initAs();
		initHr();
		  
	})
		
	
	/*
	 *	SWFObject - News ticker
	 */
	function initNewsTicker () {
		if ( $("#newsTicker").length > 0 ) {
			
			// = SWFObject: Javascript Flash Player detection and embed script
			// http://blog.deconcept.com/swfobject/
			var so = new SWFObject("assets/swf/newsticker.swf", "GEU Nieuwstickker", "180", "30", "6", "#e50003");
			so.addVariable("newsTxt", $("#newsTicker").html());
			so.addVariable("newsHref", $("#newsTicker").attr("href"));
			so.write("newsTicker");
			
		}
	}
	
	
	/*
	 *	init FAQ
	 */
	function initFaq () {
		$("dl.faq dd").hide();
		$("dl.faq dt").wrapInner("<a href='#'></a>").click(function () {
			$(this).next().toggle();
			return false;
	    });
	}
	
	
	/*
	 *	init 'a' behaviour
	 */
	function initAs () {
		$("a[rel='external']").attr({target: "_blank"});
		$("a").focus(function () {
			$(this).blur();
		})	
	}
	
	
	/*
	 *	init 'a' behaviour
	 */
	function initHr () {
		$("hr").wrap("<div class='hr'></div>").hide();
		
		
	}
	
}