var jQueryScriptOutputted = false;

function initJQuery() {
	//if the jQuery object isn't available
	if (typeof(jQuery) == 'undefined') {
		if (! jQueryScriptOutputted) {
			//only output the script once..
			jQueryScriptOutputted = true;
			//output the script (load it from google api)
			document.write('<scr' + 'ipt type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></scr' + 'ipt>'); 
		}
		setTimeout("initJQuery()", 50);
	} else {
		$(function() {
						$.getScript("http://Cr8tivity.com/js/jQueryCycle.js",function(){
					$('#cr8innerdiv').cycle({
						fx:     'scrollHorz',
						timeout: 6000,
						delay:  -2000,
						next:   '#cr8next', 
						prev:   '#cr8prev',
						pause:  1,
						before: onBefore
					});
				});
			
			//$('#cr8outerdiv').show('slow');
		});
	}
}
initJQuery();
function onBefore(curr, next, opts) { 
			$('#cr8outerdiv').fadeIn('slow');
}
function start_slideshow(){
	$('#cr8innerdiv').cycle({
				fx:     'scrollRight',
				timeout: 6000,
				delay:  -2000,
				pause: 1
		});
}		