<?xml version="1.0" encoding="UTF-8"?>
<Module>
<!--
Copyright 2008 lassytouton@gmail.com
-->
<ModulePrefs
  title="Cheeky Quote"
  title_url="http://sites.google.com/site/lassytouton/cheekyquote/"
  description="Get random funny quotes every day with Cheeky Quote ... updates on every page visit. Click the 'author quotes' and 'random quotes' links for more humor, wit and sarcasm from a variety of famous personalities."
  thumbnail="http://hosting.gmodules.com/ig/gadgets/file/112764733758979090903/cheekyquote-thumbnail.png"
  screenshot="http://hosting.gmodules.com/ig/gadgets/file/112764733758979090903/cheekyquote-screenshot.png"
  directory_title="Funny Quotes, Comedy and Jokes"
  category="lifestyle"
  category2="funandgames"
  width="320"
  height="200"
  scrolling="true"
  author="lassytouton"
  author_email="lassytouton@gmail.com"
  author_photo="http://hosting.gmodules.com/ig/gadgets/file/112764733758979090903/lassytouton.png"
  author_aboutme="God put me on this earth to accomplish a certain number of things. Right now I am so far behind that I will never die."
  author_link="http://www.lassytoutons.com/google/cheekyquote/randomquotes/"
  author_quote="If I agreed with you we'd both be wrong. (Anonymous)">
</ModulePrefs>

<Content type="html">
<![CDATA[

<!--
Cheeky Quote. You may also want to check out these related items: Funny, Quote, Quotes, Joke, Jokes, Daily, Day, Humor, Humour, Famous, Comedy

Copyright 2008 lassytouton@gmail.com
-->

<div id="cheekyquote_content"></div>
<script type="text/javascript">

function getGadgetHost()
{
  var gadgetHost = "iGoogle";

  try
  {
    if (location.hostname.search(/blogger/i) != -1)
    {
      gadgetHost = "blogger";
    }
  }
  catch(e)
  {
    gadgetHost = "iGoogle";
  }

  return gadgetHost;
}

function update(response)
{
  var regex = new RegExp("(img |\\()src=[\"'](.*?)[\"']", "g");

  var match;

  // use an associative array to eliminate duplicate image filenames
  var images = new Array();

  while ((match = regex.exec(response)) != null)
  {
    if (match.length > 2)
    {
      images[match[2]] = null;
    }
  }

  var cachedResponse = response;

  for (var image in images)
  {
    cachedResponse = cachedResponse.replace(image, _IG_GetCachedUrl(image));
  }

  _gel("cheekyquote_content").innerHTML = cachedResponse;
}

var contentURL = "http://www.lassytoutons.com/google/cheekyquote/update.php";

contentURL += "?randomize=" + Math.floor(Math.random() * 100).toString();

contentURL += "&consumer=google";

contentURL += "&analyticsCode=UA-3354729-2";

contentURL += "&gadgetHost=" + getGadgetHost();

// Fetch fresh content every half hour
_IG_FetchContent(contentURL, update, { refreshInterval: (60 * 30) });

</script>
<!-- Google Analytics -->
<script type="text/javascript">

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

</script>
<script type="text/javascript">

var pageTracker = null;

try
{
  pageTracker = _gat._getTracker("UA-3354729-2");
}
catch(err)
{
  pageTracker = null;
}

function trackPageview(page)
{
  if (pageTracker)
  {
    try
    {
      pageTracker._trackPageview(page);
    }
    catch(err)
    {
    }
  }
}

trackPageview("/cheekyquote");

</script>
]]>
</Content>
</Module>

