<?xml version="1.0" encoding="UTF-8" ?> 
<Module>
  <ModulePrefs title="Scrabble Score Calculator" 
	title_url="http://www.thekatespanos.com/scrabble-score-calculator"
	author="Kate Spanos"
	author_email="kate.spanos+scrabble@gmail.com"
	description="Scrabble Score Calculator: Calculate word scores according to the rules of Scrabble. Gadget supports multiple double/triple word scores, multiple double/triple letter scores, and 7-letter word bingo."
	screenshot="http://www.thekatespanos.com/gadgets/scrabble-calculator-gadget.png"
	thumbnail="http://www.thekatespanos.com/gadgets/scrabble-calculator-gadget-tn.png"
	height="200">
	<Require feature="dynamic-height"/>
	<Icon>http://www.thekatespanos.com/favicon.ico</Icon>
	<Require feature="com.google.gadgets.analytics" /> 
    <Require feature="setprefs" />
  </ModulePrefs>
  <UserPref 
      name="counter"
      datatype="hidden"
      default_value="0" />
  <Content type="html">
     <![CDATA[ 
       <script type="text/javascript">
		var en_tiles = new Array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',' ');
		var en_values = new Array(1,3,3,2,1,4,2,4,1,8,5,1,3,1,1,3,10,1,1,1,1,4,4,8,4,10,0);
		</script>
		<style type="text/css">
			#scrabble { display:block;padding:5px;font-size:8pt; }
			#scrabble h3 { color:#000;margin:5px 0 0 0;font-size:16pt; }
			#word { padding:2px 0px; }
			#lang { display:none;margin-top:5px; }
			a#clear { cursor:pointer;/*border:1px solid #CCC;padding:3px;color:#000;*/ }
			.solution { clear:both;font-weight:bold;color:#DE299C;font-size:16pt; }
			#resultdiv,#validity { display:none; }
			script { display:none; }
			.one-line-p { float:left; margin:5px 10px 5px 0px; }
			.clear-float { clear:both; }
			.tile { display:block;float:left;margin:3px;padding:3px;text-align:center;line-height:22px;width:22px;height:22px;border:1px solid #ccc;background:#fce9c1;font-size:8pt; }
			.tile sub { font-size:6pt; }
			.doubleLetterTile { background-color:#66ccff;color:#333; }
			.tripleLetterTile { background-color:#3366ff;color:#fff; }
			.singleLetter { font-size:9px;background-color:#FCE9C1;color:#333;padding:0px 2px;cursor:pointer; }
			.doubleLetter { font-size:9px;background-color:#66ccff;color:#333;padding:0px 2px;cursor:pointer; }
			.tripleLetter { font-size:9px;background-color:#3366ff;color:#fff;padding:0px 2px;cursor:pointer; }
			.doubleWordScoreBox { padding:0px 5px 0px 0px;border-bottom:5px solid #f49b95;color:#000;/*border:1px solid #aaa;*/margin:0 10px 0 0; }
			.tripleWordScoreBox { padding:0px 5px 0px 0px;border-bottom:5px solid #ca0703;color:#000;/*border:1px solid #aaa;*/margin:0; }
		</style>
		<div id="scrabble"><img src="http://www.thekatespanos.com/new-icons/scrabble-icons/c.jpg" style="float:right;" alt="scrabble tiles" /><img src="http://www.thekatespanos.com/new-icons/scrabble-icons/b.jpg" style="float:right;" alt="scrabble tiles" /><img src="http://www.thekatespanos.com/new-icons/scrabble-icons/a.jpg" style="float:right;" alt="scrabble tiles" /><form method="post" id="scrabbleform" action=""><h3>Word:</h3>
		<p><input type="text" size="30" maxlength="45" id="word" name="word" value="" /><select name="lang" id="lang"><option value="en">English</option><option value="nl">Nederlands</option><option value="es">Espa&ntilde;ol</option><option value="it">Italiano</option><option value="fr">Fran&ccedil;ais</option><option value="de">Deutsche</option></select></p>
		<p class="one-line-p" style="display:none"><input type="text" name="cardinal" id="cardinal" size="2" maxlength="2" /><span id="nth">&nbsp;<sup>nth</sup> letter</span></p>
		<p class="one-line-p" style="display:none"><select name="lettervalue" id="lettervalue"><option value="2">double</option><option value="3">triple</option></select></p>
		<div class="one-line-p clear-float">
		<p class="one-line-p doubleWordScoreBox"><input type="checkbox" id="double" name="double" value="2" class="checkbox" style="border:0;background:transparent;" />&nbsp;double word score</p>
		<p class="one-line-p tripleWordScoreBox"><input type="checkbox" id="triple" name="triple" value="3" class="checkbox" style="border:0;background:transparent;" />&nbsp;triple word score</p>
		</div><br />
		<p id="x-double-txt" class="one-line-p clear-float" style="display:none;"><input type="text" name="x-double" id="x-double" size="2" maxlength="3" value="1" />&nbsp;How many doubles would you like to apply?</p>
		<p id="x-triple-txt" class="one-line-p clear-float" style="display:none;"><input type="text" name="x-triple" id="x-triple" size="2" maxlength="3" value="1" />&nbsp;How many triples would you like to apply?</p><br />
		<p class="clear-float"><input type="checkbox" id="bonus" name="bonus" value="1" class="checkbox" checked="checked" style="border:0" />&nbsp;50 point bonus for words of 7 letters or more</p></form>
		<div id="solution"></div><a id="clear" class="submit"><img src="http://www.thekatespanos.com/new-icons/reset.png" alt="clear" /></a>
		<p style="display:none;background:transparent url(http://www.thekatespanos.com/new-icons/books.png) no-repeat left center;line-height:25px;padding-left:25px;"><a id="dict" href="http://dictionary.reference.com/">look up in the dictionary</a> | <a id="wordie" href="http://www.wordie.org/">look up on wordie.org</a></p>

		<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
		<script type="text/javascript" src="http://www.thekatespanos.com/gadgets/scrabble.js"></script>
		<script type="text/javascript">
		$(document).ready(function() {
			_IG_AdjustIFrameHeight(); 
			
			$("form").attr("name","scrabble");
			//$('#word').focus();
			$('#word').keyup(function() {
				scrabblify();_IG_AdjustIFrameHeight(); 
			});
			$('#clear').click(function() {
				clearForm('scrabble');_IG_AdjustIFrameHeight(); 
			});
			$('#lettervalue').change(function() {
				scrabblify();_IG_AdjustIFrameHeight(); 
			});
		    $('#lang').change(function() {
				scrabblify();_IG_AdjustIFrameHeight(); 
			});
			$('#cardinal').keyup(function() {
				setNth(this.value);
				scrabblify();_IG_AdjustIFrameHeight(); 
			});
			$('#double').click(function() {
				//$('#triple').attr("checked",false);
				//$('#x-triple-txt').slideUp("fast");
				$('#x-double-txt').slideDown("fast");
				scrabblify();_IG_AdjustIFrameHeight(); 
				$('#x-double').focus();
				if (!this.checked) { $('#x-double-txt').slideUp("fast");_IG_AdjustIFrameHeight();  }
			});
			$('#triple').click(function() {
				//$('#double').attr("checked",false);
				//$('#x-double-txt').slideUp("fast");
				$('#x-triple-txt').slideDown("fast");
				scrabblify();_IG_AdjustIFrameHeight(); 
				$('#x-triple').focus();
				if (!this.checked) { $('#x-triple-txt').slideUp("fast");_IG_AdjustIFrameHeight();  }
			});
			$('#x-double').keyup(function() {
				scrabblify();_IG_AdjustIFrameHeight(); 
			});
			$('#x-triple').keyup(function() {
				scrabblify();_IG_AdjustIFrameHeight(); 
			});
			$('#bonus').click(function() {
				scrabblify();_IG_AdjustIFrameHeight(); 
				$('#word').focus();
			});
			$('#dict').click(function() {
				if ($('#word').val()) { this.href = "http://dictionary.reference.com/browse/"+$('#word').val(); }
				else { this.href = "http://dictionary.reference.com/"; }
			});
			$('#wordie').click(function() {
				if ($('#word').val()) { this.href = "http://www.wordie.org/words/"+$('#word').val(); }
				else { this.href = "http://www.wordie.org/"; }
			});
		});
		</script>
		<script>
      var ga = new _IG_GA("UA-7046166-1");
      ga.reportPageview('/view/counterGadget');
     
      function incrementCounter() { 
        var count = prefs.getInt("counter");
        prefs.set("counter", count + 1);
        ga.reportEvent("Counter Gadget", "Increment", "Button", 0); 
      }
      function resetCounter(){
        prefs.set("counter", 0);
        ga.reportEvent("Counter Gadget", "Reset", "Button", 0);
      }
      </script> 
     ]]>
  </Content> 
</Module>