	$(document).ready( function(){
		
		/*$(".faded").backgroundCanvas(); 
		$(".contBackground").backgroundCanvas();
		$(".contItemBackground").backgroundCanvas();
		$(".modFade").backgroundCanvas();
		$(".contBackground").fadeTo(0, 1);
		$(".contItemBackground").fadeTo(0, 1);
		$(".faded").fadeTo(0, 1);
		$(".search").fadeTo(0, 0.7);
		$(".modFade").fadeTo(0, 1);		*/	
			
		$("div#expander1").slideToggle("slow")
		$("p#expanderA").click(function () {
		  	$("div#expander2").slideUp("slow");
		  	$("div#expander1").slideToggle("slow");
		  
		});
		$("div#expander2").slideToggle("slow")
		$("p#expanderB").click(function () {
			$("div#expander1").slideUp("slow");							 
		  	$("div#expander2").slideToggle("slow");
		});
		
		
		
		
		$(".sitemapBtn").toggle(
      function () {
        $(this).addClass("siteOn");

      },
      function () {
        $(this).removeClass("siteOn");

		  }
		);
		
		

		
		
		$(".sitemapBtn").click(
	  		function () {
				$("div.sitemap").slideToggle("slow");
	  		}
		);
		
		
		$('#messageWrap').jqm({ajax: 'content/forms/messageSuccess.php', trigger: 'a.messageSuccess'});
		$('#formWrap').jqm({ajax: 'content/forms/login.php', trigger: 'a.loginLink'});
		
		$("ul.entryWrap li.entry").children("p").slideUp("fast");

		$("ul.entryWrap li.entry").click(			 
				function () {
						$("ul.entryWrap li.entry").removeClass("on");
						$("ul.entryWrap li.entry").children("p").slideUp("fast");
						jQuery(this).children("p").slideToggle("slow");
						jQuery(this).toggleClass("on");
					});
			});	











/*
$(window).load(function () 
	{ 
		DrawBackground();

		$(".gsc-search-button").click(function()
				{
						setInterval ( "DrawBackground()", 500 );
				});
	});

	
	var drawBackground = false;
	$(window).load(function()
	{
	drawBackground = true;
	window.setTimeout(function()
	{
	if (drawBackground)
	{
	drawBackground = false;
	DrawBackground();
	}
	}, 50);
	});
	
	//$(window).load(function () { DrawBackground(); });
	$(window).resize(function() { DrawBackground(); });

	
	function DrawBackground()
	{
	$("div.faded").backgroundCanvasPaint(BackgroundPaintFkt);
	//$("div.contBackground").backgroundCanvasPaint(BackgroundPaintFktBody);
	//$("div.contItem").backgroundCanvasPaint(BackgroundPaintFktContItem);
	$("div.modFade").backgroundCanvasPaint(BackgroundPaintFktMod); 

	}
	function BackgroundPaintFkt(context, width, height, canvas, $canvas, $canvasDiv, $content, $element ) 
	{
		var options = {x:0, height: height, width: width, radius:8,  border: 0 };
		var backgroundGradient = context.createLinearGradient(0, 0, 0, height);
		backgroundGradient.addColorStop(0 ,'#42B4FF');
		backgroundGradient.addColorStop(1, '#007DC9');
		context.fillStyle = "#FFF";
		
		// Draw the blue border rectangle 
		$.canvasPaint.roundedRect(context,options);
		
		// Draw the gradient filled inner rectangle
		options.border = 0;
    	options.radiusBL=0;
    	options.radiusBR=0;
		context.fillStyle = backgroundGradient; 
		$.canvasPaint.roundedRect(context,options);
	}
	function BackgroundPaintFktBody(context, width, height, canvas, $canvas, $canvasDiv, $content, $element ) 
	{
		var options = {x:0, height: height, width: width, radius:8,  border: 0 };
		var backgroundGradient = context.createLinearGradient(0, 0, 0, height);
		backgroundGradient.addColorStop(1 ,'#42B4FF');
		backgroundGradient.addColorStop(0.3, '#007DC9');
		backgroundGradient.addColorStop(0.03, '#005F9E');
		backgroundGradient.addColorStop(0 ,'#0065A8');
		
		context.fillStyle = "#FFF";
		
		// Draw the blue border rectangle 
		$.canvasPaint.roundedRect(context,options);
		
		// Draw the gradient filled inner rectangle
		options.border = 0;
    	options.radiusTL=0;
    	options.radiusTR=0;
		context.fillStyle = backgroundGradient; 
		$.canvasPaint.roundedRect(context,options);
	}
	
	function BackgroundPaintFktContItem(context, width, height, canvas, $canvas, $canvasDiv, $content, $element ) 
	{
		var options = {x:0, height: height, width: width, radius:8,  border: 0 };
		var backgroundGradient = context.createLinearGradient(0, 0, 0, height);
		backgroundGradient.addColorStop(0.02, '#DDD');
		context.fillStyle = "#FFF";
		
		// Draw the blue border rectangle 
		$.canvasPaint.roundedRect(context,options);
		
		// Draw the gradient filled inner rectangle
		options.border = 0;
    	options.radiusTL=0;
    	options.radiusTR=0;
		options.radiusBL=0;
    	options.radiusBR=0;
		context.fillStyle = backgroundGradient; 
		$.canvasPaint.roundedRect(context,options);
	}
	
	function BackgroundPaintFktMod(context, width, height, canvas, $canvas, $canvasDiv, $content, $element ) 
	{
		var options = {x:0, height: height, width: width, radius:0,  border: 0 };
		var backgroundGradient = context.createLinearGradient(0, 0, 0, height);
		backgroundGradient.addColorStop(0 ,'#CCC');
		backgroundGradient.addColorStop(.25, '#FFF');
		context.fillStyle = "#FFF";
		
		// Draw the blue border rectangle 
		$.canvasPaint.roundedRect(context,options);
		
		// Draw the gradient filled inner rectangle
		
		context.fillStyle = backgroundGradient; 
		$.canvasPaint.roundedRect(context,options);

	}
	
	*/
	
	var params = {wmode:"transparent"};
	var flashvars = { };
	var attribtues = false;
    swfobject.registerObject("swf/flashPlayer.swf", "mastFlash", "626", "190", "9.0.0","swf/expressInstall.swf", flashvars, params, attribtues);


	function NewWindow(URL)
	{
		var internalName = 'Raydan';
		var internalArgs = 'scrollbars,resizable,toolbar=no,status=no,location=no,width=770,height=480,left=50,top=50';
		var popupWin = window.open(URL,internalName,internalArgs);
		
		if(popupWin)
		{
			popupWin.focus();
			return false;
		}
		else if(confirm('Popup blocker detected. Do you wish to navigate away from this page to view the page?'))
			window.location = URL;
		else
			return false;

	} 