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() {
			$('#cr8innerdiv').append('<div><img src="http://ny-image0.etsy.com/il_170x135.27379436.jpg" width="150"  /><br/><strong>Price:</strong>$25.00&nbsp;&nbsp;&nbsp; <a target="_blank" style="color:#990000;" href="http://www.etsy.com/add_to_cart.php?listing_id=11947202">Buy</a><span style="margin-top:5px; font-size:10px;line-height:11px;"><br />Lined Green Journal...</span> <br /><a target="_blank" style="color:#990000;" href="http://www.etsy.com/view_listing.php?listing_id=11947202&ref=Cr8tivity_widget">[ more info ]</a></div> ');
$('#cr8innerdiv').append('<div><img src="http://ny-image1.etsy.com/il_170x135.116265425.jpg" width="150"  /><br/><strong>Price:</strong>$8.99&nbsp;&nbsp;&nbsp; <a target="_blank" style="color:#990000;" href="http://www.etsy.com/add_to_cart.php?listing_id=38598044">Buy</a><span style="margin-top:5px; font-size:10px;line-height:11px;"><br />Cowligator Leather Matchbook Notepad, refillable...</span> <br /><a target="_blank" style="color:#990000;" href="http://www.etsy.com/view_listing.php?listing_id=38598044&ref=Cr8tivity_widget">[ more info ]</a></div> ');
$('#cr8innerdiv').append('<div><img src="http://ny-image3.etsy.com/il_170x135.15708939.jpg" width="150"  /><br/><strong>Price:</strong>$24.99&nbsp;&nbsp;&nbsp; <a target="_blank" style="color:#990000;" href="http://www.etsy.com/add_to_cart.php?listing_id=8386752">Buy</a><span style="margin-top:5px; font-size:10px;line-height:11px;"><br />Faux Leather Scroll Pendant...</span> <br /><a target="_blank" style="color:#990000;" href="http://www.etsy.com/view_listing.php?listing_id=8386752&ref=Cr8tivity_widget">[ more info ]</a></div> ');
$('#cr8innerdiv').append('<div><img src="http://ny-image1.etsy.com/il_170x135.116395229.jpg" width="150"  /><br/><strong>Price:</strong>$64.99&nbsp;&nbsp;&nbsp; <a target="_blank" style="color:#990000;" href="http://www.etsy.com/add_to_cart.php?listing_id=38403981">Buy</a><span style="margin-top:5px; font-size:10px;line-height:11px;"><br />Steampunk Pamphlet, Time Respite Leather Journal...</span> <br /><a target="_blank" style="color:#990000;" href="http://www.etsy.com/view_listing.php?listing_id=38403981&ref=Cr8tivity_widget">[ more info ]</a></div> ');
$('#cr8innerdiv').append('<div><img src="http://ny-image1.etsy.com/il_170x135.118592561.jpg" width="150"  /><br/><strong>Price:</strong>$18.50&nbsp;&nbsp;&nbsp; <a target="_blank" style="color:#990000;" href="http://www.etsy.com/add_to_cart.php?listing_id=39283540">Buy</a><span style="margin-top:5px; font-size:10px;line-height:11px;"><br />Steampunk Pamphlet, Leather...</span> <br /><a target="_blank" style="color:#990000;" href="http://www.etsy.com/view_listing.php?listing_id=39283540&ref=Cr8tivity_widget">[ more info ]</a></div> ');
$('#cr8innerdiv').append('<div><img src="http://ny-image1.etsy.com/il_170x135.114328977.jpg" width="150"  /><br/><strong>Price:</strong>$15.75&nbsp;&nbsp;&nbsp; <a target="_blank" style="color:#990000;" href="http://www.etsy.com/add_to_cart.php?listing_id=37301769">Buy</a><span style="margin-top:5px; font-size:10px;line-height:11px;"><br />Nautilus, Leather Matchbook Pad, Refillable...</span> <br /><a target="_blank" style="color:#990000;" href="http://www.etsy.com/view_listing.php?listing_id=37301769&ref=Cr8tivity_widget">[ more info ]</a></div> ');
$('#cr8innerdiv').append('<div><img src="http://ny-image1.etsy.com/il_170x135.114147577.jpg" width="150"  /><br/><strong>Price:</strong>$7.99&nbsp;&nbsp;&nbsp; <a target="_blank" style="color:#990000;" href="http://www.etsy.com/add_to_cart.php?listing_id=37968127">Buy</a><span style="margin-top:5px; font-size:10px;line-height:11px;"><br />Cow Leather Matchbook Notepad, Refillable...</span> <br /><a target="_blank" style="color:#990000;" href="http://www.etsy.com/view_listing.php?listing_id=37968127&ref=Cr8tivity_widget">[ more info ]</a></div> ');
$('#cr8innerdiv').append('<div><img src="http://ny-image0.etsy.com/il_170x135.114213500.jpg" width="150"  /><br/><strong>Price:</strong>$7.99&nbsp;&nbsp;&nbsp; <a target="_blank" style="color:#990000;" href="http://www.etsy.com/add_to_cart.php?listing_id=37995579">Buy</a><span style="margin-top:5px; font-size:10px;line-height:11px;"><br />Duck Leather Matchbook Notepad, Refillable...</span> <br /><a target="_blank" style="color:#990000;" href="http://www.etsy.com/view_listing.php?listing_id=37995579&ref=Cr8tivity_widget">[ more info ]</a></div> ');
$('#cr8innerdiv').append('<div><img src="http://ny-image3.etsy.com/il_170x135.120015927.jpg" width="150"  /><br/><strong>Price:</strong>$7.99&nbsp;&nbsp;&nbsp; <a target="_blank" style="color:#990000;" href="http://www.etsy.com/add_to_cart.php?listing_id=39701458">Buy</a><span style="margin-top:5px; font-size:10px;line-height:11px;"><br />Brown Leather Mini Notepad, refillable...</span> <br /><a target="_blank" style="color:#990000;" href="http://www.etsy.com/view_listing.php?listing_id=39701458&ref=Cr8tivity_widget">[ more info ]</a></div> ');
$('#cr8innerdiv').append('<div><img src="http://ny-image3.etsy.com/il_170x135.120319971.jpg" width="150"  /><br/><strong>Price:</strong>$84.99&nbsp;&nbsp;&nbsp; <a target="_blank" style="color:#990000;" href="http://www.etsy.com/add_to_cart.php?listing_id=39790221">Buy</a><span style="margin-top:5px; font-size:10px;line-height:11px;"><br />Leather Journal Sketchbook, Old Glory...</span> <br /><a target="_blank" style="color:#990000;" href="http://www.etsy.com/view_listing.php?listing_id=39790221&ref=Cr8tivity_widget">[ more info ]</a></div> ');
			$.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
		});
}		