jQuery.extend({
   getScript: function(url, callback) {
      var head = document.getElementsByTagName("head")[0];
      var script = document.createElement("script");
      script.src = url;

      // Handle Script loading
      {
         var done = false;

         // Attach handlers for all browsers
         script.onload = script.onreadystatechange = function(){
            if ( !done && (!this.readyState ||
                  this.readyState == "loaded" || this.readyState == "complete") ) {
               done = true;
               if (callback)
                  callback();

               // Handle memory leak in IE
               script.onload = script.onreadystatechange = null;
            }
         };
      }

      head.appendChild(script);

      // We handle everything using the script element injection
      return undefined;
   },
});
	
	$(document).ready( function() {
/*
		$('a.link').click(function () {
		  $("#maincol").html('<div class="loading"> loading... </div>');
		  $("#maincol").load($(this).attr('href'),function(){
		  		$('a.links').click(function () {
				  $("#maincol").html('<div class="loading"> loading... </div>');
				  $("#maincol").load($(this).attr('href'));
				  return false;
				});	

			$('ul#have').accordion();	
			$('ul#not').accordion();	
			$('ul#addtional').accordion();
			$('ul#ffeature').accordion();
			$('ul#fwidget').accordion();
			$('ul#fmodule').accordion();
			$('ul#faq').accordion();
		  });
		  return false;
		});		
*/	
		$('#slideshow ul').innerfade({
			speed: 1000,
			timeout: 10000,
			type: 'sequence',
			containerheight: '204px'
		});
		$('#news').innerfade({
			animationtype: 'slide',
			speed: 750,
			timeout: 10000,
			type: 'random',
			containerheight: '1em'
		});
	

	  $('a.link').ajaxify({
		   target: '#maincol',
		   tagToload: '#maincol',
		   loadHash:'attr:rel',
		   loading_fn:function(){},
           onComplete:function(){
			 $.getScript('http://www.eizy.net/js/site.js');
	        }
		});

		 $.getScript('http://www.eizy.net/js/site.js');
		
	});





			var scrollSpeed = 100; 		// Speed in milliseconds
			var step = 1; 				// How many pixels to move per step
			var current = 0;			// The current pixel row
			var imageWidth = 2247;		// Background image width
//			var headerWidth = $('#clouds').width();
			var headerWidth = screen.width;
		//	var headerWidth = 1280;		// How wide the header is.
			
			//The pixel row where to start a new loop
			var restartPosition = -(imageWidth - headerWidth);
			
			function scrollBg(){
				//Go to next pixel row.
				current -= step;
				
				//If at the end of the image, then go to the top.
				if (current == restartPosition){
					current = 0;
				}
				
				//Set the CSS of the header.
				$('#clouds').css("background-position",current+"px 0");
			}
			
			//Calls the scrolling function repeatedly
			var init = setInterval("scrollBg()", scrollSpeed);






