<?xml version="1.0" encoding="UTF-8"?>
<Module>
	<ModulePrefs title="GoComics.com"
				 title_url="http://www.gocomics.com"
				 author="Universal Uclick"
				 author_email="universaluclick@gmail.com"
				 description="Get a Laugh each and everyday with the new updated GoComics gadget. It's all the comics you know and love plus the next generation of great comic strips.  Including: Calvin and Hobbes, Peanuts, Garfield, Pearls Before Swine, Big Nate, Non Sequitur, FoxTrot, Get Fuzzy, Luann, Lio, Marmaduke, Ziggy and much more."
				 screenshot="http://images.gocomics.com/images/google/gadget_screenshot.jpg"
				 thumbnail="http://images.gocomics.com/images/google/gocomics_logo.png">
		<Require feature="setprefs"/>
		<Require feature="views"/>
		<Require feature="dynamic-height"/>
	</ModulePrefs>
	<UserPref name="mycomics" datatype="hidden" default_value="" />
	<UserPref name="myfavorites" datatype="hidden" default_value="" />
	
	
	<!-- H O M E -->
	<Content type="html" view="home,profile"><![CDATA[
		
		
			<style type="text/css">html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline; }

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block; }

body {
  line-height: 1; }

ol, ul {
  list-style: none; }

blockquote, q {
  quotes: none; }

blockquote:before, blockquote:after,
q:before, q:after {
  content: '';
  content: none; }

table {
  border-collapse: collapse;
  border-spacing: 0; }
</style>
		
			<style type="text/css">body {
  color: #474747;
  font-family: Helvetica, Arial, Verdana, sans-serif;
  font-size: 12px; }

a {
  text-decoration: none;
  color: #4a91c1; }

a:active {
  color: #4A91C1; }

a:visited {
  color: #4a91c1; }

a.disabled {
  color: #CCC;
  cursor: pointer; }

.button, .big-button, .little-button {
  border-radius: 5px;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -khtml-border-radius: 5px;
  color: #FFF;
  font-weight: bold;
  text-align: center; }

.button:visited, .big-button:visited, .little-button:visited {
  color: #FFF; }

.big-button {
  background: #38a3cd;
  background: -webkit-gradient(linear, left top, left bottom, from(#8acae1), to(#38a3cd));
  background: -moz-linear-gradient(top, #8acae1, #38a3cd);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#8acae1', endColorstr='#38a3cd');
  width: 75px;
  display: block;
  padding: 6px 10px; }

.big-button:hover {
  background: #8acae1;
  background: -webkit-gradient(linear, left top, left bottom, from(#38a3cd), to(#8acae1));
  background: -moz-linear-gradient(top, #38a3cd, #8acae1);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#38a3cd', endColorstr='#8acae1'); }

.little-button {
  background: #7fac48;
  background: -webkit-gradient(linear, left top, left bottom, from(#5e8f1e), to(#7fac48));
  background: -moz-linear-gradient(top, #5e8f1e, #7fac48);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5e8f1e', endColorstr='#7fac48');
  display: inline-block;
  width: 150px;
  padding: 4px 8px; }

.little-button:hover {
  background: #85B334; }

.clear {
  clear: both; }

input, textarea {
  background: url("http://assets.gocomics.com/images/bg-input.gif") no-repeat;
  border: 1px solid darkGray;
  padding: 7px;
  font: 12px/12px Arial, Tahoma, serif; }

html {
  width: 100%; }

body {
  width: 100%; }

#home {
  width: 100%; }

#home-container {
  display: block;
  margin: 2px; }
  #home-container ul {
    list-style-type: none;
    text-align: center;
    width: 100%; }
  #home-container ul.feature-navigation {
    padding: 5px 0px; }
    #home-container ul.feature-navigation li {
      width: auto; }
      #home-container ul.feature-navigation li span {
        display: block;
        line-height: 16px;
        height: 19px;
        width: 21px; }
      #home-container ul.feature-navigation li span {
        cursor: pointer; }
      #home-container ul.feature-navigation li span#prev_comic {
        background: url("http://images.gocomics.com/images/google/gadget/sprite_feature.gif") no-repeat -21px -19px;
        width: 21px;
        float: left; }
        #home-container ul.feature-navigation li span#prev_comic:hover {
          background-position: -21px 0px; }
      #home-container ul.feature-navigation li span#next_comic {
        background: url("http://images.gocomics.com/images/google/gadget/sprite_feature.gif") no-repeat -63px -19px;
        width: 21px;
        float: right; }
        #home-container ul.feature-navigation li span#next_comic:hover {
          background-position: -63px 0px; }
      #home-container ul.feature-navigation li a {
        font-weight: bold;
        display: block;
        line-height: 20px;
        height: 19px;
        width: auto; }
      #home-container ul.feature-navigation li a.prev {
        float: left; }
      #home-container ul.feature-navigation li a.next {
        float: right; }
    #home-container ul.feature-navigation li.home_prev {
      float: left;
      text-align: left; }
    #home-container ul.feature-navigation li.home_next {
      float: right;
      text-align: right; }
  #home-container ul.feature-options {
    padding: 0px 4%;
    margin: 5px 0px 10px 0px;
    width: 90%;
    margin: 10px auto; }
    #home-container ul.feature-options li {
      width: 45%;
      display: inline-block; }
      #home-container ul.feature-options li a {
        text-align: center;
        margin: 0px auto;
        width: 90px; }
        #home-container ul.feature-options li a:active {
          color: #ebebeb; }
      #home-container ul.feature-options li a.big-button {
        padding-left: 0px;
        padding-right: 0px; }

#feature {
  display: block;
  margin: 2px;
  width: 100%; }
  #feature #feature-header {
    width: 100%; }
    #feature #feature-header h1 {
      float: left;
      padding-left: 5px;
      font-size: 16px;
      font-weight: bold; }
      #feature #feature-header h1 span {
        line-height: 18px;
        font-size: 12px; }
    #feature #feature-header span.date {
      float: right;
      text-align: center;
      font-weight: normal;
      line-height: 20px;
      padding-right: 5px; }
  #feature div.feature-image {
    margin: 10px 5px 5px 5px;
    border: 2px solid #FFF;
    text-align: center;
    background: #f2f2f2;
    background: -webkit-gradient(linear, left top, left bottom, from(white), to(#f2f2f2));
    background: -moz-linear-gradient(top, white, #f2f2f2);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='white', endColorstr='#f2f2f2');
    -moz-box-shadow: 0 0 5px 1px #cccccc;
    -webkit-box-shadow: 0 0 5px 1px #cccccc;
    box-shadow: 0 0 5px 1px #cccccc;
    border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -khtml-border-radius: 5px; }
    #feature div.feature-image img {
      margin: 5px auto;
      width: 97%;
      max-width: 360px;
      cursor: pointer; }
</style>
		

		<!--[if IE]>
			<style type="text/css">#feature #feature-header {
  padding-right: 5px; }
#feature div.feature-image {
  margin-top: 5px;
  width: 98%;
  border: 1px solid #AAA; }

ul.feature-options li {
  width: 40%;
  margin: 0px auto;
  text-align: center;
  display: block; }
ul.feature-options li.first {
  float: left; }
ul.feature-options li.second {
  float: right; }
</style>
		<![endif]-->

		<div id="home">
	<div id="home-container">
		<div id="feature"></div>
		<ul class="feature-navigation">
			<li class="home_prev"><span id="prev_comic"></span><a href="#" class="prev"></a></li>
			<li class="home_next"><span id="next_comic"></span><a href="#" class="next"></a></li>
		</ul>
		<div class="clear"></div>
		<ul class="feature-options">
			<li class="first"><a href="#" class="pick-comics big-button">Pick Comics</a></li>
			<li class="second"><a href="#" class="full-size big-button">Full Size</a></li>
		</ul>
		<div class="clear"></div>
	</div>
</div>
<script id="feature-template" type="text/mustache-tmpl">
<div id="feature-header">
	<h1>{{title}} <span class="byline">by {{author}}</span></h1>
	<span class="date">{{display_date}}</span>
	<div class="clear"></div>
	<div class="feature-image">
		<img src="{{image_link}}" alt="{{title}}" />
	</div>
</script>

<!-- ANALYTICS -->
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-273330-36']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

		<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script>
		
		
			<script type="text/javascript">/*
  mustache.js — Logic-less templates in JavaScript

  See http://mustache.github.com/ for more info.
*/

var Mustache = function() {
  var Renderer = function() {};

  Renderer.prototype = {
    otag: "{{",
    ctag: "}}",
    pragmas: {},
    buffer: [],
    pragmas_implemented: {
      "IMPLICIT-ITERATOR": true
    },
    context: {},

    render: function(template, context, partials, in_recursion) {
      // reset buffer & set context
      if(!in_recursion) {
        this.context = context;
        this.buffer = []; // TODO: make this non-lazy
      }

      // fail fast
      if(!this.includes("", template)) {
        if(in_recursion) {
          return template;
        } else {
          this.send(template);
          return;
        }
      }

      template = this.render_pragmas(template);
      var html = this.render_section(template, context, partials);
      if(in_recursion) {
        return this.render_tags(html, context, partials, in_recursion);
      }

      this.render_tags(html, context, partials, in_recursion);
    },

    /*
      Sends parsed lines
    */
    send: function(line) {
      if(line != "") {
        this.buffer.push(line);
      }
    },

    /*
      Looks for %PRAGMAS
    */
    render_pragmas: function(template) {
      // no pragmas
      if(!this.includes("%", template)) {
        return template;
      }

      var that = this;
      var regex = new RegExp(this.otag + "%([\\w-]+) ?([\\w]+=[\\w]+)?" +
            this.ctag);
      return template.replace(regex, function(match, pragma, options) {
        if(!that.pragmas_implemented[pragma]) {
          throw({message: 
            "This implementation of mustache doesn't understand the '" +
            pragma + "' pragma"});
        }
        that.pragmas[pragma] = {};
        if(options) {
          var opts = options.split("=");
          that.pragmas[pragma][opts[0]] = opts[1];
        }
        return "";
        // ignore unknown pragmas silently
      });
    },

    /*
      Tries to find a partial in the curent scope and render it
    */
    render_partial: function(name, context, partials) {
      name = this.trim(name);
      if(!partials || partials[name] === undefined) {
        throw({message: "unknown_partial '" + name + "'"});
      }
      if(typeof(context[name]) != "object") {
        return this.render(partials[name], context, partials, true);
      }
      return this.render(partials[name], context[name], partials, true);
    },

    /*
      Renders inverted (^) and normal (#) sections
    */
    render_section: function(template, context, partials) {
      if(!this.includes("#", template) && !this.includes("^", template)) {
        return template;
      }

      var that = this;
      // CSW - Added "+?" so it finds the tighest bound, not the widest
      var regex = new RegExp(this.otag + "(\\^|\\#)\\s*(.+)\\s*" + this.ctag +
              "\n*([\\s\\S]+?)" + this.otag + "\\/\\s*\\2\\s*" + this.ctag +
              "\\s*", "mg");

      // for each {{#foo}}{{/foo}} section do...
      return template.replace(regex, function(match, type, name, content) {
        var value = that.find(name, context);
        if(type == "^") { // inverted section
          if(!value || that.is_array(value) && value.length === 0) {
            // false or empty list, render it
            return that.render(content, context, partials, true);
          } else {
            return "";
          }
        } else if(type == "#") { // normal section
          if(that.is_array(value)) { // Enumerable, Let's loop!
            return that.map(value, function(row) {
              return that.render(content, that.create_context(row),
                partials, true);
            }).join("");
          } else if(that.is_object(value)) { // Object, Use it as subcontext!
            return that.render(content, that.create_context(value),
              partials, true);
          } else if(typeof value === "function") {
            // higher order section
            return value.call(context, content, function(text) {
              return that.render(text, context, partials, true);
            });
          } else if(value) { // boolean section
            return that.render(content, context, partials, true);
          } else {
            return "";
          }
        }
      });
    },

    /*
      Replace {{foo}} and friends with values from our view
    */
    render_tags: function(template, context, partials, in_recursion) {
      // tit for tat
      var that = this;

      var new_regex = function() {
        return new RegExp(that.otag + "(=|!|>|\\{|%)?([^\\/#\\^]+?)\\1?" +
          that.ctag + "+", "g");
      };

      var regex = new_regex();
      var tag_replace_callback = function(match, operator, name) {
        switch(operator) {
        case "!": // ignore comments
          return "";
        case "=": // set new delimiters, rebuild the replace regexp
          that.set_delimiters(name);
          regex = new_regex();
          return "";
        case ">": // render partial
          return that.render_partial(name, context, partials);
        case "{": // the triple mustache is unescaped
          return that.find(name, context);
        default: // escape the value
          return that.escape(that.find(name, context));
        }
      };
      var lines = template.split("\n");
      for(var i = 0; i < lines.length; i++) {
        lines[i] = lines[i].replace(regex, tag_replace_callback, this);
        if(!in_recursion) {
          this.send(lines[i]);
        }
      }

      if(in_recursion) {
        return lines.join("\n");
      }
    },

    set_delimiters: function(delimiters) {
      var dels = delimiters.split(" ");
      this.otag = this.escape_regex(dels[0]);
      this.ctag = this.escape_regex(dels[1]);
    },

    escape_regex: function(text) {
      // thank you Simon Willison
      if(!arguments.callee.sRE) {
        var specials = [
          '/', '.', '*', '+', '?', '|',
          '(', ')', '[', ']', '{', '}', '\\'
        ];
        arguments.callee.sRE = new RegExp(
          '(\\' + specials.join('|\\') + ')', 'g'
        );
      }
      return text.replace(arguments.callee.sRE, '\\$1');
    },

    /*
      find `name` in current `context`. That is find me a value
      from the view object
    */
    find: function(name, context) {
      name = this.trim(name);

      // Checks whether a value is thruthy or false or 0
      function is_kinda_truthy(bool) {
        return bool === false || bool === 0 || bool;
      }

      var value;
      if(is_kinda_truthy(context[name])) {
        value = context[name];
      } else if(is_kinda_truthy(this.context[name])) {
        value = this.context[name];
      }

      if(typeof value === "function") {
        return value.apply(context);
      }
      if(value !== undefined) {
        return value;
      }
      // silently ignore unkown variables
      return "";
    },

    // Utility methods

    /* includes tag */
    includes: function(needle, haystack) {
      return haystack.indexOf(this.otag + needle) != -1;
    },

    /*
      Does away with nasty characters
    */
    escape: function(s) {
      s = String(s === null ? "" : s);
      return s.replace(/&(?!\w+;)|["'<>\\]/g, function(s) {
        switch(s) {
        case "&": return "&amp;";
        case "\\": return "\\\\";
        case '"': return '&quot;';
        case "'": return '&#39;';
        case "<": return "&lt;";
        case ">": return "&gt;";
        default: return s;
        }
      });
    },

    // by @langalex, support for arrays of strings
    create_context: function(_context) {
      if(this.is_object(_context)) {
        return _context;
      } else {
        var iterator = ".";
        if(this.pragmas["IMPLICIT-ITERATOR"]) {
          iterator = this.pragmas["IMPLICIT-ITERATOR"].iterator;
        }
        var ctx = {};
        ctx[iterator] = _context;
        return ctx;
      }
    },

    is_object: function(a) {
      return a && typeof a == "object";
    },

    is_array: function(a) {
      return Object.prototype.toString.call(a) === '[object Array]';
    },

    /*
      Gets rid of leading and trailing whitespace
    */
    trim: function(s) {
      return s.replace(/^\s*|\s*$/g, "");
    },

    /*
      Why, why, why? Because IE. Cry, cry cry.
    */
    map: function(array, fn) {
      if (typeof array.map == "function") {
        return array.map(fn);
      } else {
        var r = [];
        var l = array.length;
        for(var i = 0; i < l; i++) {
          r.push(fn(array[i]));
        }
        return r;
      }
    }
  };

  return({
    name: "mustache.js",
    version: "0.3.1-dev",

    /*
      Turns a template and view into HTML
    */
    to_html: function(template, view, partials, send_fun) {
      var renderer = new Renderer();
      if(send_fun) {
        renderer.send = send_fun;
      }
      renderer.render(template, view, partials);
      if(!send_fun) {
        return renderer.buffer.join("\n");
      }
    }
  });
}();
</script>
		
			<script type="text/javascript">// Underscore.js 1.1.6
// (c) 2011 Jeremy Ashkenas, DocumentCloud Inc.
// Underscore is freely distributable under the MIT license.
// Portions of Underscore are inspired or borrowed from Prototype,
// Oliver Steele's Functional, and John Resig's Micro-Templating.
// For all details and documentation:
// http://documentcloud.github.com/underscore
(function(){var p=this,C=p._,m={},i=Array.prototype,n=Object.prototype,f=i.slice,D=i.unshift,E=n.toString,l=n.hasOwnProperty,s=i.forEach,t=i.map,u=i.reduce,v=i.reduceRight,w=i.filter,x=i.every,y=i.some,o=i.indexOf,z=i.lastIndexOf;n=Array.isArray;var F=Object.keys,q=Function.prototype.bind,b=function(a){return new j(a)};typeof module!=="undefined"&&module.exports?(module.exports=b,b._=b):p._=b;b.VERSION="1.1.6";var h=b.each=b.forEach=function(a,c,d){if(a!=null)if(s&&a.forEach===s)a.forEach(c,d);else if(b.isNumber(a.length))for(var e=
0,k=a.length;e<k;e++){if(c.call(d,a[e],e,a)===m)break}else for(e in a)if(l.call(a,e)&&c.call(d,a[e],e,a)===m)break};b.map=function(a,c,b){var e=[];if(a==null)return e;if(t&&a.map===t)return a.map(c,b);h(a,function(a,g,G){e[e.length]=c.call(b,a,g,G)});return e};b.reduce=b.foldl=b.inject=function(a,c,d,e){var k=d!==void 0;a==null&&(a=[]);if(u&&a.reduce===u)return e&&(c=b.bind(c,e)),k?a.reduce(c,d):a.reduce(c);h(a,function(a,b,f){!k&&b===0?(d=a,k=!0):d=c.call(e,d,a,b,f)});if(!k)throw new TypeError("Reduce of empty array with no initial value");
return d};b.reduceRight=b.foldr=function(a,c,d,e){a==null&&(a=[]);if(v&&a.reduceRight===v)return e&&(c=b.bind(c,e)),d!==void 0?a.reduceRight(c,d):a.reduceRight(c);a=(b.isArray(a)?a.slice():b.toArray(a)).reverse();return b.reduce(a,c,d,e)};b.find=b.detect=function(a,c,b){var e;A(a,function(a,g,f){if(c.call(b,a,g,f))return e=a,!0});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(w&&a.filter===w)return a.filter(c,b);h(a,function(a,g,f){c.call(b,a,g,f)&&(e[e.length]=a)});return e};
b.reject=function(a,c,b){var e=[];if(a==null)return e;h(a,function(a,g,f){c.call(b,a,g,f)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=!0;if(a==null)return e;if(x&&a.every===x)return a.every(c,b);h(a,function(a,g,f){if(!(e=e&&c.call(b,a,g,f)))return m});return e};var A=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=!1;if(a==null)return e;if(y&&a.some===y)return a.some(c,d);h(a,function(a,b,f){if(e=c.call(d,a,b,f))return m});return e};b.include=b.contains=function(a,c){var b=
!1;if(a==null)return b;if(o&&a.indexOf===o)return a.indexOf(c)!=-1;A(a,function(a){if(b=a===c)return!0});return b};b.invoke=function(a,c){var d=f.call(arguments,2);return b.map(a,function(a){return(c.call?c||a:a[c]).apply(a,d)})};b.pluck=function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);var e={computed:-Infinity};h(a,function(a,b,f){b=c?c.call(d,a,b,f):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,
c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);var e={computed:Infinity};h(a,function(a,b,f){b=c?c.call(d,a,b,f):a;b<e.computed&&(e={value:a,computed:b})});return e.value};b.sortBy=function(a,c,d){return b.pluck(b.map(a,function(a,b,f){return{value:a,criteria:c.call(d,a,b,f)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;return c<d?-1:c>d?1:0}),"value")};b.sortedIndex=function(a,c,d){d||(d=b.identity);for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?e=g+1:f=g}return e};b.toArray=
function(a){if(!a)return[];if(a.toArray)return a.toArray();if(b.isArray(a))return a;if(b.isArguments(a))return f.call(a);return b.values(a)};b.size=function(a){return b.toArray(a).length};b.first=b.head=function(a,b,d){return b!=null&&!d?f.call(a,0,b):a[0]};b.rest=b.tail=function(a,b,d){return f.call(a,b==null||d?1:b)};b.last=function(a){return a[a.length-1]};b.compact=function(a){return b.filter(a,function(a){return!!a})};b.flatten=function(a){return b.reduce(a,function(a,d){if(b.isArray(d))return a.concat(b.flatten(d));
a[a.length]=d;return a},[])};b.without=function(a){var c=f.call(arguments,1);return b.filter(a,function(a){return!b.include(c,a)})};b.uniq=b.unique=function(a,c){return b.reduce(a,function(a,e,f){if(0==f||(c===!0?b.last(a)!=e:!b.include(a,e)))a[a.length]=e;return a},[])};b.intersect=function(a){var c=f.call(arguments,1);return b.filter(b.uniq(a),function(a){return b.every(c,function(c){return b.indexOf(c,a)>=0})})};b.zip=function(){for(var a=f.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),
e=0;e<c;e++)d[e]=b.pluck(a,""+e);return d};b.indexOf=function(a,c,d){if(a==null)return-1;var e;if(d)return d=b.sortedIndex(a,c),a[d]===c?d:-1;if(o&&a.indexOf===o)return a.indexOf(c);d=0;for(e=a.length;d<e;d++)if(a[d]===c)return d;return-1};b.lastIndexOf=function(a,b){if(a==null)return-1;if(z&&a.lastIndexOf===z)return a.lastIndexOf(b);for(var d=a.length;d--;)if(a[d]===b)return d;return-1};b.range=function(a,b,d){arguments.length<=1&&(b=a||0,a=0);d=arguments[2]||1;for(var e=Math.max(Math.ceil((b-a)/
d),0),f=0,g=Array(e);f<e;)g[f++]=a,a+=d;return g};b.bind=function(a,b){if(a.bind===q&&q)return q.apply(a,f.call(arguments,1));var d=f.call(arguments,2);return function(){return a.apply(b,d.concat(f.call(arguments)))}};b.bindAll=function(a){var c=f.call(arguments,1);c.length==0&&(c=b.functions(a));h(c,function(c){a[c]=b.bind(a[c],a)});return a};b.memoize=function(a,c){var d={};c||(c=b.identity);return function(){var b=c.apply(this,arguments);return l.call(d,b)?d[b]:d[b]=a.apply(this,arguments)}};b.delay=
function(a,b){var d=f.call(arguments,2);return setTimeout(function(){return a.apply(a,d)},b)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(f.call(arguments,1)))};var B=function(a,b,d){var e;return function(){var f=this,g=arguments,h=function(){e=null;a.apply(f,g)};d&&clearTimeout(e);if(d||!e)e=setTimeout(h,b)}};b.throttle=function(a,b){return B(a,b,!1)};b.debounce=function(a,b){return B(a,b,!0)};b.once=function(a){var b=!1,d;return function(){if(b)return d;b=!0;return d=a.apply(this,arguments)}};
b.wrap=function(a,b){return function(){var d=[a].concat(f.call(arguments));return b.apply(this,d)}};b.compose=function(){var a=f.call(arguments);return function(){for(var b=f.call(arguments),d=a.length-1;d>=0;d--)b=[a[d].apply(this,b)];return b[0]}};b.after=function(a,b){return function(){if(--a<1)return b.apply(this,arguments)}};b.keys=F||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var b=[],d;for(d in a)l.call(a,d)&&(b[b.length]=d);return b};b.values=function(a){return b.map(a,
b.identity)};b.functions=b.methods=function(a){return b.filter(b.keys(a),function(c){return b.isFunction(a[c])}).sort()};b.extend=function(a){h(f.call(arguments,1),function(b){for(var d in b)b[d]!==void 0&&(a[d]=b[d])});return a};b.defaults=function(a){h(f.call(arguments,1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,c){if(a===c)return!0;var d=typeof a;if(d!=
typeof c)return!1;if(a==c)return!0;if(!a&&c||a&&!c)return!1;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual)return a.isEqual(c);if(b.isDate(a)&&b.isDate(c))return a.getTime()===c.getTime();if(b.isNaN(a)&&b.isNaN(c))return!1;if(b.isRegExp(a)&&b.isRegExp(c))return a.source===c.source&&a.global===c.global&&a.ignoreCase===c.ignoreCase&&a.multiline===c.multiline;if(d!=="object")return!1;if(a.length&&a.length!==c.length)return!1;d=b.keys(a);var e=b.keys(c);if(d.length!=e.length)return!1;
for(var f in a)if(!(f in c)||!b.isEqual(a[f],c[f]))return!1;return!0};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(l.call(a,c))return!1;return!0};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=n||function(a){return E.call(a)==="[object Array]"};b.isArguments=function(a){return!(!a||!l.call(a,"callee"))};b.isFunction=function(a){return!(!a||!a.constructor||!a.call||!a.apply)};b.isString=function(a){return!!(a===""||a&&a.charCodeAt&&a.substr)};
b.isNumber=function(a){return!!(a===0||a&&a.toExponential&&a.toFixed)};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===!0||a===!1};b.isDate=function(a){return!(!a||!a.getTimezoneOffset||!a.setUTCFullYear)};b.isRegExp=function(a){return!(!a||!a.test||!a.exec||!(a.ignoreCase||a.ignoreCase===!1))};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.noConflict=function(){p._=C;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=
0;e<a;e++)b.call(d,e)};b.mixin=function(a){h(b.functions(a),function(c){H(c,b[c]=a[c])})};var I=0;b.uniqueId=function(a){var b=I++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g};b.template=function(a,c){var d=b.templateSettings;d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.interpolate,function(a,b){return"',"+b.replace(/\\'/g,"'")+",'"}).replace(d.evaluate||
null,function(a,b){return"');"+b.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+"__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');";d=new Function("obj",d);return c?d(c):d};var j=function(a){this._wrapped=a};b.prototype=j.prototype;var r=function(a,c){return c?b(a).chain():a},H=function(a,c){j.prototype[a]=function(){var a=f.call(arguments);D.call(a,this._wrapped);return r(c.apply(b,a),this._chain)}};b.mixin(b);h(["pop","push","reverse","shift","sort",
"splice","unshift"],function(a){var b=i[a];j.prototype[a]=function(){b.apply(this._wrapped,arguments);return r(this._wrapped,this._chain)}});h(["concat","join","slice"],function(a){var b=i[a];j.prototype[a]=function(){return r(b.apply(this._wrapped,arguments),this._chain)}});j.prototype.chain=function(){this._chain=!0;return this};j.prototype.value=function(){return this._wrapped}})();
</script>
		
			<script type="text/javascript">// Backbone.js 0.3.3
// (c) 2010 Jeremy Ashkenas, DocumentCloud Inc.
// Backbone may be freely distributed under the MIT license.
// For all details and documentation:
// http://documentcloud.github.com/backbone
(function(){var e;e=typeof exports!=="undefined"?exports:this.Backbone={};e.VERSION="0.3.3";var f=this._;if(!f&&typeof require!=="undefined")f=require("underscore")._;var h=this.jQuery||this.Zepto;e.emulateHTTP=false;e.emulateJSON=false;e.Events={bind:function(a,b){this._callbacks||(this._callbacks={});(this._callbacks[a]||(this._callbacks[a]=[])).push(b);return this},unbind:function(a,b){var c;if(a){if(c=this._callbacks)if(b){c=c[a];if(!c)return this;for(var d=0,g=c.length;d<g;d++)if(b===c[d]){c.splice(d,
1);break}}else c[a]=[]}else this._callbacks={};return this},trigger:function(a){var b,c,d,g;if(!(c=this._callbacks))return this;if(b=c[a]){d=0;for(g=b.length;d<g;d++)b[d].apply(this,Array.prototype.slice.call(arguments,1))}if(b=c.all){d=0;for(g=b.length;d<g;d++)b[d].apply(this,arguments)}return this}};e.Model=function(a,b){a||(a={});if(this.defaults)a=f.extend({},this.defaults,a);this.attributes={};this._escapedAttributes={};this.cid=f.uniqueId("c");this.set(a,{silent:true});this._previousAttributes=
f.clone(this.attributes);if(b&&b.collection)this.collection=b.collection;this.initialize(a,b)};f.extend(e.Model.prototype,e.Events,{_previousAttributes:null,_changed:false,initialize:function(){},toJSON:function(){return f.clone(this.attributes)},get:function(a){return this.attributes[a]},escape:function(a){var b;if(b=this._escapedAttributes[a])return b;b=this.attributes[a];return this._escapedAttributes[a]=(b==null?"":b).replace(/&(?!\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,
"&quot;")},set:function(a,b){b||(b={});if(!a)return this;if(a.attributes)a=a.attributes;var c=this.attributes,d=this._escapedAttributes;if(!b.silent&&this.validate&&!this._performValidation(a,b))return false;if("id"in a)this.id=a.id;for(var g in a){var i=a[g];if(!f.isEqual(c[g],i)){c[g]=i;delete d[g];if(!b.silent){this._changed=true;this.trigger("change:"+g,this,i,b)}}}!b.silent&&this._changed&&this.change(b);return this},unset:function(a,b){b||(b={});var c={};c[a]=void 0;if(!b.silent&&this.validate&&
!this._performValidation(c,b))return false;delete this.attributes[a];delete this._escapedAttributes[a];if(!b.silent){this._changed=true;this.trigger("change:"+a,this,void 0,b);this.change(b)}return this},clear:function(a){a||(a={});var b=this.attributes,c={};for(attr in b)c[attr]=void 0;if(!a.silent&&this.validate&&!this._performValidation(c,a))return false;this.attributes={};this._escapedAttributes={};if(!a.silent){this._changed=true;for(attr in b)this.trigger("change:"+attr,this,void 0,a);this.change(a)}return this},
fetch:function(a){a||(a={});var b=this,c=j(a.error,b,a);(this.sync||e.sync)("read",this,function(d){if(!b.set(b.parse(d),a))return false;a.success&&a.success(b,d)},c);return this},save:function(a,b){b||(b={});if(a&&!this.set(a,b))return false;var c=this,d=j(b.error,c,b),g=this.isNew()?"create":"update";(this.sync||e.sync)(g,this,function(i){if(!c.set(c.parse(i),b))return false;b.success&&b.success(c,i)},d);return this},destroy:function(a){a||(a={});var b=this,c=j(a.error,b,a);(this.sync||e.sync)("delete",
this,function(d){b.collection&&b.collection.remove(b);a.success&&a.success(b,d)},c);return this},url:function(){var a=k(this.collection);if(this.isNew())return a;return a+(a.charAt(a.length-1)=="/"?"":"/")+this.id},parse:function(a){return a},clone:function(){return new this.constructor(this)},isNew:function(){return!this.id},change:function(a){this.trigger("change",this,a);this._previousAttributes=f.clone(this.attributes);this._changed=false},hasChanged:function(a){if(a)return this._previousAttributes[a]!=
this.attributes[a];return this._changed},changedAttributes:function(a){a||(a=this.attributes);var b=this._previousAttributes,c=false,d;for(d in a)if(!f.isEqual(b[d],a[d])){c=c||{};c[d]=a[d]}return c},previous:function(a){if(!a||!this._previousAttributes)return null;return this._previousAttributes[a]},previousAttributes:function(){return f.clone(this._previousAttributes)},_performValidation:function(a,b){var c=this.validate(a);if(c){b.error?b.error(this,c):this.trigger("error",this,c,b);return false}return true}});
e.Collection=function(a,b){b||(b={});if(b.comparator){this.comparator=b.comparator;delete b.comparator}this._boundOnModelEvent=f.bind(this._onModelEvent,this);this._reset();a&&this.refresh(a,{silent:true});this.initialize(a,b)};f.extend(e.Collection.prototype,e.Events,{model:e.Model,initialize:function(){},toJSON:function(){return this.map(function(a){return a.toJSON()})},add:function(a,b){if(f.isArray(a))for(var c=0,d=a.length;c<d;c++)this._add(a[c],b);else this._add(a,b);return this},remove:function(a,
b){if(f.isArray(a))for(var c=0,d=a.length;c<d;c++)this._remove(a[c],b);else this._remove(a,b);return this},get:function(a){if(a==null)return null;return this._byId[a.id!=null?a.id:a]},getByCid:function(a){return a&&this._byCid[a.cid||a]},at:function(a){return this.models[a]},sort:function(a){a||(a={});if(!this.comparator)throw Error("Cannot sort a set without a comparator");this.models=this.sortBy(this.comparator);a.silent||this.trigger("refresh",this,a);return this},pluck:function(a){return f.map(this.models,
function(b){return b.get(a)})},refresh:function(a,b){a||(a=[]);b||(b={});this._reset();this.add(a,{silent:true});b.silent||this.trigger("refresh",this,b);return this},fetch:function(a){a||(a={});var b=this,c=j(a.error,b,a);(this.sync||e.sync)("read",this,function(d){b.refresh(b.parse(d));a.success&&a.success(b,d)},c);return this},create:function(a,b){var c=this;b||(b={});if(a instanceof e.Model)a.collection=c;else a=new this.model(a,{collection:c});return a.save(null,{success:function(d,g){c.add(d);
b.success&&b.success(d,g)},error:b.error})},parse:function(a){return a},chain:function(){return f(this.models).chain()},_reset:function(){this.length=0;this.models=[];this._byId={};this._byCid={}},_add:function(a,b){b||(b={});a instanceof e.Model||(a=new this.model(a,{collection:this}));var c=this.getByCid(a);if(c)throw Error(["Can't add the same model to a set twice",c.id]);this._byId[a.id]=a;this._byCid[a.cid]=a;a.collection=this;this.models.splice(this.comparator?this.sortedIndex(a,this.comparator):
this.length,0,a);a.bind("all",this._boundOnModelEvent);this.length++;b.silent||a.trigger("add",a,this,b);return a},_remove:function(a,b){b||(b={});a=this.getByCid(a)||this.get(a);if(!a)return null;delete this._byId[a.id];delete this._byCid[a.cid];delete a.collection;this.models.splice(this.indexOf(a),1);this.length--;b.silent||a.trigger("remove",a,this,b);a.unbind("all",this._boundOnModelEvent);return a},_onModelEvent:function(a,b){if(a==="change:id"){delete this._byId[b.previous("id")];this._byId[b.id]=
b}this.trigger.apply(this,arguments)}});f.each(["forEach","each","map","reduce","reduceRight","find","detect","filter","select","reject","every","all","some","any","include","invoke","max","min","sortBy","sortedIndex","toArray","size","first","rest","last","without","indexOf","lastIndexOf","isEmpty"],function(a){e.Collection.prototype[a]=function(){return f[a].apply(f,[this.models].concat(f.toArray(arguments)))}});e.Controller=function(a){a||(a={});if(a.routes)this.routes=a.routes;this._bindRoutes();
this.initialize(a)};var o=/:([\w\d]+)/g,p=/\*([\w\d]+)/g;f.extend(e.Controller.prototype,e.Events,{initialize:function(){},route:function(a,b,c){e.history||(e.history=new e.History);f.isRegExp(a)||(a=this._routeToRegExp(a));e.history.route(a,f.bind(function(d){d=this._extractParameters(a,d);c.apply(this,d);this.trigger.apply(this,["route:"+b].concat(d))},this))},saveLocation:function(a){e.history.saveLocation(a)},_bindRoutes:function(){if(this.routes)for(var a in this.routes){var b=this.routes[a];
this.route(a,b,this[b])}},_routeToRegExp:function(a){a=a.replace(o,"([^/]*)").replace(p,"(.*?)");return RegExp("^"+a+"$")},_extractParameters:function(a,b){return a.exec(b).slice(1)}});e.History=function(){this.handlers=[];this.fragment=this.getFragment();f.bindAll(this,"checkUrl")};var l=/^#*/;f.extend(e.History.prototype,{interval:50,getFragment:function(a){return(a||window.location).hash.replace(l,"")},start:function(){var a=document.documentMode;if(a=h.browser.msie&&(!a||a<=7))this.iframe=h('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow;
"onhashchange"in window&&!a?h(window).bind("hashchange",this.checkUrl):setInterval(this.checkUrl,this.interval);return this.loadUrl()},route:function(a,b){this.handlers.push({route:a,callback:b})},checkUrl:function(){var a=this.getFragment();if(a==this.fragment&&this.iframe)a=this.getFragment(this.iframe.location);if(a==this.fragment||a==decodeURIComponent(this.fragment))return false;if(this.iframe)window.location.hash=this.iframe.location.hash=a;this.loadUrl()},loadUrl:function(){var a=this.fragment=
this.getFragment();return f.any(this.handlers,function(b){if(b.route.test(a)){b.callback(a);return true}})},saveLocation:function(a){a=(a||"").replace(l,"");if(this.fragment!=a){window.location.hash=this.fragment=a;if(this.iframe&&a!=this.getFragment(this.iframe.location)){this.iframe.document.open().close();this.iframe.location.hash=a}}}});e.View=function(a){this._configure(a||{});this._ensureElement();this.delegateEvents();this.initialize(a)};var q=/^(\w+)\s*(.*)$/;f.extend(e.View.prototype,e.Events,
{tagName:"div",$:function(a){return h(a,this.el)},initialize:function(){},render:function(){return this},remove:function(){h(this.el).remove();return this},make:function(a,b,c){a=document.createElement(a);b&&h(a).attr(b);c&&h(a).html(c);return a},delegateEvents:function(a){if(a||(a=this.events)){h(this.el).unbind();for(var b in a){var c=a[b],d=b.match(q),g=d[1];d=d[2];c=f.bind(this[c],this);d===""?h(this.el).bind(g,c):h(this.el).delegate(d,g,c)}}},_configure:function(a){if(this.options)a=f.extend({},
this.options,a);if(a.model)this.model=a.model;if(a.collection)this.collection=a.collection;if(a.el)this.el=a.el;if(a.id)this.id=a.id;if(a.className)this.className=a.className;if(a.tagName)this.tagName=a.tagName;this.options=a},_ensureElement:function(){if(!this.el){var a={};if(this.id)a.id=this.id;if(this.className)a["class"]=this.className;this.el=this.make(this.tagName,a)}}});var m=function(a,b){var c=r(this,a,b);c.extend=m;return c};e.Model.extend=e.Collection.extend=e.Controller.extend=e.View.extend=
m;var s={create:"POST",update:"PUT","delete":"DELETE",read:"GET"};e.sync=function(a,b,c,d){var g=s[a];a=a==="create"||a==="update"?JSON.stringify(b.toJSON()):null;b={url:k(b),type:g,contentType:"application/json",data:a,dataType:"json",processData:false,success:c,error:d};if(e.emulateJSON){b.contentType="application/x-www-form-urlencoded";b.processData=true;b.data=a?{model:a}:{}}if(e.emulateHTTP)if(g==="PUT"||g==="DELETE"){if(e.emulateJSON)b.data._method=g;b.type="POST";b.beforeSend=function(i){i.setRequestHeader("X-HTTP-Method-Override",
g)}}h.ajax(b)};var n=function(){},r=function(a,b,c){var d;d=b&&b.hasOwnProperty("constructor")?b.constructor:function(){return a.apply(this,arguments)};n.prototype=a.prototype;d.prototype=new n;b&&f.extend(d.prototype,b);c&&f.extend(d,c);d.prototype.constructor=d;d.__super__=a.prototype;return d},k=function(a){if(!(a&&a.url))throw Error("A 'url' property or function must be specified");return f.isFunction(a.url)?a.url():a.url},j=function(a,b,c){return function(d){a?a(b,d):b.trigger("error",b,d,c)}}})();
</script>
		
			<script type="text/javascript">//XRegExp 1.5.0 <xregexp.com> MIT License
var XRegExp;if(XRegExp){throw Error("can't load XRegExp twice in the same frame")}(function(){XRegExp=function(w,r){var q=[],u=XRegExp.OUTSIDE_CLASS,x=0,p,s,v,t,y;if(XRegExp.isRegExp(w)){if(r!==undefined){throw TypeError("can't supply flags when constructing one RegExp from another")}return j(w)}if(g){throw Error("can't call the XRegExp constructor within token definition functions")}r=r||"";p={hasNamedCapture:false,captureNames:[],hasFlag:function(z){return r.indexOf(z)>-1},setFlag:function(z){r+=z}};while(x<w.length){s=o(w,x,u,p);if(s){q.push(s.output);x+=(s.match[0].length||1)}else{if(v=m.exec.call(i[u],w.slice(x))){q.push(v[0]);x+=v[0].length}else{t=w.charAt(x);if(t==="["){u=XRegExp.INSIDE_CLASS}else{if(t==="]"){u=XRegExp.OUTSIDE_CLASS}}q.push(t);x++}}}y=RegExp(q.join(""),m.replace.call(r,h,""));y._xregexp={source:w,captureNames:p.hasNamedCapture?p.captureNames:null};return y};XRegExp.version="1.5.0";XRegExp.INSIDE_CLASS=1;XRegExp.OUTSIDE_CLASS=2;var c=/\$(?:(\d\d?|[$&`'])|{([$\w]+)})/g,h=/[^gimy]+|([\s\S])(?=[\s\S]*\1)/g,n=/^(?:[?*+]|{\d+(?:,\d*)?})\??/,g=false,k=[],m={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},a=m.exec.call(/()??/,"")[1]===undefined,e=function(){var p=/^/g;m.test.call(p,"");return !p.lastIndex}(),f=function(){var p=/x/g;m.replace.call("x",p,"");return !p.lastIndex}(),b=RegExp.prototype.sticky!==undefined,i={};i[XRegExp.INSIDE_CLASS]=/^(?:\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S]))/;i[XRegExp.OUTSIDE_CLASS]=/^(?:\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??)/;XRegExp.addToken=function(s,r,q,p){k.push({pattern:j(s,"g"+(b?"y":"")),handler:r,scope:q||XRegExp.OUTSIDE_CLASS,trigger:p||null})};XRegExp.cache=function(r,p){var q=r+"/"+(p||"");return XRegExp.cache[q]||(XRegExp.cache[q]=XRegExp(r,p))};XRegExp.copyAsGlobal=function(p){return j(p,"g")};XRegExp.escape=function(p){return p.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")};XRegExp.execAt=function(s,r,t,q){r=j(r,"g"+((q&&b)?"y":""));r.lastIndex=t=t||0;var p=r.exec(s);if(q){return(p&&p.index===t)?p:null}else{return p}};XRegExp.freezeTokens=function(){XRegExp.addToken=function(){throw Error("can't run addToken after freezeTokens")}};XRegExp.isRegExp=function(p){return Object.prototype.toString.call(p)==="[object RegExp]"};XRegExp.iterate=function(u,p,v,s){var t=j(p,"g"),r=-1,q;while(q=t.exec(u)){v.call(s,q,++r,u,t);if(t.lastIndex===q.index){t.lastIndex++}}if(p.global){p.lastIndex=0}};XRegExp.matchChain=function(q,p){return function r(s,x){var v=p[x].regex?p[x]:{regex:p[x]},u=j(v.regex,"g"),w=[],t;for(t=0;t<s.length;t++){XRegExp.iterate(s[t],u,function(y){w.push(v.backref?(y[v.backref]||""):y[0])})}return((x===p.length-1)||!w.length)?w:r(w,x+1)}([q],0)};RegExp.prototype.apply=function(q,p){return this.exec(p[0])};RegExp.prototype.call=function(p,q){return this.exec(q)};RegExp.prototype.exec=function(t){var r=m.exec.apply(this,arguments),q,p;if(r){if(!a&&r.length>1&&l(r,"")>-1){p=RegExp(this.source,m.replace.call(d(this),"g",""));m.replace.call(t.slice(r.index),p,function(){for(var u=1;u<arguments.length-2;u++){if(arguments[u]===undefined){r[u]=undefined}}})}if(this._xregexp&&this._xregexp.captureNames){for(var s=1;s<r.length;s++){q=this._xregexp.captureNames[s-1];if(q){r[q]=r[s]}}}if(!e&&this.global&&!r[0].length&&(this.lastIndex>r.index)){this.lastIndex--}}return r};if(!e){RegExp.prototype.test=function(q){var p=m.exec.call(this,q);if(p&&this.global&&!p[0].length&&(this.lastIndex>p.index)){this.lastIndex--}return !!p}}String.prototype.match=function(q){if(!XRegExp.isRegExp(q)){q=RegExp(q)}if(q.global){var p=m.match.apply(this,arguments);q.lastIndex=0;return p}return q.exec(this)};String.prototype.replace=function(r,s){var t=XRegExp.isRegExp(r),q,p,u;if(t&&typeof s.valueOf()==="string"&&s.indexOf("${")===-1&&f){return m.replace.apply(this,arguments)}if(!t){r=r+""}else{if(r._xregexp){q=r._xregexp.captureNames}}if(typeof s==="function"){p=m.replace.call(this,r,function(){if(q){arguments[0]=new String(arguments[0]);for(var v=0;v<q.length;v++){if(q[v]){arguments[0][q[v]]=arguments[v+1]}}}if(t&&r.global){r.lastIndex=arguments[arguments.length-2]+arguments[0].length}return s.apply(null,arguments)})}else{u=this+"";p=m.replace.call(u,r,function(){var v=arguments;return m.replace.call(s,c,function(x,w,A){if(w){switch(w){case"$":return"$";case"&":return v[0];case"`":return v[v.length-1].slice(0,v[v.length-2]);case"'":return v[v.length-1].slice(v[v.length-2]+v[0].length);default:var y="";w=+w;if(!w){return x}while(w>v.length-3){y=String.prototype.slice.call(w,-1)+y;w=Math.floor(w/10)}return(w?v[w]||"":"$")+y}}else{var z=+A;if(z<=v.length-3){return v[z]}z=q?l(q,A):-1;return z>-1?v[z+1]:x}})})}if(t&&r.global){r.lastIndex=0}return p};String.prototype.split=function(u,p){if(!XRegExp.isRegExp(u)){return m.split.apply(this,arguments)}var w=this+"",r=[],v=0,t,q;if(p===undefined||+p<0){p=Infinity}else{p=Math.floor(+p);if(!p){return[]}}u=XRegExp.copyAsGlobal(u);while(t=u.exec(w)){if(u.lastIndex>v){r.push(w.slice(v,t.index));if(t.length>1&&t.index<w.length){Array.prototype.push.apply(r,t.slice(1))}q=t[0].length;v=u.lastIndex;if(r.length>=p){break}}if(u.lastIndex===t.index){u.lastIndex++}}if(v===w.length){if(!m.test.call(u,"")||q){r.push("")}}else{r.push(w.slice(v))}return r.length>p?r.slice(0,p):r};function j(r,q){if(!XRegExp.isRegExp(r)){throw TypeError("type RegExp expected")}var p=r._xregexp;r=XRegExp(r.source,d(r)+(q||""));if(p){r._xregexp={source:p.source,captureNames:p.captureNames?p.captureNames.slice(0):null}}return r}function d(p){return(p.global?"g":"")+(p.ignoreCase?"i":"")+(p.multiline?"m":"")+(p.extended?"x":"")+(p.sticky?"y":"")}function o(v,u,w,p){var r=k.length,y,s,x;g=true;try{while(r--){x=k[r];if((w&x.scope)&&(!x.trigger||x.trigger.call(p))){x.pattern.lastIndex=u;s=x.pattern.exec(v);if(s&&s.index===u){y={output:x.handler.call(p,s,w),match:s};break}}}}catch(q){throw q}finally{g=false}return y}function l(s,q,r){if(Array.prototype.indexOf){return s.indexOf(q,r)}for(var p=r||0;p<s.length;p++){if(s[p]===q){return p}}return -1}XRegExp.addToken(/\(\?#[^)]*\)/,function(p){return m.test.call(n,p.input.slice(p.index+p[0].length))?"":"(?:)"});XRegExp.addToken(/\((?!\?)/,function(){this.captureNames.push(null);return"("});XRegExp.addToken(/\(\?<([$\w]+)>/,function(p){this.captureNames.push(p[1]);this.hasNamedCapture=true;return"("});XRegExp.addToken(/\\k<([\w$]+)>/,function(q){var p=l(this.captureNames,q[1]);return p>-1?"\\"+(p+1)+(isNaN(q.input.charAt(q.index+q[0].length))?"":"(?:)"):q[0]});XRegExp.addToken(/\[\^?]/,function(p){return p[0]==="[]"?"\\b\\B":"[\\s\\S]"});XRegExp.addToken(/^\(\?([imsx]+)\)/,function(p){this.setFlag(p[1]);return""});XRegExp.addToken(/(?:\s+|#.*)+/,function(p){return m.test.call(n,p.input.slice(p.index+p[0].length))?"":"(?:)"},XRegExp.OUTSIDE_CLASS,function(){return this.hasFlag("x")});XRegExp.addToken(/\./,function(){return"[\\s\\S]"},XRegExp.OUTSIDE_CLASS,function(){return this.hasFlag("s")})})();
</script>
		
			<script type="text/javascript">var GLOBALS, adjustHeight, featureListHeight, generateBitlyAPIUrl, generateTwitterText, getAdUrl, getIdFromUrl, getPref, getStringPref, getTime, makeDataRequest, savePref, saveSettings, slugify;

GLOBALS = {
  rootUrl: "http://gocomics.com"
};

GLOBALS.feedUrl = "" + GLOBALS.rootUrl + "/feeds";

GLOBALS.image = {
  maxHeight: 115,
  maxWidth: 360
};

GLOBALS.navigation = {
  myComics: {
    title: 'My Comics',
    slug: 'MyComics',
    url: function(id) {
      return "" + GLOBALS.feedUrl + "/recent_item/" + id + ".json?comments=true";
    },
    featureGroups: [
      {
        title: 'My Comics',
        slug: 'mycomics',
        itemType: 'Comic',
        description: 'This tab contains a listing of your preferred comic features.  Each comic will update here when a new strip become available.',
        ids: [609, 9, 32]
      }
    ]
  },
  favorites: {
    title: 'Favorites',
    slug: 'favorites',
    url: function(id) {
      return "" + GLOBALS.feedUrl + "/item/" + id + ".json?comments=true";
    },
    featureGroups: [
      {
        title: 'My Favorites',
        slug: 'myfavorites',
        itemType: 'Favorite',
        description: 'This tab holds a collection of individual strips that you have saved.',
        ids: []
      }
    ]
  },
  allComics: {
    title: 'All Comics',
    slug: 'AllComics',
    url: function() {
      return "" + GLOBALS.feedUrl + "/features?min=true&category=comic";
    },
    featureGroups: [
      {
        title: 'Popular',
        slug: 'popular',
        itemType: 'Comic',
        description: 'This tab displays the most popular comic features currently available on the GoComics Google Gadget.',
        ids: [9, 32, 48, 56, 64, 66, 72, 93, 112, 124, 142, 569, 609, 613, 614, 615, 633, 679, 683, 689]
      }, {
        title: 'A-Z',
        slug: 'atoz',
        itemType: 'Comic',
        description: 'This tab displays an alphabetized list of all the comic features currently available on the GoComics Google Gadget.',
        itemType: 'Comic',
        ids: []
      }
    ]
  }
};

GLOBALS.ads = [
  {
    name: 'skyscraper',
    file: 'ad_edit.html',
    position: 'sky',
    size: '120x600,160x600',
    el: $('#ad-sky iframe')
  }, {
    name: 'sidehouse',
    file: 'ad_house.html',
    position: 'sidehouse',
    size: '210x227',
    el: $('#ad-house iframe')
  }, {
    name: 'banner',
    file: 'ad_banner.html',
    position: 'top',
    size: '468x60,728x90',
    el: $('#ad-banner iframe')
  }, {
    name: 'rectangle',
    file: 'ad_main.html',
    position: 'rect',
    size: '336x280,300x250',
    el: $('#ad-rect iframe')
  }
];

GLOBALS.bitlyApi = {
  login: 'universaluclick',
  key: 'R_954787182f7194ba7e39eb6a11ea2306'
};

GLOBALS.currentComicKey = 'currentcomic';

GLOBALS.adVars = {
  tile: null,
  ord: null,
  dcopt: null
};

adjustHeight = function() {
  window.setTimeout('gadgets.window.adjustHeight()', 300);
  return window.setTimeout('gadgets.window.adjustHeight()', 5000);
};

featureListHeight = function() {
  var feature_height;
  feature_height = $('div.feature-image').height() - 65;
  return $('ul.features').css('height', feature_height);
};

makeDataRequest = function(url, callback) {
  return gadgets.io.makeRequest(url, function(obj) {
    if (obj) return callback(obj.data);
  });
};

savePref = function(key, val) {
  var prefs;
  prefs = null;
  prefs = new gadgets.Prefs();
  return prefs.set(key, val);
};

saveSettings = function(group) {
  return savePref(group.slug, group.ids.join('|'));
};

getPref = function(key) {
  var prefs, result;
  prefs = null;
  prefs = new gadgets.Prefs();
  result = prefs.getString(key);
  if (result.length > 0) {
    return _(result.split('|')).map(function(r) {
      return parseInt(r);
    });
  } else {
    return [];
  }
};

getStringPref = function(key) {
  var prefs;
  prefs = null;
  prefs = new gadgets.Prefs();
  return prefs.getString(key);
};

slugify = function(str) {
  var from, i, to, _ref;
  str = str.replace(/^\s+|\s+$/g, '').toLowerCase();
  from = "àáäâèéëêìíïîòóöôùúüûñç·/_,:;";
  to = "aaaaeeeeiiiioooouuuunc------";
  for (i = 0, _ref = from.length; 0 <= _ref ? i <= _ref : i >= _ref; 0 <= _ref ? i++ : i--) {
    str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i));
  }
  return str.replace(/[^a-z0-9 -]/g, '').replace(/\s+/g, '-').replace(/-+/g, '-');
};

getTime = function(ts) {
  var ampm, dt, hour, rgx;
  rgx = ts.match(/(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)-(\d\d):(\d\d)/);
  if (rgx === null) return '';
  dt = new Date(rgx[1], rgx[2], rgx[3], rgx[4], rgx[5]);
  hour = dt.getHours();
  ampm = hour >= 12 ? 'pm' : 'am';
  if (hour >= 12) hour = hour - 12;
  if (hour === 0) hour = 12;
  return "" + (hour.toString()) + ":" + rgx[5] + " " + ampm;
};

getIdFromUrl = function(url) {
  var a;
  if (url === '' || url === null || url === void 0) return '';
  a = url.split('/');
  return a[a.length - 1];
};

generateBitlyAPIUrl = function(url) {
  url = escape("" + url + "?utm_source=google%26utm_medium=gadget%26utm_campaign=gadget_clickthrough");
  return "http://api.bitly.com/v3/shorten?login=universaluclick&apiKey=R_954787182f7194ba7e39eb6a11ea2306&longUrl=" + url + "&format=json";
};

generateTwitterText = function(title, url) {
  return "http://twitter.com/intent/tweet?status=Love+this+" + (escape(title)) + "+strip+on+Gocomics.com.+" + url;
};

getAdUrl = function(feature_code, ad) {
  return "http://images.gocomics.com/images/google/" + ad.file + "?feature_code=" + feature_code;
};
</script>
		
			<script type="text/javascript">var Feature, FeatureList, HomeView, init;

Feature = Backbone.Model.extend({
  BASE_URL: GLOBALS.featureUrl,
  url: function() {
    return this.BASE_URL + this.attributes.id;
  }
});

FeatureList = Backbone.Collection.extend({
  BASE_URL: GLOBALS.featureListUrl,
  model: Feature,
  url: function() {
    return this.BASE_URL;
  }
});

HomeView = Backbone.View.extend({
  el: $('#home-container'),
  template: $('#feature-template').html(),
  _features: null,
  _featureGroup: null,
  _tab: null,
  _currentFeature: null,
  _previousFeature: null,
  _nextFeature: null,
  _index: 0,
  _supportedViews: null,
  events: {
    'click .pick-comics': 'pickComics',
    'click .full-size': 'fullSize',
    'click .feature-image img': 'fullSize',
    'click #prev_comic': 'previous',
    'click .prev': 'previous',
    'click #next_comic': 'next',
    'click .next': 'next'
  },
  initialize: function() {
    var data, fromPrefs, setCollectionAfter, tab;
    _.bindAll(this, 'render', 'setCollection', 'setFeature');
    this.params = gadgets.views.getParams();
    this._supportedViews = gadgets.views.getSupportedViews();
    this._tab = GLOBALS.navigation.myComics;
    this._featureGroup = _.detect(this._tab.featureGroups, function(g) {
      return g.slug === 'mycomics';
    });
    fromPrefs = getPref(this._featureGroup.slug);
    if (fromPrefs.length > 0) this._featureGroup.ids = fromPrefs;
    setCollectionAfter = _.after(this._featureGroup.ids.length, this.setCollection);
    data = [];
    tab = this._tab;
    return _(this._featureGroup.ids).each(function(id) {
      return makeDataRequest(tab.url(id), function(obj) {
        data.push(JSON.parse(obj));
        return setCollectionAfter(data);
      });
    });
  },
  setCollection: function(data) {
    var currentComic;
    this.collection = new FeatureList(data);
    if (currentComic = getStringPref(GLOBALS.currentComicKey)) {
      this._index = _.indexOf(this.collection.pluck('feature_id'), parseInt(currentComic));
    }
    this.setFeature(this._index);
    return this.collection;
  },
  setFeature: function(i) {
    this._currentFeature = this.collection.at(i);
    this._previousFeature = this.collection.at(this.down(i));
    this._nextFeature = this.collection.at(this.up(i));
    savePref(GLOBALS.currentComicKey, this._currentFeature.get('feature_id'));
    return this.render();
  },
  render: function() {
    var imgHeight, imgWidth, percentHeight, percentWidth;
    $('#feature').html(Mustache.to_html(this.template, this._currentFeature.toJSON()));
    $('.prev').html(" " + this._previousFeature.attributes.title);
    $('.next').html("" + this._nextFeature.attributes.title + " ");
    imgHeight = this._currentFeature.get('image_height');
    imgWidth = this._currentFeature.get('image_width');
    if (imgWidth >= 580 && imgHeight <= 220) {
      percentWidth = 97 + '%';
      percentHeight = 'auto';
      imgWidth = percentWidth;
      imgHeight = percentHeight;
    } else {
      imgWidth = 'auto';
      imgHeight = GLOBALS.image.maxHeight;
    }
    $('div.feature-image img').css({
      height: imgHeight,
      width: imgWidth
    });
    adjustHeight();
    return this;
  },
  up: function(i) {
    if (i + 1 > this.collection.length - 1) {
      return 0;
    } else {
      return i + 1;
    }
  },
  down: function(i) {
    if (i - 1 < 0) {
      return this.collection.length - 1;
    } else {
      return i - 1;
    }
  },
  cycle: function(increment) {
    this._index = increment ? this.up(this._index) : this.down(this._index);
    return this.setFeature(this._index);
  },
  rockTheCanvasView: function(isEditMode) {
    var params;
    params = {
      'featureId': this._currentFeature.attributes.feature_id,
      'isEditMode': isEditMode
    };
    return gadgets.views.requestNavigateTo(this._supportedViews.canvas, params);
  },
  pickComics: function(e) {
    e.preventDefault();
    return this.rockTheCanvasView(true);
  },
  fullSize: function(e) {
    e.preventDefault();
    return this.rockTheCanvasView(false);
  },
  previous: function(e) {
    e.preventDefault();
    return this.cycle(false);
  },
  next: function(e) {
    e.preventDefault();
    return this.cycle(true);
  }
});

init = function() {
  window.View = new HomeView;
  return this;
};

gadgets.util.registerOnLoadHandler(init);
</script>
		
	
	]]>
	</Content>
	
	
	
	<!-- C A N V A S -->
	<Content type="html" view="canvas"><![CDATA[
		
		
			<style type="text/css">html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline; }

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block; }

body {
  line-height: 1; }

ol, ul {
  list-style: none; }

blockquote, q {
  quotes: none; }

blockquote:before, blockquote:after,
q:before, q:after {
  content: '';
  content: none; }

table {
  border-collapse: collapse;
  border-spacing: 0; }
</style>
		
			<style type="text/css">body {
  color: #474747;
  font-family: Helvetica, Arial, Verdana, sans-serif;
  font-size: 12px; }

a {
  text-decoration: none;
  color: #4a91c1; }

a:active {
  color: #4A91C1; }

a:visited {
  color: #4a91c1; }

a.disabled {
  color: #CCC;
  cursor: pointer; }

.button, .big-button, .little-button {
  border-radius: 5px;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -khtml-border-radius: 5px;
  color: #FFF;
  font-weight: bold;
  text-align: center; }

.button:visited, .big-button:visited, .little-button:visited {
  color: #FFF; }

.big-button {
  background: #38a3cd;
  background: -webkit-gradient(linear, left top, left bottom, from(#8acae1), to(#38a3cd));
  background: -moz-linear-gradient(top, #8acae1, #38a3cd);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#8acae1', endColorstr='#38a3cd');
  width: 75px;
  display: block;
  padding: 6px 10px; }

.big-button:hover {
  background: #8acae1;
  background: -webkit-gradient(linear, left top, left bottom, from(#38a3cd), to(#8acae1));
  background: -moz-linear-gradient(top, #38a3cd, #8acae1);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#38a3cd', endColorstr='#8acae1'); }

.little-button {
  background: #7fac48;
  background: -webkit-gradient(linear, left top, left bottom, from(#5e8f1e), to(#7fac48));
  background: -moz-linear-gradient(top, #5e8f1e, #7fac48);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5e8f1e', endColorstr='#7fac48');
  display: inline-block;
  width: 150px;
  padding: 4px 8px; }

.little-button:hover {
  background: #85B334; }

.clear {
  clear: both; }

input, textarea {
  background: url("http://assets.gocomics.com/images/bg-input.gif") no-repeat;
  border: 1px solid darkGray;
  padding: 7px;
  font: 12px/12px Arial, Tahoma, serif; }

#canvas {
  width: 950px;
  background: #FFF;
  margin-left: 5px;
  margin-top: 5px; }
  #canvas iframe {
    width: 100%;
    height: 100%;
    border: none !important; }
    #canvas iframe body {
      margin: 0px !important; }

#edit-view {
  border-radius: 5px;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -khtml-border-radius: 5px;
  background: #FFF;
  width: 600px;
  height: 564px;
  display: none;
  border: 1px solid #999; }
  #edit-view div#edit-header, #edit-view p, #edit-view div#column-list {
    padding-left: 16px;
    padding-right: 16px;
    padding-top: 8px;
    padding-bottom: 8px; }
  #edit-view div#edit-header {
    background: #e4e4e4;
    background: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#e4e4e4));
    background: -moz-linear-gradient(top, #f4f4f4, #e4e4e4);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f4f4f4', endColorstr='#e4e4e4');
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    -webkit-border-top-left-radius: 5px;
    -webkit-border-top-right-radius: 5px;
    -moz-border-radius-topleft: 5px;
    -moz-border-radius-topbottom: 5px;
    height: 22px;
    border-bottom: 1px solid #AAA; }
    #edit-view div#edit-header h2 {
      width: 50%;
      float: left;
      padding-top: 2px;
      font-size: 16px;
      font-weight: bold; }
    #edit-view div#edit-header div.save, #edit-view div#edit-header div.cancel {
      font-weight: normal;
      float: right;
      color: #8e8e8e;
      font-size: 12px;
      padding: 0px 5px; }
      #edit-view div#edit-header div.save a, #edit-view div#edit-header div.cancel a {
        border: 1px solid #7FAC48;
        width: auto; }
        #edit-view div#edit-header div.save a:active, #edit-view div#edit-header div.cancel a:active {
          color: #ebebeb; }
    #edit-view div#edit-header div.cancel a.little-button {
      background: #efefef;
      background: -webkit-gradient(linear, left top, left bottom, from(#cccccc), to(#efefef));
      background: -moz-linear-gradient(top, #cccccc, #efefef);
      filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc', endColorstr='#efefef');
      color: #474747;
      font-weight: bold;
      border: 1px solid #ccc; }
  #edit-view p {
    background: #F2F2F2;
    padding-top: 15px; }
  #edit-view div.scroll-wrapper {
    height: 470px;
    overflow-y: auto;
    overflow-x: hidden; }
  #edit-view #column-list ul.col {
    zoom: 1;
    display: inline-block;
    *display: inline;
    _height: 20px; }
    #edit-view #column-list ul.col li {
      padding: 2px 0px;
      width: 160px;
      text-indent: -18px;
      padding-left: 16px;
      float: left; }
      #edit-view #column-list ul.col li input {
        padding: 0px;
        border: none; }

#canvas-container {
  background: #FFF; }

#tab-navigation {
  color: #FFF;
  width: inherit;
  height: 48px;
  background: url("http://images.gocomics.com/images/google/gadget/gocomics.png") no-repeat right top; }
  #tab-navigation ul {
    background: #5e9100;
    background: -webkit-gradient(linear, left top, left bottom, from(#78ae07), to(#5e9100));
    background: -moz-linear-gradient(top, #78ae07, #5e9100);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#78ae07', endColorstr='#5e9100');
    border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -khtml-border-radius: 5px;
    zoom: 1;
    display: inline-block;
    *display: inline;
    _height: 20px; }
    #tab-navigation ul li {
      zoom: 1;
      display: inline-block;
      *display: inline;
      _height: 20px;
      border-right: 1px solid #629000;
      border-left: 1px solid #8CB94A; }
      #tab-navigation ul li a {
        font-weight: bold;
        color: #FFF;
        text-align: center;
        display: block;
        padding: 12px 20px 20px 20px; }
        #tab-navigation ul li a:active {
          color: #ebebeb; }
      #tab-navigation ul li a:hover, #tab-navigation ul li a.selected {
        background: #85b334;
        background: -webkit-gradient(linear, left top, left bottom, from(#78ae07), to(#85b334));
        background: -moz-linear-gradient(top, #78ae07, #85b334);
        filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#78ae07', endColorstr='#85b334'); }
      #tab-navigation ul li a.selected {
        cursor: inherit; }
      #tab-navigation ul li #myComics:hover, #tab-navigation ul li #myComics.selected {
        border-top-left-radius: 5px;
        border-bottom-left-radius: 5px;
        -webkit-border-top-left-radius: 5px;
        -webkit-border-bottom-left-radius: 5px;
        -moz-border-radius-topleft: 5px;
        -moz-border-radius-bottomleft: 5px; }
      #tab-navigation ul li #allComics:hover, #tab-navigation ul li #allComics.selected {
        border-top-right-radius: 5px;
        border-bottom-right-radius: 5px;
        -webkit-border-top-right-radius: 5px;
        -webkit-border-bottom-right-radius: 5px;
        -moz-border-radius-topright: 5px;
        -moz-border-radius-bottomright: 5px; }
    #tab-navigation ul li:first-child {
      border-left: none; }
    #tab-navigation ul li.last-li {
      border-right: none; }

#content {
  -moz-box-shadow: 0 0 5px 2px #aaaaaa;
  -webkit-box-shadow: 0 0 5px 2px #aaaaaa;
  box-shadow: 0 0 5px 2px #aaaaaa;
  border-radius: 5px;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -khtml-border-radius: 5px;
  border-top: 4px solid #71A9CC;
  position: relative;
  background: #FFF;
  top: -10px;
  padding-left: 10px;
  padding-top: 10px;
  padding-bottom: 10px; }
  #content p#support_link {
    position: absolute;
    bottom: 15px;
    right: 15px; }

#feature-and-comments {
  zoom: 1;
  display: inline-block;
  *display: inline;
  _height: 20px;
  border-radius: 5px;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -khtml-border-radius: 5px; }

#feature {
  background: white;
  background: -webkit-gradient(linear, left top, left bottom, from(#f2f2f2), to(white));
  background: -moz-linear-gradient(top, #f2f2f2, white);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f2f2f2', endColorstr='white');
  -moz-box-shadow: 0 0 5px 2px #bbbbbb;
  -webkit-box-shadow: 0 0 5px 2px #bbbbbb;
  box-shadow: 0 0 5px 2px #bbbbbb;
  border-radius: 5px;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -khtml-border-radius: 5px;
  border: 2px solid #FFF;
  padding: 15px;
  width: 615px;
  float: left;
  /* Sharing Block */
  /* End of sharingOptions */ }
  #feature div.loading {
    width: 615px;
    height: 200px;
    background: url("http://images.gocomics.com/images/google/gadget/ajax-loader.gif") no-repeat center;
    display: none; }
  #feature p.error {
    text-align: center;
    padding: 100px 0;
    font-weight: bold;
    font-size: 16px; }
  #feature .feature-header {
    width: 100%;
    margin-bottom: 25px; }
    #feature .feature-header h1 {
      float: left;
      font-size: 24px; }
      #feature .feature-header h1 .byline {
        color: #8e8e8e;
        font-size: 16px; }
    #feature .feature-header ul.feature-navigation {
      float: right;
      padding-top: 5px;
      line-height: 22px;
      text-align: right; }
      #feature .feature-header ul.feature-navigation li {
        zoom: 1;
        display: inline-block;
        *display: inline;
        _height: 20px;
        padding: 0 2px;
        vertical-align: top; }
        #feature .feature-header ul.feature-navigation li a {
          display: block;
          text-indent: -9999px;
          line-height: 19px;
          height: 19px;
          width: 21px; }
        #feature .feature-header ul.feature-navigation li a.prev {
          background: url("http://images.gocomics.com/images/google/gadget/sprite_feature.gif") no-repeat -21px -19px; }
          #feature .feature-header ul.feature-navigation li a.prev:hover {
            background-position: -21px 0px; }
        #feature .feature-header ul.feature-navigation li a.next {
          background: url("http://images.gocomics.com/images/google/gadget/sprite_feature.gif") no-repeat -63px -19px; }
          #feature .feature-header ul.feature-navigation li a.next:hover {
            background-position: -63px 0px; }
          #feature .feature-header ul.feature-navigation li a.next.disabled {
            background-position: -63px -57px !important; }
  #feature div.feature-image {
    width: inherit;
    text-align: center; }
  #feature ul.share-wrapper {
    border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -khtml-border-radius: 5px;
    -moz-box-shadow: 0 0 5px 1px #cccccc;
    -webkit-box-shadow: 0 0 5px 1px #cccccc;
    box-shadow: 0 0 5px 1px #cccccc;
    background: #e4e4e4;
    background: -webkit-gradient(linear, left top, left bottom, from(white), to(#e4e4e4));
    background: -moz-linear-gradient(top, white, #e4e4e4);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='white', endColorstr='#e4e4e4');
    font-size: 12px;
    border: 1px solid #CCC;
    text-align: center;
    text-transform: uppercase;
    margin-top: 10px; }
    #feature ul.share-wrapper li {
      zoom: 1;
      display: inline-block;
      *display: inline;
      _height: 20px; }
      #feature ul.share-wrapper li:hover {
        background: white;
        background: -webkit-gradient(linear, left top, left bottom, from(#e4e4e4), to(white));
        background: -moz-linear-gradient(top, #e4e4e4, white);
        filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e4e4e4', endColorstr='white'); }
      #feature ul.share-wrapper li a {
        background: #e4e4e4;
        background: -webkit-gradient(linear, left top, left bottom, from(white), to(#e4e4e4));
        background: -moz-linear-gradient(top, white, #e4e4e4);
        filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='white', endColorstr='#e4e4e4');
        width: 203.667px;
        padding: 11px 0;
        display: block;
        color: inherit; }
        #feature ul.share-wrapper li a:hover {
          background: white;
          background: -webkit-gradient(linear, left top, left bottom, from(#e4e4e4), to(white));
          background: -moz-linear-gradient(top, #e4e4e4, white);
          filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e4e4e4', endColorstr='white'); }
        #feature ul.share-wrapper li a:active {
          color: inherit; }
      #feature ul.share-wrapper li a#share, #feature ul.share-wrapper li a#share:hover {
        border-top-right-radius: 5px;
        border-bottom-right-radius: 5px;
        -webkit-border-top-right-radius: 5px;
        -webkit-border-bottom-right-radius: 5px;
        -moz-border-radius-topright: 5px;
        -moz-border-radius-bottomright: 5px;
        background: url("http://images.gocomics.com/images/google/gadget/arrow.gif") no-repeat 87% center; }
      #feature ul.share-wrapper li a#favorite {
        border-top-left-radius: 5px;
        border-bottom-left-radius: 5px;
        -webkit-border-top-left-radius: 5px;
        -webkit-border-bottom-left-radius: 5px;
        -moz-border-radius-topleft: 5px;
        -moz-border-radius-bottomleft: 5px;
        background: url("http://images.gocomics.com/images/google/gadget/favorite.png") no-repeat 35px 8px; }
        #feature ul.share-wrapper li a#favorite.selected, #feature ul.share-wrapper li a#favorite:hover {
          border-top-left-radius: 5px;
          border-bottom-left-radius: 5px;
          -webkit-border-top-left-radius: 5px;
          -webkit-border-bottom-left-radius: 5px;
          -moz-border-radius-topleft: 5px;
          -moz-border-radius-bottomleft: 5px;
          background: url("http://images.gocomics.com/images/google/gadget/favorited.png") no-repeat 35px 8px !important; }
    #feature ul.share-wrapper:first-child {
      border-left: none; }
    #feature ul.share-wrapper li.middle-item {
      border-left: 1px solid #DDD;
      border-right: 1px solid #DDD; }
  #feature div#sharingOptions {
    display: none;
    width: 582px;
    background-color: white;
    padding: 15px 10px 15px 10px;
    z-index: 100;
    border: 1px solid #CCC;
    margin-left: 5px;
    /* End of ul */ }
    #feature div#sharingOptions h3 {
      text-align: left;
      font-size: 12px;
      color: #8e8e8e;
      padding: 10px 0; }
      #feature div#sharingOptions h3 #counter {
        text-align: right;
        float: right;
        color: #d5d5d5; }
    #feature div#sharingOptions textarea {
      width: inherit;
      text-align: left; }
    #feature div#sharingOptions h5 {
      color: #E75000;
      font-size: 12px;
      text-transform: uppercase;
      padding-bottom: 10px;
      text-align: center; }
    #feature div#sharingOptions form.share-email {
      width: 270px;
      float: left;
      margin: 0; }
      #feature div#sharingOptions form.share-email p textarea {
        height: 100px; }
      #feature div#sharingOptions form.share-email p textarea, #feature div#sharingOptions form.share-email p input {
        width: 230px;
        margin: 0 0 3px 0;
        padding: 4px; }
      #feature div#sharingOptions form.share-email p em {
        text-align: right;
        font-size: 10px;
        font-style: italic;
        font-weight: normal; }
      #feature div#sharingOptions form.share-email p label {
        font-size: 11px;
        line-height: 26px;
        font-weight: bold;
        color: #3A3A3A;
        text-align: left; }
      #feature div#sharingOptions form.share-email button {
        background: url("http://assets.gocomics.com/images/btn-search.gif") no-repeat;
        width: 98px;
        height: 34px;
        color: #fff;
        font: 15px/32px Arial, Times, serif;
        text-transform: uppercase;
        cursor: pointer;
        border: none;
        margin: 5px 0px 10px 0px; }
    #feature div#sharingOptions div.share-link {
      float: left;
      margin: 0px;
      text-align: center;
      width: 330px;
      height: 100px;
      margin-right: 10px;
      overflow: auto; }
      #feature div#sharingOptions div.share-link label {
        margin-bottom: 12px;
        padding: 10px 0px;
        margin: 0px aut;
        text-align: center;
        display: block; }
      #feature div#sharingOptions div.share-link a {
        border: 1px solid #ccc;
        padding: 5px;
        width: 300px;
        overflow: auto;
        margin-top: 10px; }
    #feature div#sharingOptions div.social-box {
      border-left: 1px #DDD solid;
      float: right;
      padding: 0px 20px 0px 0px; }
    #feature div#sharingOptions div.half-col {
      width: 280px;
      text-align: center;
      padding-top: 10px; }
      #feature div#sharingOptions div.half-col a {
        background: none;
        color: #3993be; }
    #feature div#sharingOptions ul {
      float: left;
      padding-bottom: 20px;
      /* End of li */ }
      #feature div#sharingOptions ul li {
        float: none;
        text-align: left;
        width: 110px;
        background: none;
        padding-bottom: 4px;
        /* End of a.facebook */ }
        #feature div#sharingOptions ul li a {
          background: url("http://assets.gocomics.com/images/btn-sprite-social.gif") no-repeat;
          line-height: 16px;
          padding: 0 0 0 45px;
          text-align: left;
          color: #424242; }
        #feature div#sharingOptions ul li a.myspace {
          background-position: 23px 0; }
        #feature div#sharingOptions ul li a.digg {
          background-position: 23px -32px; }
        #feature div#sharingOptions ul li a.delicious {
          background-position: 23px -48px; }
        #feature div#sharingOptions ul li a.twitter {
          background-position: 23px -64px; }
        #feature div#sharingOptions ul li a.reddit {
          background-position: 23px -80px; }
        #feature div#sharingOptions ul li a.stumbleupon {
          background-position: 23px -96px; }
        #feature div#sharingOptions ul li a.more {
          background: none; }
        #feature div#sharingOptions ul li a.facebook {
          /*  background-position:23px -16px; */
          background: none;
          padding: 0 0 0 24px; }

/* End of #feature */
#feature-comments {
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
  -webkit-border-bottom-left-radius: 5px;
  -webkit-border-bottom-right-radius: 5px;
  -moz-border-radius-bottomleft: 5px;
  -moz-border-radius-bottombottom: 5px;
  width: 400px;
  min-height: 400px;
  float: left;
  margin-right: 10px;
  overflow: hidden; }
  #feature-comments h2, #feature-comments ul {
    padding-left: 10px;
    padding-right: 10px; }
  #feature-comments h2 {
    font-size: 16px;
    padding: 15px 0 5px 0;
    margin-left: 10px;
    margin-right: 10px; }
    #feature-comments h2 a {
      font-size: 12px;
      text-decoration: underline; }
  #feature-comments h3 {
    padding-left: 10px;
    padding-top: 5px;
    font-weight: bold;
    color: #777; }
  #feature-comments ul {
    margin-top: 5px;
    margin-bottom: 5px; }
    #feature-comments ul li {
      border-radius: 5px;
      -webkit-border-radius: 5px;
      -moz-border-radius: 5px;
      -khtml-border-radius: 5px;
      background: #e4e4e4;
      background: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#e4e4e4));
      background: -moz-linear-gradient(top, #f4f4f4, #e4e4e4);
      filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f4f4f4', endColorstr='#e4e4e4');
      border: 1px solid #ccc;
      line-height: 1.4em;
      padding: 10px;
      margin-bottom: 10px; }
      #feature-comments ul li:first {
        border-top: none; }
      #feature-comments ul li h4 {
        font-weight: bold; }
      #feature-comments ul li em {
        padding-top: 5px;
        text-align: right;
        font-style: italic;
        font-size: 10px; }

#right-column {
  width: 290px;
  float: left;
  overflow: hidden; }
  #right-column #feature-list ul, #right-column #feature-list div.feature-list-header {
    padding-left: 15px;
    padding-right: 15px; }
  #right-column #feature-list ul.feature-list-tabs {
    height: 39px;
    border-bottom: 1px solid #B2B2B2; }
    #right-column #feature-list ul.feature-list-tabs li {
      zoom: 1;
      display: inline-block;
      *display: inline;
      _height: 20px; }
      #right-column #feature-list ul.feature-list-tabs li a {
        background: #cccccc;
        background: -webkit-gradient(linear, left top, left bottom, from(#dddddd), to(#cccccc));
        background: -moz-linear-gradient(top, #dddddd, #cccccc);
        border-top-left-radius: 5px;
        border-top-right-radius: 5px;
        -webkit-border-top-left-radius: 5px;
        -webkit-border-top-right-radius: 5px;
        -moz-border-radius-topleft: 5px;
        -moz-border-radius-topbottom: 5px;
        position: relative;
        top: 16px;
        display: block;
        font-weight: bold;
        padding: 6px 12px 5px 12px;
        color: #777; }
        #right-column #feature-list ul.feature-list-tabs li a:active {
          color: #ebebeb; }
      #right-column #feature-list ul.feature-list-tabs li a.selected {
        background: #0079b2;
        background: -webkit-gradient(linear, left top, left bottom, from(#3993be), to(#0079b2));
        background: -moz-linear-gradient(top, #3993be, #0079b2);
        color: #fff; }
  #right-column #feature-list div.feature-list-header {
    width: 260px;
    padding-top: 4px;
    padding-bottom: 8px;
    margin-top: 4px;
    font-size: 16px; }
    #right-column #feature-list div.feature-list-header h3 {
      float: left;
      padding: 4px 10px 10px 0px; }
    #right-column #feature-list div.feature-list-header p {
      font-size: 12px;
      color: #474747;
      line-height: 18px;
      float: left;
      padding-bottom: 10px; }
    #right-column #feature-list div.feature-list-header div.edit {
      font-weight: normal;
      float: left;
      color: #8e8e8e;
      font-size: 12px; }
      #right-column #feature-list div.feature-list-header div.edit a {
        border: 1px solid #7FAC48;
        width: auto; }
        #right-column #feature-list div.feature-list-header div.edit a:active {
          color: #fcfcfc; }
  #right-column #feature-list ul.feature-list-navigation {
    background: #0079b2;
    background: -webkit-gradient(linear, left top, left bottom, from(#3993be), to(#0079b2));
    background: -moz-linear-gradient(top, #3993be, #0079b2);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#3993be', endColorstr='#0079b2');
    border-bottom: 1px solid #CCC;
    border-top: 1px solid #DDD;
    margin-bottom: 5px;
    padding-top: 5px;
    padding-bottom: 5px;
    font-weight: bold; }
    #right-column #feature-list ul.feature-list-navigation li a {
      color: #FFF;
      vertical-align: top;
      line-height: 20px; }
      #right-column #feature-list ul.feature-list-navigation li a:hover {
        color: #EBEBEB; }
      #right-column #feature-list ul.feature-list-navigation li a span#next_arrow {
        background: url("http://images.gocomics.com/images/google/gadget/sprite_feature.gif") no-repeat -63px -19px;
        margin-left: 2px; }
        #right-column #feature-list ul.feature-list-navigation li a span#next_arrow:hover {
          background-position: -63px 0px; }
      #right-column #feature-list ul.feature-list-navigation li a span#prev_arrow {
        background: url("http://images.gocomics.com/images/google/gadget/sprite_feature.gif") no-repeat -21px -19px;
        margin-right: 2px; }
        #right-column #feature-list ul.feature-list-navigation li a span#prev_arrow:hover {
          background-position: -21px 0px; }
      #right-column #feature-list ul.feature-list-navigation li a span {
        display: inline-block;
        text-indent: -9999px;
        line-height: 19px;
        height: 19px;
        width: 21px; }
    #right-column #feature-list ul.feature-list-navigation li.first {
      float: left; }
    #right-column #feature-list ul.feature-list-navigation li.second {
      float: right; }
  #right-column #feature-list ul.features {
    padding: 0px 3px 0px 10px;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 13px 0px;
    margin-right: 15px; }
    #right-column #feature-list ul.features li {
      padding: 0;
      margin: 0; }
      #right-column #feature-list ul.features li a {
        border-bottom: 1px solid #E2E2E2;
        cursor: pointer;
        display: block;
        color: #0079B2;
        font-weight: bold;
        padding: 5px 15px; }
        #right-column #feature-list ul.features li a:hover {
          background: #e7f2ff; }
      #right-column #feature-list ul.features li a.selected {
        color: #E75000 !important;
        background: url("http://assets.gocomics.com/images/icon/bullet-orange.png") no-repeat left center; }
    #right-column #feature-list ul.features li.not-found {
      display: block;
      padding: 5px;
      font-weight: bold; }

/* ADVERTISEMENT STYLING */
#ad-banner {
  width: 950px;
  height: 110px;
  padding: 10px 0px 0px 0px;
  text-indent: 100px;
  overflow: hidden; }

#ad-sky {
  width: 175px;
  height: 610px;
  padding: 10px;
  margin: 10px;
  float: left;
  padding: 0px;
  margin: 10px 0px 15px 0px;
  overflow: hidden; }

#ad-rect {
  width: 336px;
  height: 268px;
  padding: 10px;
  margin: 10px;
  padding: 0px;
  margin: 15px 0px 0px 0px;
  float: left;
  overflow: hidden; }

.ad-rect-edit {
  float: none !important;
  position: absolute;
  top: 35px;
  right: -15px; }

#ad-house {
  width: 250px;
  height: 250px;
  padding: 10px;
  margin: 10px;
  padding: 0px;
  margin: 15px 0px 0px 0px;
  float: left;
  overflow: hidden; }

.ad-house-edit {
  float: none !important;
  position: absolute;
  top: 300px;
  right: 71px; }
</style>
		
		
		<!--[if IE]>
			<style type="text/css">#content {
  border-right: 1px solid #cccccc;
  border-bottom: 1px solid #cccccc;
  border-left: 1px solid #cccccc; }

#feature {
  width: 615px;
  border: 1px solid #AAA; }
  #feature div.loading {
    width: 600px; }
  #feature ul.share-wrapper li a {
    width: 192px; }

ul.features li a {
  padding-top: 0px; }

#feature-comments {
  margin: 0 8px; }
  #feature-comments #comments {
    width: 100%; }

#right-column {
  width: 305px; }
  #right-column #feature-list ul.feature-list-tabs {
    height: 25px;
    margin: 15px 0px 10px 0px; }
    #right-column #feature-list ul.feature-list-tabs li {
      margin-right: 5px; }
      #right-column #feature-list ul.feature-list-tabs li a {
        position: static;
        font-weight: bolder;
        background: #ddd;
        padding-bottom: 6px; }
      #right-column #feature-list ul.feature-list-tabs li a.selected {
        position: static;
        font-weight: bolder;
        background: #0079b2; }
  #right-column #feature-list div.feature-list-header {
    padding-bottom: 4px;
    margin-top: 8px; }
  #right-column #feature-list ul.feature-list-navigation {
    width: 100%; }
    #right-column #feature-list ul.feature-list-navigation li {
      width: auto; }
      #right-column #feature-list ul.feature-list-navigation li span#prev_arrow {
        float: left; }
      #right-column #feature-list ul.feature-list-navigation li span {
        display: inline-block; }
    #right-column #feature-list ul.feature-list-navigation li.first {
      float: left; }
    #right-column #feature-list ul.feature-list-navigation li.second {
      float: right; }
  #right-column #feature-list ul.features {
    margin: 0px; }
    #right-column #feature-list ul.features li a {
      padding-top: 0px;
      padding-bottom: 3px; }
</style>
		<![endif]-->
		
		<div id="canvas">
	<div id="ad-banner"><iframe src="" frameborder="0" marginwidth="0" marginheight="0" ></iframe></div>
	<div id="canvas-container">
		<div id="tab-navigation">
			<ul><li><a href="#" id="MyComics" class="top-tab">My Comics</a></li><li><a href="#" id="Favorites" class="top-tab">Favorites</a></li><li class="last-li"><a href="#" id="AllComics" class="top-tab">All Comics</a></li></ul>
		</div>
		<div id="content">
			<div id="feature-and-comments">
				<div id="edit-view"></div>
				<div id="feature"></div>
				<div id="right-column">
					<div id="feature-list"></div>
				</div>
				<div class="clear"></div>
				<div id="ad-sky"><iframe src="" frameborder="0" marginwidth="0" marginheight="0" ></iframe></div>
				<div id="feature-comments"></div>
				<div id="ad-rect"><iframe src="" frameborder="0" marginwidth="0" marginheight="0" ></iframe></div>
				<div id="ad-house"><iframe src="" frameborder="0" marginwidth="0" marginheight="0" ></iframe></div>
				</div>
				<p id="support_link">Technical issues or feedback? <a href="mailto:support@uclick.com?subject=GoComics Google Gadget 2.0 Feedback">Contact the GoComics Team</a>.</p>
			</div>
		</div>
	</div>
	<div class="clear"></div>
</div>

<script id="feature-template" type="text/mustache-tmpl">
	{{#error}}
		<p class="error">{{error}}</p>
	{{/error}}
	{{^error}}
	<div class="loading"></div>
	<div class="feature-header">
		<h1>{{title}} <span class="byline">by {{author}}</span></h1>
		<ul class="feature-navigation">
			<li>{{display_date}}</li>
			<li><a {{#previous_id}}href="{{previous_id}}" {{/previous_id}} name="14_day_message" class="prev{{^previous_id}} disabled{{/previous_id}}" title="Navigate to the previous days strip."></a></li>
			<li><a {{#next_id}}href="{{next_id}}" {{/next_id}}class="next{{^next_id}} disabled{{/next_id}}" title="Navigate to the next days strip."></a></li>
		</ul>
	</div>
	<div class="feature-image">
		<a href="{{gocomics_link}}?utm_source=google&utm_medium=gadget&utm_campaign=gadget_clickthrough" target="_blank">
			<img src="{{image_link}}" alt="{{title}}" />
		</a>
	</div>
	<ul class="share-wrapper"><li><a href="{{id}}" id="favorite">{{#favorite}}Unfavorite{{/favorite}}{{^favorite}}Favorite{{/favorite}}</a></li><li class="middle-item"><a href="{{feature_id}}" id="subscribe">{{#subscribed}}Remove from My Comics{{/subscribed}}{{^subscribed}}Add to My Comics{{/subscribed}}</a></li><li id="share-item"><a href="{{id}}" id="share">Share</a></li></ul>
	<div id="sharingOptions">
				<div class="share-link">
				<h5>Email this to a friend</h5>
		    <label for="feature-link">CLICK THE LINK BELOW:</label>
		     	<a href="mailto:Your-Friend?subject=Thought you might like this {{title}} comic&body={{gocomics_link}}?utm_source=google%26utm_medium=gadget%26utm_campaign=gadget_clickthrough">{{gocomics_link}}</a>
		    </div>
	      <div class="social-box">
	      <h5>Bookmark And Share</h5>
	      <ul>
	        <li>
	          <!-- <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> -->
	          <a href="#" class="twitter" target="_blank">Twitter</a>
					</li>
	        <li>
						<a name="fb_share" target="_blank" type="icon_link" href="http://www.facebook.com/sharer.php?u={{gocomics_link}}" class="facebook"><img src="http://static.ak.fbcdn.net//rsrc.php//v1//y2//r//ECSptXRJiXu.gif" /> Facebook</a>
	        </li>
	        <li><a href="http://www.reddit.com/submit?url={{gocomics_link}}?utm_source=google%26utm_medium=gadget%26utm_campaign=gadget_clickthrough%26title={{title}} on Gocomics.com" class="reddit" target="_blank">reddit</a>
					</li>
	        <li>
	          <form id="myspacepostto" method="post" action="http://www.myspace.com/index.cfm?fuseaction=postto" target="_blank">
	            <input type="hidden" name="t" value="{{title}}">
	            <input type="hidden" name="c" value="&lt;a href='{{gocomics_link}}?utm_source=google%26utm_medium=gadget%26utm_campaign=gadget_clickthrough'&gt;&lt;img src=''/&gt;&lt;/a&gt;">
	            <input type="hidden" name="u" value="{{gocomics_link}}?utm_source=google%26utm_medium=gadget%26utm_campaign=gadget_clickthrough">
	            <input type="hidden" name="l" value="1">
	            <a href="#" onclick="document.getElementById('myspacepostto').submit();return false;" class="myspace">MySpace!</a>
	          </form>
	        </li>
	      </ul>
	      <ul>
	        <li><a href="http://www.stumbleupon.com/submit?url={{gocomics_link}}?utm_source=google%26utm_medium=gadget%26utm_campaign=gadget_clickthrough%26title={{title}}" class="stumbleupon" target="_blank">StumbleUpon</a></li>
	        <li><a href="http://digg.com/submit?url={{gocomics_link}}?utm_source=google%26utm_medium=gadget%26utm_campaign=gadget_clickthrough%26title={{title}}%26bodytext={{title}} on GoComics.com%26media=image%26topic=comic_animation" class="digg" target="_blank">Digg</a></li>
	        <li>
	          <a href="http://delicious.com/save" onclick="window.open('http://delicious.com/save?v=5%26noui%26jump=close%26url='+encodeURIComponent(location.href)+'%26title='+encodeURIComponent(document.title), 'delicious','toolbar=no,width=550,height=550'); return false;" class="delicious">Delicious</a>
	        </li>
	      </ul>
	    </div>
		<div class="clear"></div>
	</div>
	{{/error}}
</script>

<script id="feature-list-template" type="text/mustache-tmpl">
	<ul class="feature-list-tabs">
		{{#feature_groups}}
			<li class="little-tab"><a href="#" id="{{slug}}">{{title}}</a></li>
		{{/feature_groups}}
	</ul>
	<div class="feature-list-header">
		<h3>{{title}}</h3>{{#isMyComics}}<div class="edit"><a href="#" class="little-button">Edit</a></div>{{/isMyComics}}
		<div class="clear"></div>
		<p>{{description}}</phe>
		</div>
	<div class="clear"></div>
	<ul class="feature-list-navigation">
		<li class="first">
		  <a href="#"><span id="prev_arrow" title="Navigate to the previous feature"></span></a>
			<a href="#" class="prev"> Previous {{itemType}}</a>
		</li>
		<li class="second">
			<a href="#" class="next">Next {{itemType}} </a>
			<a href="#"><span id="next_arrow" title="Navigate to the next feature"></span></a>
		</li>
		<div class="clear"></div>
	</ul>
	<ul class="features">
		{{#features}}
			<li>
				<a id="{{feature_id}}{{^feature_id}}{{id}}{{/feature_id}}" href="{{id}}">
					{{title}}{{#extraData}} &ndash; {{extraData}}{{/extraData}}
				</a>
			</li>
		{{/features}}
		{{^features}}
			<li class="not-found">
				No features found.
			</li>
		{{/features}}
	</ul>
</script>

<script id="feature-comments-template" type="text/mustache-tmpl">
	{{^error}}
	<h2>Comments from GoComics.com {{#feature}}<a href="{{gocomics_link}}?utm_source=google&utm_medium=gadget&utm_campaign=gadget_clickthrough#comment-anchor" target="_blank">Leave a Comment</a>{{/feature}}</h2>
	{{^comments}}
	<h3>There are currently no comments for this feature.</h3>
	{{/comments}}
	<ul>
	{{#comments}}
			<li>
				<h4><a href="{{commenter_link}}?utm_source=google&utm_medium=gadget&utm_campaign=gadget_clickthrough" target="_blank">{{commenter_name}}</a>	says:</h4>
			<em>at {{timestamp}}</em>
			<p>{{body}}</p>
		</li>
	{{/comments}}
	</ul>
	{{/error}}
</script>

<script id="edit-view-template" type="text/mustache-tmpl">
	<div id="edit-header">
		<h2>Edit Comics</h2>
		<div class="save"><a href="#" class="little-button">Save</a></div>
		<div class="cancel"><a href="#" class="little-button">Cancel</a></div>
	</div>
	<p>Choose from the comic titles below to update your My Comics tab.</p>
	<div class="scroll-wrapper">
		<div id="column-list"></div>
		<ul id="column-list">
		{{#features}}
			<li>
				<input type="checkbox" value="{{id}}"{{#inMyComics}} checked="checked"{{/inMyComics}}>{{title}}</input>
			</li>
		{{/features}}
		</ul>
	</div>
</script>

<!-- ANALYTICS -->
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-273330-36']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
	
		<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script>
		
		
			<script type="text/javascript">/*
  mustache.js — Logic-less templates in JavaScript

  See http://mustache.github.com/ for more info.
*/

var Mustache = function() {
  var Renderer = function() {};

  Renderer.prototype = {
    otag: "{{",
    ctag: "}}",
    pragmas: {},
    buffer: [],
    pragmas_implemented: {
      "IMPLICIT-ITERATOR": true
    },
    context: {},

    render: function(template, context, partials, in_recursion) {
      // reset buffer & set context
      if(!in_recursion) {
        this.context = context;
        this.buffer = []; // TODO: make this non-lazy
      }

      // fail fast
      if(!this.includes("", template)) {
        if(in_recursion) {
          return template;
        } else {
          this.send(template);
          return;
        }
      }

      template = this.render_pragmas(template);
      var html = this.render_section(template, context, partials);
      if(in_recursion) {
        return this.render_tags(html, context, partials, in_recursion);
      }

      this.render_tags(html, context, partials, in_recursion);
    },

    /*
      Sends parsed lines
    */
    send: function(line) {
      if(line != "") {
        this.buffer.push(line);
      }
    },

    /*
      Looks for %PRAGMAS
    */
    render_pragmas: function(template) {
      // no pragmas
      if(!this.includes("%", template)) {
        return template;
      }

      var that = this;
      var regex = new RegExp(this.otag + "%([\\w-]+) ?([\\w]+=[\\w]+)?" +
            this.ctag);
      return template.replace(regex, function(match, pragma, options) {
        if(!that.pragmas_implemented[pragma]) {
          throw({message: 
            "This implementation of mustache doesn't understand the '" +
            pragma + "' pragma"});
        }
        that.pragmas[pragma] = {};
        if(options) {
          var opts = options.split("=");
          that.pragmas[pragma][opts[0]] = opts[1];
        }
        return "";
        // ignore unknown pragmas silently
      });
    },

    /*
      Tries to find a partial in the curent scope and render it
    */
    render_partial: function(name, context, partials) {
      name = this.trim(name);
      if(!partials || partials[name] === undefined) {
        throw({message: "unknown_partial '" + name + "'"});
      }
      if(typeof(context[name]) != "object") {
        return this.render(partials[name], context, partials, true);
      }
      return this.render(partials[name], context[name], partials, true);
    },

    /*
      Renders inverted (^) and normal (#) sections
    */
    render_section: function(template, context, partials) {
      if(!this.includes("#", template) && !this.includes("^", template)) {
        return template;
      }

      var that = this;
      // CSW - Added "+?" so it finds the tighest bound, not the widest
      var regex = new RegExp(this.otag + "(\\^|\\#)\\s*(.+)\\s*" + this.ctag +
              "\n*([\\s\\S]+?)" + this.otag + "\\/\\s*\\2\\s*" + this.ctag +
              "\\s*", "mg");

      // for each {{#foo}}{{/foo}} section do...
      return template.replace(regex, function(match, type, name, content) {
        var value = that.find(name, context);
        if(type == "^") { // inverted section
          if(!value || that.is_array(value) && value.length === 0) {
            // false or empty list, render it
            return that.render(content, context, partials, true);
          } else {
            return "";
          }
        } else if(type == "#") { // normal section
          if(that.is_array(value)) { // Enumerable, Let's loop!
            return that.map(value, function(row) {
              return that.render(content, that.create_context(row),
                partials, true);
            }).join("");
          } else if(that.is_object(value)) { // Object, Use it as subcontext!
            return that.render(content, that.create_context(value),
              partials, true);
          } else if(typeof value === "function") {
            // higher order section
            return value.call(context, content, function(text) {
              return that.render(text, context, partials, true);
            });
          } else if(value) { // boolean section
            return that.render(content, context, partials, true);
          } else {
            return "";
          }
        }
      });
    },

    /*
      Replace {{foo}} and friends with values from our view
    */
    render_tags: function(template, context, partials, in_recursion) {
      // tit for tat
      var that = this;

      var new_regex = function() {
        return new RegExp(that.otag + "(=|!|>|\\{|%)?([^\\/#\\^]+?)\\1?" +
          that.ctag + "+", "g");
      };

      var regex = new_regex();
      var tag_replace_callback = function(match, operator, name) {
        switch(operator) {
        case "!": // ignore comments
          return "";
        case "=": // set new delimiters, rebuild the replace regexp
          that.set_delimiters(name);
          regex = new_regex();
          return "";
        case ">": // render partial
          return that.render_partial(name, context, partials);
        case "{": // the triple mustache is unescaped
          return that.find(name, context);
        default: // escape the value
          return that.escape(that.find(name, context));
        }
      };
      var lines = template.split("\n");
      for(var i = 0; i < lines.length; i++) {
        lines[i] = lines[i].replace(regex, tag_replace_callback, this);
        if(!in_recursion) {
          this.send(lines[i]);
        }
      }

      if(in_recursion) {
        return lines.join("\n");
      }
    },

    set_delimiters: function(delimiters) {
      var dels = delimiters.split(" ");
      this.otag = this.escape_regex(dels[0]);
      this.ctag = this.escape_regex(dels[1]);
    },

    escape_regex: function(text) {
      // thank you Simon Willison
      if(!arguments.callee.sRE) {
        var specials = [
          '/', '.', '*', '+', '?', '|',
          '(', ')', '[', ']', '{', '}', '\\'
        ];
        arguments.callee.sRE = new RegExp(
          '(\\' + specials.join('|\\') + ')', 'g'
        );
      }
      return text.replace(arguments.callee.sRE, '\\$1');
    },

    /*
      find `name` in current `context`. That is find me a value
      from the view object
    */
    find: function(name, context) {
      name = this.trim(name);

      // Checks whether a value is thruthy or false or 0
      function is_kinda_truthy(bool) {
        return bool === false || bool === 0 || bool;
      }

      var value;
      if(is_kinda_truthy(context[name])) {
        value = context[name];
      } else if(is_kinda_truthy(this.context[name])) {
        value = this.context[name];
      }

      if(typeof value === "function") {
        return value.apply(context);
      }
      if(value !== undefined) {
        return value;
      }
      // silently ignore unkown variables
      return "";
    },

    // Utility methods

    /* includes tag */
    includes: function(needle, haystack) {
      return haystack.indexOf(this.otag + needle) != -1;
    },

    /*
      Does away with nasty characters
    */
    escape: function(s) {
      s = String(s === null ? "" : s);
      return s.replace(/&(?!\w+;)|["'<>\\]/g, function(s) {
        switch(s) {
        case "&": return "&amp;";
        case "\\": return "\\\\";
        case '"': return '&quot;';
        case "'": return '&#39;';
        case "<": return "&lt;";
        case ">": return "&gt;";
        default: return s;
        }
      });
    },

    // by @langalex, support for arrays of strings
    create_context: function(_context) {
      if(this.is_object(_context)) {
        return _context;
      } else {
        var iterator = ".";
        if(this.pragmas["IMPLICIT-ITERATOR"]) {
          iterator = this.pragmas["IMPLICIT-ITERATOR"].iterator;
        }
        var ctx = {};
        ctx[iterator] = _context;
        return ctx;
      }
    },

    is_object: function(a) {
      return a && typeof a == "object";
    },

    is_array: function(a) {
      return Object.prototype.toString.call(a) === '[object Array]';
    },

    /*
      Gets rid of leading and trailing whitespace
    */
    trim: function(s) {
      return s.replace(/^\s*|\s*$/g, "");
    },

    /*
      Why, why, why? Because IE. Cry, cry cry.
    */
    map: function(array, fn) {
      if (typeof array.map == "function") {
        return array.map(fn);
      } else {
        var r = [];
        var l = array.length;
        for(var i = 0; i < l; i++) {
          r.push(fn(array[i]));
        }
        return r;
      }
    }
  };

  return({
    name: "mustache.js",
    version: "0.3.1-dev",

    /*
      Turns a template and view into HTML
    */
    to_html: function(template, view, partials, send_fun) {
      var renderer = new Renderer();
      if(send_fun) {
        renderer.send = send_fun;
      }
      renderer.render(template, view, partials);
      if(!send_fun) {
        return renderer.buffer.join("\n");
      }
    }
  });
}();
</script>
		
			<script type="text/javascript">// Underscore.js 1.1.6
// (c) 2011 Jeremy Ashkenas, DocumentCloud Inc.
// Underscore is freely distributable under the MIT license.
// Portions of Underscore are inspired or borrowed from Prototype,
// Oliver Steele's Functional, and John Resig's Micro-Templating.
// For all details and documentation:
// http://documentcloud.github.com/underscore
(function(){var p=this,C=p._,m={},i=Array.prototype,n=Object.prototype,f=i.slice,D=i.unshift,E=n.toString,l=n.hasOwnProperty,s=i.forEach,t=i.map,u=i.reduce,v=i.reduceRight,w=i.filter,x=i.every,y=i.some,o=i.indexOf,z=i.lastIndexOf;n=Array.isArray;var F=Object.keys,q=Function.prototype.bind,b=function(a){return new j(a)};typeof module!=="undefined"&&module.exports?(module.exports=b,b._=b):p._=b;b.VERSION="1.1.6";var h=b.each=b.forEach=function(a,c,d){if(a!=null)if(s&&a.forEach===s)a.forEach(c,d);else if(b.isNumber(a.length))for(var e=
0,k=a.length;e<k;e++){if(c.call(d,a[e],e,a)===m)break}else for(e in a)if(l.call(a,e)&&c.call(d,a[e],e,a)===m)break};b.map=function(a,c,b){var e=[];if(a==null)return e;if(t&&a.map===t)return a.map(c,b);h(a,function(a,g,G){e[e.length]=c.call(b,a,g,G)});return e};b.reduce=b.foldl=b.inject=function(a,c,d,e){var k=d!==void 0;a==null&&(a=[]);if(u&&a.reduce===u)return e&&(c=b.bind(c,e)),k?a.reduce(c,d):a.reduce(c);h(a,function(a,b,f){!k&&b===0?(d=a,k=!0):d=c.call(e,d,a,b,f)});if(!k)throw new TypeError("Reduce of empty array with no initial value");
return d};b.reduceRight=b.foldr=function(a,c,d,e){a==null&&(a=[]);if(v&&a.reduceRight===v)return e&&(c=b.bind(c,e)),d!==void 0?a.reduceRight(c,d):a.reduceRight(c);a=(b.isArray(a)?a.slice():b.toArray(a)).reverse();return b.reduce(a,c,d,e)};b.find=b.detect=function(a,c,b){var e;A(a,function(a,g,f){if(c.call(b,a,g,f))return e=a,!0});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(w&&a.filter===w)return a.filter(c,b);h(a,function(a,g,f){c.call(b,a,g,f)&&(e[e.length]=a)});return e};
b.reject=function(a,c,b){var e=[];if(a==null)return e;h(a,function(a,g,f){c.call(b,a,g,f)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=!0;if(a==null)return e;if(x&&a.every===x)return a.every(c,b);h(a,function(a,g,f){if(!(e=e&&c.call(b,a,g,f)))return m});return e};var A=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=!1;if(a==null)return e;if(y&&a.some===y)return a.some(c,d);h(a,function(a,b,f){if(e=c.call(d,a,b,f))return m});return e};b.include=b.contains=function(a,c){var b=
!1;if(a==null)return b;if(o&&a.indexOf===o)return a.indexOf(c)!=-1;A(a,function(a){if(b=a===c)return!0});return b};b.invoke=function(a,c){var d=f.call(arguments,2);return b.map(a,function(a){return(c.call?c||a:a[c]).apply(a,d)})};b.pluck=function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);var e={computed:-Infinity};h(a,function(a,b,f){b=c?c.call(d,a,b,f):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,
c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);var e={computed:Infinity};h(a,function(a,b,f){b=c?c.call(d,a,b,f):a;b<e.computed&&(e={value:a,computed:b})});return e.value};b.sortBy=function(a,c,d){return b.pluck(b.map(a,function(a,b,f){return{value:a,criteria:c.call(d,a,b,f)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;return c<d?-1:c>d?1:0}),"value")};b.sortedIndex=function(a,c,d){d||(d=b.identity);for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?e=g+1:f=g}return e};b.toArray=
function(a){if(!a)return[];if(a.toArray)return a.toArray();if(b.isArray(a))return a;if(b.isArguments(a))return f.call(a);return b.values(a)};b.size=function(a){return b.toArray(a).length};b.first=b.head=function(a,b,d){return b!=null&&!d?f.call(a,0,b):a[0]};b.rest=b.tail=function(a,b,d){return f.call(a,b==null||d?1:b)};b.last=function(a){return a[a.length-1]};b.compact=function(a){return b.filter(a,function(a){return!!a})};b.flatten=function(a){return b.reduce(a,function(a,d){if(b.isArray(d))return a.concat(b.flatten(d));
a[a.length]=d;return a},[])};b.without=function(a){var c=f.call(arguments,1);return b.filter(a,function(a){return!b.include(c,a)})};b.uniq=b.unique=function(a,c){return b.reduce(a,function(a,e,f){if(0==f||(c===!0?b.last(a)!=e:!b.include(a,e)))a[a.length]=e;return a},[])};b.intersect=function(a){var c=f.call(arguments,1);return b.filter(b.uniq(a),function(a){return b.every(c,function(c){return b.indexOf(c,a)>=0})})};b.zip=function(){for(var a=f.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),
e=0;e<c;e++)d[e]=b.pluck(a,""+e);return d};b.indexOf=function(a,c,d){if(a==null)return-1;var e;if(d)return d=b.sortedIndex(a,c),a[d]===c?d:-1;if(o&&a.indexOf===o)return a.indexOf(c);d=0;for(e=a.length;d<e;d++)if(a[d]===c)return d;return-1};b.lastIndexOf=function(a,b){if(a==null)return-1;if(z&&a.lastIndexOf===z)return a.lastIndexOf(b);for(var d=a.length;d--;)if(a[d]===b)return d;return-1};b.range=function(a,b,d){arguments.length<=1&&(b=a||0,a=0);d=arguments[2]||1;for(var e=Math.max(Math.ceil((b-a)/
d),0),f=0,g=Array(e);f<e;)g[f++]=a,a+=d;return g};b.bind=function(a,b){if(a.bind===q&&q)return q.apply(a,f.call(arguments,1));var d=f.call(arguments,2);return function(){return a.apply(b,d.concat(f.call(arguments)))}};b.bindAll=function(a){var c=f.call(arguments,1);c.length==0&&(c=b.functions(a));h(c,function(c){a[c]=b.bind(a[c],a)});return a};b.memoize=function(a,c){var d={};c||(c=b.identity);return function(){var b=c.apply(this,arguments);return l.call(d,b)?d[b]:d[b]=a.apply(this,arguments)}};b.delay=
function(a,b){var d=f.call(arguments,2);return setTimeout(function(){return a.apply(a,d)},b)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(f.call(arguments,1)))};var B=function(a,b,d){var e;return function(){var f=this,g=arguments,h=function(){e=null;a.apply(f,g)};d&&clearTimeout(e);if(d||!e)e=setTimeout(h,b)}};b.throttle=function(a,b){return B(a,b,!1)};b.debounce=function(a,b){return B(a,b,!0)};b.once=function(a){var b=!1,d;return function(){if(b)return d;b=!0;return d=a.apply(this,arguments)}};
b.wrap=function(a,b){return function(){var d=[a].concat(f.call(arguments));return b.apply(this,d)}};b.compose=function(){var a=f.call(arguments);return function(){for(var b=f.call(arguments),d=a.length-1;d>=0;d--)b=[a[d].apply(this,b)];return b[0]}};b.after=function(a,b){return function(){if(--a<1)return b.apply(this,arguments)}};b.keys=F||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var b=[],d;for(d in a)l.call(a,d)&&(b[b.length]=d);return b};b.values=function(a){return b.map(a,
b.identity)};b.functions=b.methods=function(a){return b.filter(b.keys(a),function(c){return b.isFunction(a[c])}).sort()};b.extend=function(a){h(f.call(arguments,1),function(b){for(var d in b)b[d]!==void 0&&(a[d]=b[d])});return a};b.defaults=function(a){h(f.call(arguments,1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,c){if(a===c)return!0;var d=typeof a;if(d!=
typeof c)return!1;if(a==c)return!0;if(!a&&c||a&&!c)return!1;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual)return a.isEqual(c);if(b.isDate(a)&&b.isDate(c))return a.getTime()===c.getTime();if(b.isNaN(a)&&b.isNaN(c))return!1;if(b.isRegExp(a)&&b.isRegExp(c))return a.source===c.source&&a.global===c.global&&a.ignoreCase===c.ignoreCase&&a.multiline===c.multiline;if(d!=="object")return!1;if(a.length&&a.length!==c.length)return!1;d=b.keys(a);var e=b.keys(c);if(d.length!=e.length)return!1;
for(var f in a)if(!(f in c)||!b.isEqual(a[f],c[f]))return!1;return!0};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(l.call(a,c))return!1;return!0};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=n||function(a){return E.call(a)==="[object Array]"};b.isArguments=function(a){return!(!a||!l.call(a,"callee"))};b.isFunction=function(a){return!(!a||!a.constructor||!a.call||!a.apply)};b.isString=function(a){return!!(a===""||a&&a.charCodeAt&&a.substr)};
b.isNumber=function(a){return!!(a===0||a&&a.toExponential&&a.toFixed)};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===!0||a===!1};b.isDate=function(a){return!(!a||!a.getTimezoneOffset||!a.setUTCFullYear)};b.isRegExp=function(a){return!(!a||!a.test||!a.exec||!(a.ignoreCase||a.ignoreCase===!1))};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.noConflict=function(){p._=C;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=
0;e<a;e++)b.call(d,e)};b.mixin=function(a){h(b.functions(a),function(c){H(c,b[c]=a[c])})};var I=0;b.uniqueId=function(a){var b=I++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g};b.template=function(a,c){var d=b.templateSettings;d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.interpolate,function(a,b){return"',"+b.replace(/\\'/g,"'")+",'"}).replace(d.evaluate||
null,function(a,b){return"');"+b.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+"__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');";d=new Function("obj",d);return c?d(c):d};var j=function(a){this._wrapped=a};b.prototype=j.prototype;var r=function(a,c){return c?b(a).chain():a},H=function(a,c){j.prototype[a]=function(){var a=f.call(arguments);D.call(a,this._wrapped);return r(c.apply(b,a),this._chain)}};b.mixin(b);h(["pop","push","reverse","shift","sort",
"splice","unshift"],function(a){var b=i[a];j.prototype[a]=function(){b.apply(this._wrapped,arguments);return r(this._wrapped,this._chain)}});h(["concat","join","slice"],function(a){var b=i[a];j.prototype[a]=function(){return r(b.apply(this._wrapped,arguments),this._chain)}});j.prototype.chain=function(){this._chain=!0;return this};j.prototype.value=function(){return this._wrapped}})();
</script>
		
			<script type="text/javascript">// Backbone.js 0.3.3
// (c) 2010 Jeremy Ashkenas, DocumentCloud Inc.
// Backbone may be freely distributed under the MIT license.
// For all details and documentation:
// http://documentcloud.github.com/backbone
(function(){var e;e=typeof exports!=="undefined"?exports:this.Backbone={};e.VERSION="0.3.3";var f=this._;if(!f&&typeof require!=="undefined")f=require("underscore")._;var h=this.jQuery||this.Zepto;e.emulateHTTP=false;e.emulateJSON=false;e.Events={bind:function(a,b){this._callbacks||(this._callbacks={});(this._callbacks[a]||(this._callbacks[a]=[])).push(b);return this},unbind:function(a,b){var c;if(a){if(c=this._callbacks)if(b){c=c[a];if(!c)return this;for(var d=0,g=c.length;d<g;d++)if(b===c[d]){c.splice(d,
1);break}}else c[a]=[]}else this._callbacks={};return this},trigger:function(a){var b,c,d,g;if(!(c=this._callbacks))return this;if(b=c[a]){d=0;for(g=b.length;d<g;d++)b[d].apply(this,Array.prototype.slice.call(arguments,1))}if(b=c.all){d=0;for(g=b.length;d<g;d++)b[d].apply(this,arguments)}return this}};e.Model=function(a,b){a||(a={});if(this.defaults)a=f.extend({},this.defaults,a);this.attributes={};this._escapedAttributes={};this.cid=f.uniqueId("c");this.set(a,{silent:true});this._previousAttributes=
f.clone(this.attributes);if(b&&b.collection)this.collection=b.collection;this.initialize(a,b)};f.extend(e.Model.prototype,e.Events,{_previousAttributes:null,_changed:false,initialize:function(){},toJSON:function(){return f.clone(this.attributes)},get:function(a){return this.attributes[a]},escape:function(a){var b;if(b=this._escapedAttributes[a])return b;b=this.attributes[a];return this._escapedAttributes[a]=(b==null?"":b).replace(/&(?!\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,
"&quot;")},set:function(a,b){b||(b={});if(!a)return this;if(a.attributes)a=a.attributes;var c=this.attributes,d=this._escapedAttributes;if(!b.silent&&this.validate&&!this._performValidation(a,b))return false;if("id"in a)this.id=a.id;for(var g in a){var i=a[g];if(!f.isEqual(c[g],i)){c[g]=i;delete d[g];if(!b.silent){this._changed=true;this.trigger("change:"+g,this,i,b)}}}!b.silent&&this._changed&&this.change(b);return this},unset:function(a,b){b||(b={});var c={};c[a]=void 0;if(!b.silent&&this.validate&&
!this._performValidation(c,b))return false;delete this.attributes[a];delete this._escapedAttributes[a];if(!b.silent){this._changed=true;this.trigger("change:"+a,this,void 0,b);this.change(b)}return this},clear:function(a){a||(a={});var b=this.attributes,c={};for(attr in b)c[attr]=void 0;if(!a.silent&&this.validate&&!this._performValidation(c,a))return false;this.attributes={};this._escapedAttributes={};if(!a.silent){this._changed=true;for(attr in b)this.trigger("change:"+attr,this,void 0,a);this.change(a)}return this},
fetch:function(a){a||(a={});var b=this,c=j(a.error,b,a);(this.sync||e.sync)("read",this,function(d){if(!b.set(b.parse(d),a))return false;a.success&&a.success(b,d)},c);return this},save:function(a,b){b||(b={});if(a&&!this.set(a,b))return false;var c=this,d=j(b.error,c,b),g=this.isNew()?"create":"update";(this.sync||e.sync)(g,this,function(i){if(!c.set(c.parse(i),b))return false;b.success&&b.success(c,i)},d);return this},destroy:function(a){a||(a={});var b=this,c=j(a.error,b,a);(this.sync||e.sync)("delete",
this,function(d){b.collection&&b.collection.remove(b);a.success&&a.success(b,d)},c);return this},url:function(){var a=k(this.collection);if(this.isNew())return a;return a+(a.charAt(a.length-1)=="/"?"":"/")+this.id},parse:function(a){return a},clone:function(){return new this.constructor(this)},isNew:function(){return!this.id},change:function(a){this.trigger("change",this,a);this._previousAttributes=f.clone(this.attributes);this._changed=false},hasChanged:function(a){if(a)return this._previousAttributes[a]!=
this.attributes[a];return this._changed},changedAttributes:function(a){a||(a=this.attributes);var b=this._previousAttributes,c=false,d;for(d in a)if(!f.isEqual(b[d],a[d])){c=c||{};c[d]=a[d]}return c},previous:function(a){if(!a||!this._previousAttributes)return null;return this._previousAttributes[a]},previousAttributes:function(){return f.clone(this._previousAttributes)},_performValidation:function(a,b){var c=this.validate(a);if(c){b.error?b.error(this,c):this.trigger("error",this,c,b);return false}return true}});
e.Collection=function(a,b){b||(b={});if(b.comparator){this.comparator=b.comparator;delete b.comparator}this._boundOnModelEvent=f.bind(this._onModelEvent,this);this._reset();a&&this.refresh(a,{silent:true});this.initialize(a,b)};f.extend(e.Collection.prototype,e.Events,{model:e.Model,initialize:function(){},toJSON:function(){return this.map(function(a){return a.toJSON()})},add:function(a,b){if(f.isArray(a))for(var c=0,d=a.length;c<d;c++)this._add(a[c],b);else this._add(a,b);return this},remove:function(a,
b){if(f.isArray(a))for(var c=0,d=a.length;c<d;c++)this._remove(a[c],b);else this._remove(a,b);return this},get:function(a){if(a==null)return null;return this._byId[a.id!=null?a.id:a]},getByCid:function(a){return a&&this._byCid[a.cid||a]},at:function(a){return this.models[a]},sort:function(a){a||(a={});if(!this.comparator)throw Error("Cannot sort a set without a comparator");this.models=this.sortBy(this.comparator);a.silent||this.trigger("refresh",this,a);return this},pluck:function(a){return f.map(this.models,
function(b){return b.get(a)})},refresh:function(a,b){a||(a=[]);b||(b={});this._reset();this.add(a,{silent:true});b.silent||this.trigger("refresh",this,b);return this},fetch:function(a){a||(a={});var b=this,c=j(a.error,b,a);(this.sync||e.sync)("read",this,function(d){b.refresh(b.parse(d));a.success&&a.success(b,d)},c);return this},create:function(a,b){var c=this;b||(b={});if(a instanceof e.Model)a.collection=c;else a=new this.model(a,{collection:c});return a.save(null,{success:function(d,g){c.add(d);
b.success&&b.success(d,g)},error:b.error})},parse:function(a){return a},chain:function(){return f(this.models).chain()},_reset:function(){this.length=0;this.models=[];this._byId={};this._byCid={}},_add:function(a,b){b||(b={});a instanceof e.Model||(a=new this.model(a,{collection:this}));var c=this.getByCid(a);if(c)throw Error(["Can't add the same model to a set twice",c.id]);this._byId[a.id]=a;this._byCid[a.cid]=a;a.collection=this;this.models.splice(this.comparator?this.sortedIndex(a,this.comparator):
this.length,0,a);a.bind("all",this._boundOnModelEvent);this.length++;b.silent||a.trigger("add",a,this,b);return a},_remove:function(a,b){b||(b={});a=this.getByCid(a)||this.get(a);if(!a)return null;delete this._byId[a.id];delete this._byCid[a.cid];delete a.collection;this.models.splice(this.indexOf(a),1);this.length--;b.silent||a.trigger("remove",a,this,b);a.unbind("all",this._boundOnModelEvent);return a},_onModelEvent:function(a,b){if(a==="change:id"){delete this._byId[b.previous("id")];this._byId[b.id]=
b}this.trigger.apply(this,arguments)}});f.each(["forEach","each","map","reduce","reduceRight","find","detect","filter","select","reject","every","all","some","any","include","invoke","max","min","sortBy","sortedIndex","toArray","size","first","rest","last","without","indexOf","lastIndexOf","isEmpty"],function(a){e.Collection.prototype[a]=function(){return f[a].apply(f,[this.models].concat(f.toArray(arguments)))}});e.Controller=function(a){a||(a={});if(a.routes)this.routes=a.routes;this._bindRoutes();
this.initialize(a)};var o=/:([\w\d]+)/g,p=/\*([\w\d]+)/g;f.extend(e.Controller.prototype,e.Events,{initialize:function(){},route:function(a,b,c){e.history||(e.history=new e.History);f.isRegExp(a)||(a=this._routeToRegExp(a));e.history.route(a,f.bind(function(d){d=this._extractParameters(a,d);c.apply(this,d);this.trigger.apply(this,["route:"+b].concat(d))},this))},saveLocation:function(a){e.history.saveLocation(a)},_bindRoutes:function(){if(this.routes)for(var a in this.routes){var b=this.routes[a];
this.route(a,b,this[b])}},_routeToRegExp:function(a){a=a.replace(o,"([^/]*)").replace(p,"(.*?)");return RegExp("^"+a+"$")},_extractParameters:function(a,b){return a.exec(b).slice(1)}});e.History=function(){this.handlers=[];this.fragment=this.getFragment();f.bindAll(this,"checkUrl")};var l=/^#*/;f.extend(e.History.prototype,{interval:50,getFragment:function(a){return(a||window.location).hash.replace(l,"")},start:function(){var a=document.documentMode;if(a=h.browser.msie&&(!a||a<=7))this.iframe=h('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow;
"onhashchange"in window&&!a?h(window).bind("hashchange",this.checkUrl):setInterval(this.checkUrl,this.interval);return this.loadUrl()},route:function(a,b){this.handlers.push({route:a,callback:b})},checkUrl:function(){var a=this.getFragment();if(a==this.fragment&&this.iframe)a=this.getFragment(this.iframe.location);if(a==this.fragment||a==decodeURIComponent(this.fragment))return false;if(this.iframe)window.location.hash=this.iframe.location.hash=a;this.loadUrl()},loadUrl:function(){var a=this.fragment=
this.getFragment();return f.any(this.handlers,function(b){if(b.route.test(a)){b.callback(a);return true}})},saveLocation:function(a){a=(a||"").replace(l,"");if(this.fragment!=a){window.location.hash=this.fragment=a;if(this.iframe&&a!=this.getFragment(this.iframe.location)){this.iframe.document.open().close();this.iframe.location.hash=a}}}});e.View=function(a){this._configure(a||{});this._ensureElement();this.delegateEvents();this.initialize(a)};var q=/^(\w+)\s*(.*)$/;f.extend(e.View.prototype,e.Events,
{tagName:"div",$:function(a){return h(a,this.el)},initialize:function(){},render:function(){return this},remove:function(){h(this.el).remove();return this},make:function(a,b,c){a=document.createElement(a);b&&h(a).attr(b);c&&h(a).html(c);return a},delegateEvents:function(a){if(a||(a=this.events)){h(this.el).unbind();for(var b in a){var c=a[b],d=b.match(q),g=d[1];d=d[2];c=f.bind(this[c],this);d===""?h(this.el).bind(g,c):h(this.el).delegate(d,g,c)}}},_configure:function(a){if(this.options)a=f.extend({},
this.options,a);if(a.model)this.model=a.model;if(a.collection)this.collection=a.collection;if(a.el)this.el=a.el;if(a.id)this.id=a.id;if(a.className)this.className=a.className;if(a.tagName)this.tagName=a.tagName;this.options=a},_ensureElement:function(){if(!this.el){var a={};if(this.id)a.id=this.id;if(this.className)a["class"]=this.className;this.el=this.make(this.tagName,a)}}});var m=function(a,b){var c=r(this,a,b);c.extend=m;return c};e.Model.extend=e.Collection.extend=e.Controller.extend=e.View.extend=
m;var s={create:"POST",update:"PUT","delete":"DELETE",read:"GET"};e.sync=function(a,b,c,d){var g=s[a];a=a==="create"||a==="update"?JSON.stringify(b.toJSON()):null;b={url:k(b),type:g,contentType:"application/json",data:a,dataType:"json",processData:false,success:c,error:d};if(e.emulateJSON){b.contentType="application/x-www-form-urlencoded";b.processData=true;b.data=a?{model:a}:{}}if(e.emulateHTTP)if(g==="PUT"||g==="DELETE"){if(e.emulateJSON)b.data._method=g;b.type="POST";b.beforeSend=function(i){i.setRequestHeader("X-HTTP-Method-Override",
g)}}h.ajax(b)};var n=function(){},r=function(a,b,c){var d;d=b&&b.hasOwnProperty("constructor")?b.constructor:function(){return a.apply(this,arguments)};n.prototype=a.prototype;d.prototype=new n;b&&f.extend(d.prototype,b);c&&f.extend(d,c);d.prototype.constructor=d;d.__super__=a.prototype;return d},k=function(a){if(!(a&&a.url))throw Error("A 'url' property or function must be specified");return f.isFunction(a.url)?a.url():a.url},j=function(a,b,c){return function(d){a?a(b,d):b.trigger("error",b,d,c)}}})();
</script>
		
			<script type="text/javascript">/**
 * jQuery-Plugin "ezColumns"
 * 
 * @version: 1.0.0, 1.07.2011
 * 
 * @author: Andres Vidal
 *          code@andresvidal.com
 *          http://www.andresvidal.com/labs/ezcolumns.html
 *
 * Instructions: Pass in a jQuery selector to the parent of the children to organize in columns.
 * When using UL LI, a {target} and {colWrapper} may be defined to properly set up the columns.
 *
 * @example: JavaScript: $("ul.list").ezColumns({colWrapper: '<ul class="col"></ul>', target: $("div.countries")});
 * HTML: <div class="countries"></div> <ul class="list"> <li>example1</li><li>example2</li> <li>example3</li> ... </ul>
 *
 * @colWrapper    string or DOM object  The HTML wrapper for each column. Default: <div class="col"></div>
 * @target        DOM object            The target element to append the columns. Default: plugin selector
 * @groups        DOM object collection A collection of DOM objects to organize into columns. Default: plugin selector children
 * @columns       string                The max number of columns to use. Default: 3
 * @callback      function              A function to run after the plugin finishes appending all elements to the DOM.
 * 
 */

(function($) {
	$.fn.ezColumns = function(options) {
		
		if( ! $(this).data("groups") ){
			//removes current elements after adding to data property
			$(this).data("groups", $(this).children().remove());
		}		
		
		var $data = $(this).data("groups").clone();
		
		var s = jQuery.extend({
			colWrapper: '<div class="col"></div>',
			target: this,
			groups: false,
			columns: 3,
			callback: function(){}
		}, options);
		
		s.groups = (s.groups) ? s.groups : $data;
		s.columns = (s.columns > s.groups.length) ? s.groups.length : s.columns;
		s.perColumn = Math.floor(s.groups.length / s.columns);
		s.mod = (s.groups.length % s.columns);
		
		$(s.target).empty();
		for(var x=0; x < s.columns; x++){			
			var g; //temp var
			if (x <= (s.mod-1)){
				g = s.groups.splice(0, s.perColumn + 1);				
			} else {
				g = s.groups.splice(0, s.perColumn);
			}			
			$(s.target).append( $(s.colWrapper).append(g) );
		}
		s.callback.call(this);
		return this; // return to jQuery
	};
})(jQuery);</script>
		
			<script type="text/javascript">var GLOBALS, adjustHeight, featureListHeight, generateBitlyAPIUrl, generateTwitterText, getAdUrl, getIdFromUrl, getPref, getStringPref, getTime, makeDataRequest, savePref, saveSettings, slugify;

GLOBALS = {
  rootUrl: "http://gocomics.com"
};

GLOBALS.feedUrl = "" + GLOBALS.rootUrl + "/feeds";

GLOBALS.image = {
  maxHeight: 115,
  maxWidth: 360
};

GLOBALS.navigation = {
  myComics: {
    title: 'My Comics',
    slug: 'MyComics',
    url: function(id) {
      return "" + GLOBALS.feedUrl + "/recent_item/" + id + ".json?comments=true";
    },
    featureGroups: [
      {
        title: 'My Comics',
        slug: 'mycomics',
        itemType: 'Comic',
        description: 'This tab contains a listing of your preferred comic features.  Each comic will update here when a new strip become available.',
        ids: [609, 9, 32]
      }
    ]
  },
  favorites: {
    title: 'Favorites',
    slug: 'favorites',
    url: function(id) {
      return "" + GLOBALS.feedUrl + "/item/" + id + ".json?comments=true";
    },
    featureGroups: [
      {
        title: 'My Favorites',
        slug: 'myfavorites',
        itemType: 'Favorite',
        description: 'This tab holds a collection of individual strips that you have saved.',
        ids: []
      }
    ]
  },
  allComics: {
    title: 'All Comics',
    slug: 'AllComics',
    url: function() {
      return "" + GLOBALS.feedUrl + "/features?min=true&category=comic";
    },
    featureGroups: [
      {
        title: 'Popular',
        slug: 'popular',
        itemType: 'Comic',
        description: 'This tab displays the most popular comic features currently available on the GoComics Google Gadget.',
        ids: [9, 32, 48, 56, 64, 66, 72, 93, 112, 124, 142, 569, 609, 613, 614, 615, 633, 679, 683, 689]
      }, {
        title: 'A-Z',
        slug: 'atoz',
        itemType: 'Comic',
        description: 'This tab displays an alphabetized list of all the comic features currently available on the GoComics Google Gadget.',
        itemType: 'Comic',
        ids: []
      }
    ]
  }
};

GLOBALS.ads = [
  {
    name: 'skyscraper',
    file: 'ad_edit.html',
    position: 'sky',
    size: '120x600,160x600',
    el: $('#ad-sky iframe')
  }, {
    name: 'sidehouse',
    file: 'ad_house.html',
    position: 'sidehouse',
    size: '210x227',
    el: $('#ad-house iframe')
  }, {
    name: 'banner',
    file: 'ad_banner.html',
    position: 'top',
    size: '468x60,728x90',
    el: $('#ad-banner iframe')
  }, {
    name: 'rectangle',
    file: 'ad_main.html',
    position: 'rect',
    size: '336x280,300x250',
    el: $('#ad-rect iframe')
  }
];

GLOBALS.bitlyApi = {
  login: 'universaluclick',
  key: 'R_954787182f7194ba7e39eb6a11ea2306'
};

GLOBALS.currentComicKey = 'currentcomic';

GLOBALS.adVars = {
  tile: null,
  ord: null,
  dcopt: null
};

adjustHeight = function() {
  window.setTimeout('gadgets.window.adjustHeight()', 300);
  return window.setTimeout('gadgets.window.adjustHeight()', 5000);
};

featureListHeight = function() {
  var feature_height;
  feature_height = $('div.feature-image').height() - 65;
  return $('ul.features').css('height', feature_height);
};

makeDataRequest = function(url, callback) {
  return gadgets.io.makeRequest(url, function(obj) {
    if (obj) return callback(obj.data);
  });
};

savePref = function(key, val) {
  var prefs;
  prefs = null;
  prefs = new gadgets.Prefs();
  return prefs.set(key, val);
};

saveSettings = function(group) {
  return savePref(group.slug, group.ids.join('|'));
};

getPref = function(key) {
  var prefs, result;
  prefs = null;
  prefs = new gadgets.Prefs();
  result = prefs.getString(key);
  if (result.length > 0) {
    return _(result.split('|')).map(function(r) {
      return parseInt(r);
    });
  } else {
    return [];
  }
};

getStringPref = function(key) {
  var prefs;
  prefs = null;
  prefs = new gadgets.Prefs();
  return prefs.getString(key);
};

slugify = function(str) {
  var from, i, to, _ref;
  str = str.replace(/^\s+|\s+$/g, '').toLowerCase();
  from = "àáäâèéëêìíïîòóöôùúüûñç·/_,:;";
  to = "aaaaeeeeiiiioooouuuunc------";
  for (i = 0, _ref = from.length; 0 <= _ref ? i <= _ref : i >= _ref; 0 <= _ref ? i++ : i--) {
    str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i));
  }
  return str.replace(/[^a-z0-9 -]/g, '').replace(/\s+/g, '-').replace(/-+/g, '-');
};

getTime = function(ts) {
  var ampm, dt, hour, rgx;
  rgx = ts.match(/(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)-(\d\d):(\d\d)/);
  if (rgx === null) return '';
  dt = new Date(rgx[1], rgx[2], rgx[3], rgx[4], rgx[5]);
  hour = dt.getHours();
  ampm = hour >= 12 ? 'pm' : 'am';
  if (hour >= 12) hour = hour - 12;
  if (hour === 0) hour = 12;
  return "" + (hour.toString()) + ":" + rgx[5] + " " + ampm;
};

getIdFromUrl = function(url) {
  var a;
  if (url === '' || url === null || url === void 0) return '';
  a = url.split('/');
  return a[a.length - 1];
};

generateBitlyAPIUrl = function(url) {
  url = escape("" + url + "?utm_source=google%26utm_medium=gadget%26utm_campaign=gadget_clickthrough");
  return "http://api.bitly.com/v3/shorten?login=universaluclick&apiKey=R_954787182f7194ba7e39eb6a11ea2306&longUrl=" + url + "&format=json";
};

generateTwitterText = function(title, url) {
  return "http://twitter.com/intent/tweet?status=Love+this+" + (escape(title)) + "+strip+on+Gocomics.com.+" + url;
};

getAdUrl = function(feature_code, ad) {
  return "http://images.gocomics.com/images/google/" + ad.file + "?feature_code=" + feature_code;
};
</script>
		
			<script type="text/javascript">var CanvasView, Feature, FeatureList, init;
var __hasProp = Object.prototype.hasOwnProperty, __indexOf = Array.prototype.indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (__hasProp.call(this, i) && this[i] === item) return i; } return -1; };

Feature = Backbone.Model.extend({
  history: [],
  url: function() {
    if (this.attributes.feature_id) {
      return GLOBALS.navigation.myComics.url(this.attributes.feature_id);
    } else if (this.attributes.id) {
      return GLOBALS.navigation.favorites.url(this.attributes.id);
    }
  }
});

FeatureList = Backbone.Collection.extend({
  BASE_URL: GLOBALS.featureListUrl,
  model: Feature,
  comparator: function(model) {
    var val;
    val = model.get('sort_name') || model.get('title');
    return val;
  },
  url: function() {
    return this.BASE_URL;
  }
});

CanvasView = Backbone.View.extend({
  el: $('#canvas-container'),
  template: $('#feature-template').html(),
  listTemplate: $('#feature-list-template').html(),
  commentTemplate: $('#feature-comments-template').html(),
  editTemplate: $('#edit-view-template').html(),
  collection: null,
  _features: null,
  _currentTab: null,
  _currentFeatureGroup: null,
  _currentFeature: null,
  _index: 0,
  _supportedViews: null,
  _allFeaturesCache: null,
  _fullFeatureCache: {},
  events: {
    'click #tab-navigation #MyComics': 'showMyComics',
    'click #tab-navigation #Favorites': 'showFavorites',
    'click #tab-navigation #AllComics': 'showAllComics',
    'click #feature-list .edit a': 'clickEditComics',
    'click #edit-view .save a': 'saveEditComics',
    'click #edit-view .cancel a': 'cancelEditComics',
    'click ul.feature-list-tabs li a': 'chooseFeatureGroup',
    'click ul.features a': 'chooseFeature',
    'click a.disabled': 'doNotDisplay',
    'click ul.feature-list-navigation .prev': 'previousFeature',
    'click ul.feature-list-navigation a span#prev_arrow': 'previousFeature',
    'click ul.feature-list-navigation .next': 'nextFeature',
    'click ul.feature-list-navigation a span#next_arrow': 'nextFeature',
    'click ul.feature-navigation a': 'navigateFeatureItemHistory',
    'click ul.share-wrapper #favorite': 'toggleFavorite',
    'click ul.share-wrapper #subscribe': 'toggleSubscribe',
    'click ul.share-wrapper #share': 'toggleSharingOptions',
    'keyup #comment-field': 'updateCommentCounter'
  },
  initialize: function() {
    _.bindAll(this, 'render', 'setCollection', 'setFeature');
    this.toggleLoading(true);
    this.params = gadgets.views.getParams();
    this.__mycomics = _.detect(GLOBALS.navigation.myComics.featureGroups, function(g) {
      return g.slug === 'mycomics';
    });
    this.__myfavorites = _.detect(GLOBALS.navigation.favorites.featureGroups, function(g) {
      return g.slug === 'myfavorites';
    });
    this.__popular = _.detect(GLOBALS.navigation.allComics.featureGroups, function(g) {
      return g.slug === 'popular';
    });
    this.__atoz = _.detect(GLOBALS.navigation.allComics.featureGroups, function(g) {
      return g.slug === 'atoz';
    });
    this.setTab(this.options.tab);
    this._supportedViews = gadgets.views.getSupportedViews();
    return this;
  },
  setTab: function(tab) {
    this._currentTab = tab;
    this.renderTab();
    return this.setFeatureGroup(this._currentTab.featureGroups[0]);
  },
  renderTab: function() {
    $("#tab-navigation a").removeClass('selected');
    return $("#tab-navigation #" + this._currentTab.slug).addClass('selected');
  },
  setFeatureGroup: function(group, force) {
    var dataSet, fromPrefs, setCollectionAfter, tabLocal, v;
    if (group === this._currentFeatureGroup && !force) {
      return this.collection;
    } else {
      this._currentFeatureGroup = group;
      fromPrefs = getPref(this._currentFeatureGroup.slug);
      if (fromPrefs.length > 0) this._currentFeatureGroup.ids = fromPrefs;
      if (this._currentTab.slug === 'AllComics') {
        v = this;
        if (!v._allFeaturesCache) {
          return makeDataRequest(v._currentTab.url(), function(obj) {
            var data;
            data = JSON.parse(obj).features;
            v._allFeaturesCache = data;
            if (v._currentFeatureGroup.ids.length > 0) {
              return v.setCollection(_.select(data, function(i) {
                var _ref;
                return _ref = i.id, __indexOf.call(v._currentFeatureGroup.ids, _ref) >= 0;
              }));
            } else {
              return v.setCollection(data);
            }
          });
        } else {
          if (v._currentFeatureGroup.ids.length > 0) {
            return v.setCollection(_.select(this._allFeaturesCache, function(i) {
              var _ref;
              return _ref = i.id, __indexOf.call(v._currentFeatureGroup.ids, _ref) >= 0;
            }));
          } else {
            return v.setCollection(this._allFeaturesCache);
          }
        }
      } else {
        dataSet = [];
        tabLocal = this._currentTab;
        if (this._currentFeatureGroup.ids.length <= 0) {
          return this.setCollection([]);
        }
        setCollectionAfter = _.after(this._currentFeatureGroup.ids.length, this.setCollection);
        return _(this._currentFeatureGroup.ids).each(function(id) {
          return makeDataRequest(tabLocal.url(id), function(obj) {
            dataSet.push(JSON.parse(obj));
            return setCollectionAfter(dataSet);
          });
        });
      }
    }
  },
  setCollection: function(data) {
    this.collection = new FeatureList(data);
    this.renderFeatureGroup();
    return this.collection;
  },
  renderFeatureGroup: function() {
    var currentComic, f, jsonTemp, _i, _len, _ref;
    jsonTemp = {
      title: this._currentFeatureGroup.title,
      slug: this._currentFeatureGroup.slug,
      itemType: this._currentFeatureGroup.itemType,
      description: this._currentFeatureGroup.description,
      feature_groups: this._currentTab.featureGroups,
      features: this.collection.toJSON(),
      isMyComics: this._currentFeatureGroup.slug === "mycomics"
    };
    if (this._currentTab.slug === 'favorites') {
      _ref = jsonTemp.features;
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
        f = _ref[_i];
        f.extraData = f.display_date;
      }
    }
    $('#feature-list').html(Mustache.to_html(this.listTemplate, jsonTemp));
    $('ul.feature-list-tabs li a').removeClass('selected');
    $("ul.feature-list-tabs li #" + this._currentFeatureGroup.slug).addClass('selected');
    adjustHeight();
    $('#feature-list ul.features li:even').addClass('alt');
    if (this.params.featureId) {
      this._index = _.indexOf(this.collection.pluck('feature_id'), this.params.featureId);
      this.params.featureId = null;
    } else if (this._currentFeatureGroup.slug === 'mycomics') {
      if (currentComic = getStringPref(GLOBALS.currentComicKey)) {
        this._index = _.indexOf(this.collection.pluck('feature_id'), parseInt(currentComic));
      }
    } else {
      this._index = 0;
    }
    this.setFeature(this._index);
    return this;
  },
  setFeature: function(i) {
    var v;
    this._currentFeature = this.collection.at(i);
    this.toggleLoading(true);
    if (!this._currentFeature) return this.render();
    if (this._currentFeatureGroup.slug === 'mycomics') {
      savePref(GLOBALS.currentComicKey, this._currentFeature.get('feature_id'));
    }
    if (typeof this._currentFeature.attributes.image_link === 'undefined') {
      v = this;
      return makeDataRequest(GLOBALS.navigation.myComics.url(v._currentFeature.id), function(obj) {
        v._currentFeature = new Feature(JSON.parse(obj));
        return v.render();
      });
    } else {
      return this.render();
    }
  },
  loadFeature: function(id) {
    var v;
    this.toggleLoading(true);
    if (this._currentFeature && !this._fullFeatureCache[this._currentFeature.id]) {
      this._fullFeatureCache[this._currentFeature.id] = this._currentFeature.attributes;
    }
    if (!this._fullFeatureCache[id]) {
      v = this;
      return makeDataRequest(GLOBALS.navigation.favorites.url(id), function(obj) {
        var data;
        data = JSON.parse(obj);
        v._currentFeature = new Feature(data);
        v._fullFeatureCache[id] = data;
        return v.render();
      });
    } else {
      this._currentFeature = new Feature(this._fullFeatureCache[id]);
      return this.render();
    }
  },
  render: function() {
    var commentJSON, commentSet, jsonTemp, _ref, _ref2;
    if (this._currentFeature) {
      this._currentFeature.set({
        previous_id: getIdFromUrl(this._currentFeature.attributes.previous_link),
        next_id: getIdFromUrl(this._currentFeature.attributes.next_link),
        favorite: (_ref = this._currentFeature.id, __indexOf.call(this.__myfavorites.ids, _ref) >= 0),
        subscribed: (_ref2 = this._currentFeature.attributes.feature_id, __indexOf.call(this.__mycomics.ids, _ref2) >= 0)
      });
      this.toggleLoading(false);
      $('#feature').html(Mustache.to_html(this.template, this._currentFeature.toJSON()));
      $('ul.features li a').removeClass('selected');
      $("ul.features li #" + this._currentFeature.attributes.feature_id).addClass('selected');
      window.setTimeout('featureListHeight()', 300);
      commentSet = $.extend(true, [], this._currentFeature.attributes.comments.slice(0, 5));
      _(commentSet).each(function(c) {
        c.body = $(c.body).text();
        return c.timestamp = getTime(c.timestamp);
      });
      commentJSON = {
        comments: commentSet,
        feature: this._currentFeature.toJSON()
      };
      $('#feature-comments').html(Mustache.to_html(this.commentTemplate, commentJSON));
      $('div#feature-comments ul li').first().addClass('first');
      this.populateTwitterURL();
    } else {
      jsonTemp = {
        error: 'Feature not found.'
      };
      $('#feature').html(Mustache.to_html(this.template, jsonTemp));
      $('#feature-comments').html(Mustache.to_html(this.commentTemplate, jsonTemp));
    }
    adjustHeight();
    this._shareOpen = false;
    this.setAds();
    if (this.params.isEditMode) {
      this.params.isEditMode = false;
      this.toggleEditComics(true);
    }
    this;
    return adjustHeight();
  },
  setAds: function() {
    var adType, _i, _len, _ref;
    _ref = GLOBALS.ads;
    for (_i = 0, _len = _ref.length; _i < _len; _i++) {
      adType = _ref[_i];
      this.renderAd(adType);
    }
    return adjustHeight();
  },
  renderAd: function(ad) {
    var adUrl;
    adUrl = getAdUrl(this._currentFeature.get('feature_code'), ad);
    if (adUrl === '') return;
    return ad.el.attr('src', adUrl);
  },
  toggleEditComics: function(enable) {
    var speed;
    speed = 'fast';
    $('#edit-view').slideToggle(speed);
    $('#feature').slideToggle(speed);
    $('#feature-comments').slideToggle(speed);
    $('div.clear').slideToggle(speed);
    $('div#ad-sky').slideToggle(speed);
    $('div#ad-rect').toggleClass('ad-rect-edit');
    $('div#ad-house').toggleClass('ad-house-edit');
    $('div#tab-navigation').slideToggle(speed);
    $('div#feature-list').slideToggle(speed);
    if (enable) {
      return this.loadEditView();
    } else {
      return this.setFeatureGroup(this._currentFeatureGroup, true);
    }
  },
  loadEditView: function() {
    var v;
    v = this;
    if (!v._allFeaturesCache) {
      return makeDataRequest(GLOBALS.navigation.allComics.url(), function(obj) {
        var data;
        data = JSON.parse(obj).features;
        v._allFeaturesCache = data;
        return v.renderEditView();
      });
    } else {
      return this.renderEditView();
    }
  },
  renderEditView: function() {
    var f, jsonTemp, _i, _len, _ref, _ref2;
    _ref = this._allFeaturesCache;
    for (_i = 0, _len = _ref.length; _i < _len; _i++) {
      f = _ref[_i];
      f.inMyComics = (_ref2 = f.id, __indexOf.call(this.__mycomics.ids, _ref2) >= 0);
    }
    jsonTemp = {
      features: this._allFeaturesCache
    };
    $('#edit-view').html(Mustache.to_html(this.editTemplate, jsonTemp));
    $('#edit-view ul#column-list').ezColumns({
      colWrapper: '<ul class="col"></ul>',
      target: $('div#column-list'),
      callback: adjustHeight()
    });
    adjustHeight();
    return this;
  },
  toggleLoading: function(enable) {
    if (enable) {
      $('#feature').children().hide();
      $('#feature-comments').hide();
      return $('div.loading').show();
    } else {
      $('#feature').children().show();
      $('#feature-comments').show();
      return $('div.loading').hide();
    }
  },
  populateTwitterURL: function() {
    var callUrl, title;
    callUrl = generateBitlyAPIUrl(this._currentFeature.attributes.gocomics_link);
    title = this._currentFeature.attributes.title;
    return makeDataRequest(callUrl, function(obj) {
      var data, href, url;
      data = JSON.parse(obj);
      url = data['data']['url'];
      href = generateTwitterText(title, url);
      return $('a.twitter').attr('href', href);
    });
  },
  up: function(i) {
    if (i + 1 > this.collection.length - 1) {
      return 0;
    } else {
      return i + 1;
    }
  },
  down: function(i) {
    if (i - 1 < 0) {
      return this.collection.length - 1;
    } else {
      return i - 1;
    }
  },
  cycle: function(increment) {
    this._index = increment ? this.up(this._index) : this.down(this._index);
    return this.setFeature(this._index);
  },
  rockTheHomeView: function() {
    return gadgets.views.requestNavigateTo(this._supportedViews.home, params);
  },
  showMyComics: function(e) {
    e.preventDefault();
    return this.setTab(GLOBALS.navigation.myComics);
  },
  showFavorites: function(e) {
    e.preventDefault();
    return this.setTab(GLOBALS.navigation.favorites);
  },
  showAllComics: function(e) {
    e.preventDefault();
    return this.setTab(GLOBALS.navigation.allComics);
  },
  clickEditComics: function(e) {
    e.preventDefault();
    return this.toggleEditComics(true);
  },
  saveEditComics: function(e) {
    var checkedFeatures;
    if (e) e.preventDefault();
    checkedFeatures = $('#edit-view #column-list input:checked');
    this.__mycomics.ids = checkedFeatures.map(function() {
      return parseInt(this.value);
    }).get();
    saveSettings(this.__mycomics);
    return this.toggleEditComics(false);
  },
  cancelEditComics: function(e) {
    if (e) e.preventDefault();
    return this.toggleEditComics(false);
  },
  chooseFeatureGroup: function(e) {
    var group, slug;
    e.preventDefault();
    slug = e.target.attributes.id.value;
    if (this._currentFeatureGroup.slug !== slug) {
      group = _.detect(this._currentTab.featureGroups, function(g) {
        return g.slug === slug;
      });
      return this.setFeatureGroup(group);
    }
  },
  chooseFeature: function(e) {
    var featureId, featureUrl, newIndex;
    e.preventDefault();
    featureUrl = e.target.href;
    featureId = parseInt(getIdFromUrl(featureUrl));
    newIndex = _.indexOf(this.collection.pluck('id'), featureId);
    if (this._index !== newIndex) {
      this._index = newIndex;
      return this.setFeature(this._index);
    }
  },
  doNotDisplay: function(e) {
    if ($('.disabled').attr('name') === '14_day_message') {
      $('div.feature-image').html('<a target="_blank" href="http://www.gocomics.com/?utm_source=google&utm_medium=gadget&utm_campaign=gadget_clickthrough"><img src="http://images.gocomics.com/images/google/gadget/archive-error.gif" /></a>');
      return false;
    } else {
      return false;
    }
  },
  previousFeature: function(e) {
    e.preventDefault();
    return this.cycle(false);
  },
  nextFeature: function(e) {
    e.preventDefault();
    return this.cycle(true);
  },
  navigateFeatureItemHistory: function(e) {
    var historyId, historyUrl;
    e.preventDefault();
    historyUrl = e.target.href;
    if (!historyUrl) return;
    historyId = getIdFromUrl(historyUrl);
    return this.loadFeature(parseInt(historyId));
  },
  toggleFavorite: function(e) {
    var favoriteId, newFeature;
    e.preventDefault();
    favoriteId = parseInt(getIdFromUrl(e.target.href));
    if (__indexOf.call(this.__myfavorites.ids, favoriteId) >= 0) {
      this.__myfavorites.ids.splice(_.indexOf(this.__myfavorites.ids, favoriteId), 1);
      saveSettings(this.__myfavorites);
      $('ul.share-wrapper #favorite').text('Favorite').removeClass('selected');
      if (this._currentFeatureGroup.slug === 'myfavorites') {
        this.collection.remove(favoriteId);
        this._index = this.down(this._index);
        return this.renderFeatureGroup();
      }
    } else {
      this.__myfavorites.ids.push(favoriteId);
      saveSettings(this.__myfavorites);
      $('ul.share-wrapper #favorite').text('Unfavorite').addClass('selected');
      if (this._currentFeatureGroup.slug === 'myfavorites') {
        newFeature = new Feature({
          id: favoriteId
        });
        this.collection.add(newFeature.fetch());
        return this.renderFeatureGroup();
      }
    }
  },
  toggleSubscribe: function(e) {
    var featureId, model, newFeature;
    e.preventDefault();
    featureId = parseInt(getIdFromUrl(e.target.href));
    if (__indexOf.call(this.__mycomics.ids, featureId) >= 0) {
      this.__mycomics.ids.splice(_.indexOf(this.__mycomics.ids, featureId), 1);
      saveSettings(this.__mycomics);
      $('ul.share-wrapper #subscribe').text('Add to My Comics');
      if (this._currentFeatureGroup.slug === 'mycomics') {
        model = this.collection.at(_.indexOf(this.collection.pluck('feature_id'), featureId));
        this.collection.remove(model);
        this._index = this.down(this._index);
        return this.renderFeatureGroup();
      }
    } else {
      this.__mycomics.ids.push(featureId);
      saveSettings(this.__mycomics);
      $('ul.share-wrapper #subscribe').text('Remove from My Comics');
      if (this._currentFeatureGroup.slug === 'mycomics') {
        newFeature = new Feature({
          feature_id: featureId
        });
        this.collection.add(newFeature.fetch());
        return this.renderFeatureGroup();
      }
    }
  },
  toggleSharingOptions: function(e) {
    e.preventDefault();
    return $('div#sharingOptions').slideToggle('medium', function() {
      return adjustHeight();
    });
  },
  updateCommentCounter: function(e) {
    e.preventDefault();
    return $('span#counter').html(140 - parseInt(e.target.value.length));
  }
});

init = function() {
  window.View = new CanvasView({
    tab: GLOBALS.navigation.myComics
  });
  return this;
};

gadgets.util.registerOnLoadHandler(init);
</script>
		
	]]>
	</Content>
	
</Module>

