<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs
title="Phanoto Gallery - Realtime photos taken from fans at sporting events"
description="Use the Phanoto Gallery Gadget to display the most recent photos taken from fans at Sporting events."
height="92"
author="The Ambitious, Inc."
author_email="support@phanoto.com"
thumbnail="http://www.phanoto.com/plugins/google_gadget/thumbnail.png">
 <Require feature="opensocial-0.7"/>
 <Require feature="google.blog"/>
</ModulePrefs>
  <UserPref name="category_id" display_name="Gallery Type" default_value="0" datatype="enum" >
    <EnumValue value="0" display_value="All Leagues"/>
     <EnumValue value="1" display_value="MLB"/>
     <EnumValue value="2" display_value="NBA"/>
     <EnumValue value="3" display_value="NFL"/>
     <EnumValue value="4" display_value="NHL"/>
     <EnumValue value="5" display_value="NCAA Football"/>
     <EnumValue value="6" display_value="NCAA Hockey"/>
   </UserPref>

 <Content type="html">
 <![CDATA[
 <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.3.min.js"></script>
 <script type="text/javascript">
   $(document).ready(function() {
   
	   // Get userprefs
	   var prefs = new gadgets.Prefs();
	   var cat_id = prefs.getString("category_id");
	    
	   if(cat_id != 0 && cat_id != ''){
	    $('#pw').attr('src',"http://phanoto.com/web_services/photo_widget.js?filter=1&limit=7&rows=1&widget_type=GOOGLE_GADGET&category_id=" + cat_id);
	   }
	   else {
	  	 $('#pw').attr('src',"http://phanoto.com/web_services/photo_widget.js?filter=1&limit=7&rows=1&widget_type=GOOGLE_GADGET");
	   }
   });
 </script>
 <script type="text/javascript" id="pw" ></script>
 
 ]]>

 </Content>
</Module>
