/**
 * Google Analytics
 */
	var _gaq = _gaq || [];
	_gaq.push(['_setAccount', 'UA-21095285-1']);
	_gaq.push(['_trackPageview']);

// JavaScript Document
$(function() {
	
	/**
	 * Google Analytics
	 */
		// Stap 1: Bestel knop
		$('#bestellen').click(function(){
			_gaq.push(['_trackEvent', 'Bestelproces', 'stap1']);
			_gaq.push(['_trackPageview', '/bestellen/stap1']);
		});
		
		// Stap 2: Kassa knop
		$('#button_checkout').click(function(){
			_gaq.push(['_trackEvent', 'Bestelproces', 'stap2']);
			_gaq.push(['_trackPageview', '/bestellen/stap2']);
		});
		
		// Stap 3: Afrekenen knop
		$('#afrekenen').click(function(){
			if($('#akkoord:checked').length == 1)
			{
				_gaq.push(['_trackEvent', 'Bestelproces', 'stap3']);
				_gaq.push(['_trackPageview', '/bestellen/stap3']);
			}
		});
		
		// Stap 4: Bevestigen knop
		$('#bevestigen').click(function(){
			_gaq.push(['_trackEvent', 'Bestelproces', 'stap4']);
			_gaq.push(['_trackPageview', '/bestellen/stap4']);
		});
		
		// Stap 5: Bedank pagina
		if($('#bedankt').length){
			_gaq.push(['_trackEvent', 'Bestelproces', 'stap5']);
			_gaq.push(['_trackPageview', '/bestellen/stap5']);
		}
	
	/**
	 * Light box
	 */
		$('#product a').lightBox();
		$('.productInfo').lightBox();

	/**
	 * Favorieten IE
	 */
		function favorieten(title, url) {
		   if (document.all) {
			  window.external.AddFavorite(url, title);
		   } else if (window.sidebar) {
			  window.sidebar.addPanel(title, url, "");
		   }
		}
	
	/**
	 * Countdown
	 */
		var flashvars = {
			config_file: "/resources/countdown/countdown_flip_config.php"
		};
		
		var params = {
			menu: "false",
			quality: "high",
			scale: "scale"
		};
		
		var attributes = {
			id: "swf_content",
			name: "swf_content"
		};
		
		swfobject.embedSWF("/resources/countdown/countdown_flip_0days.swf", "flashcontent", "100%", "74", "8.0.0", false, flashvars, params, attributes);

});
