<?xml version="1.0" encoding="UTF-8" ?> 
<Module>
  <ModulePrefs title="New Art Everyday - Artist a Day - Artistaday.com" description="Artistaday.com’s goal is simple. We feel artists are under-valued, under-exposed, and generally under-appreciated. We want to bring attention to artists that otherwise don’t get the attention they deserve." author="Artistaday.com" author_email="submissions@artistaday.com" screenshot="http://www.artistaday.com/gadget/gadget_screen3.png" thumbnail="http://www.artistaday.com/gadget/gadget_thumb.png" author_location="Charlotte, NC" title_url="http://www.artistaday.com" category="lifestyle" directory_title="Artist a Day: Featured Art"> 
	<Require feature="dynamic-height"/>
	<Require feature="settitle" />
	<Require feature="minimessage"/>
	<Require feature="analytics"/>
  </ModulePrefs>
  <UserPref name="show_alerts" display_name="Show Alerts" datatype="bool" default_value="true"></UserPref>
	<Content type="html" view="home">
  <![CDATA[ 
  	<style>
	.mmlib_table {
	  width: 100%;
	  font: bold 12px arial,sans-serif;
	  color: #ffffff;
	  background-color: #000000;
	  border-collapse: separate;
	  border-spacing: 0px;
	  padding: 5px;
	  }
	a:link, a:visited, a:active, a:hover {
	  color: #ffffff;
	  text-decoration:none;
	}  
	.mmlib_xlink {
	  font: normal 1.1em arial,sans-serif;
	  font-weight: bold;
	  color: #ffffff;
	  cursor: pointer;
	  }
   </style>
   <div>
   <div id="header"><a href='http://www.artistaday.com' target='_parent'><img src='http://www.artistaday.com/gadget/logo_gadget.gif' width='274' height='25' border='0' /></a></div>
   </div>
   <div id="content_div"></div>  
    <div id="footer"><a href='http://www.twitter.com/artistaday' target='_parent'>Follow Artistaday.com on <span style='color: #2EB9E7;'>Twitter</span> (@artistaday)&nbsp;&raquo;</a></div>
   	
    <script type="text/javascript">
    _IG_Analytics("UA-31089-28", "/gadget");
    
    //grab alert preferences
    var prefs = new gadgets.Prefs();
    var alert_pref = prefs.getBool("show_alerts");
    //var details_pref = prefs.getBool("show_det");
    var entries = 1;
    
    if(alert_pref == 1){
		//create mini message
		var msg = new gadgets.MiniMessage(__MODULE_ID__);
		msg.createDismissibleMessage(document.getElementById("footer"));
	}

    function makeDOMRequest() {    
        var params = {};  
        params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.DOM;  
        var url = "http://www.artistaday.com/wp-rss4.php";  
        gadgets.io.makeRequest(url, response, params);
        gadgets.window.adjustHeight();
      };


function response(obj) { 
    // obj.data contains the feed data
   	var domdata = obj.data;
   	var itemList = domdata.getElementsByTagName("item");
   	var nodeList = itemList.item(0).childNodes;


		// Loop through child nodes. Extract data from the text nodes that are
             // the children of the associated name, price, and calories element nodes.
             for (var j = 0; j < nodeList.length ; j++) {
                var node = nodeList.item(j);
                if (node.nodeName == "title") {
                   var title = node.firstChild.nodeValue;
                }
                if (node.nodeName == "guid") {
                   var guid = node.firstChild.nodeValue; 
                }
                if (node.nodeName == "image1") {
                   var image1 = node.firstChild.nodeValue; 
                }
                if (node.nodeName == "location1") {
                   var location1 = node.firstChild.nodeValue; 
                }
             } 
    
    var html = "<a href='" + guid + "' target='_parent'><img src='" + image1 + "' width='100%' style='padding: 5px 0px; margin-bottom: 2px;' onload='_IG_AdjustIFrameHeight()' /></a>";         
      
    document.getElementById('content_div').innerHTML = html;
    var gadtitle = "Today's Artist: " + title;
    gadgets.window.setTitle(gadtitle);
  };
gadgets.util.registerOnLoadHandler(makeDOMRequest);
    </script>
  ]]>
  </Content>
  <Content type="html" view="canvas">
   <![CDATA[ 
  	<style>
	.mmlib_table {
	  width: 100%;
	  font: bold 12px arial,sans-serif;
	  color: #ffffff;
	  background-color: #000000;
	  border-collapse: separate;
	  border-spacing: 0px;
	  padding: 5px;
	  }
	a:link, a:visited, a:active, a:hover {
	  color: #6699cc;
	  text-decoration:none;
	}
	
	strong {
		color: black;
	}
	.mmlib_xlink {
	  font: normal 1.1em arial,sans-serif;
	  font-weight: bold;
	  color: #ffffff;
	  cursor: pointer;
	  }
   </style>
   
   <div id="header"><a href='http://www.artistaday.com' target='_parent'><img src='http://www.artistaday.com/wp-content/themes/aad_raw/images/logo_gadget.gif' width='274' height='25' border='0' /></a></div>
   <div id="content_div"></div>  
   <div id="footer"></div>   	
   	
    <script type="text/javascript">
    _IG_Analytics("UA-31089-28", "/gadget");
    
    //grab alert preferences
    var prefs = new gadgets.Prefs();
    var alert_pref = prefs.getBool("show_alerts");
    //var details_pref = prefs.getBool("show_det");
    var entries = 1;
    
    if(alert_pref == 1){
		//create mini message
		var msg = new gadgets.MiniMessage(__MODULE_ID__,document.getElementById("footer"));
		
		msg.createDismissibleMessage("<a href='http://twitter.com/artistaday' style='color: #ffffff;' target='_parent'>Follow us on <span style=\"color: #35CCFF; \">Twitter</span> (@artistaday)&nbsp;&raquo;</a>");
	}  
    var entries = 1;

    function makeDOMRequest() {    
        var params = {};  
        params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.DOM;  
        var url = "http://www.artistaday.com/wp-rss4.php";  
        gadgets.io.makeRequest(url, response, params);
      };


function response(obj) { 
    // obj.data contains the feed data
   	var domdata = obj.data;
   	var itemList = domdata.getElementsByTagName("item");
   	var nodeList = itemList.item(0).childNodes;


		// Loop through child nodes. Extract data from the text nodes that are
             // the children of the associated name, price, and calories element nodes.
             for (var j = 0; j < nodeList.length ; j++) {
                var node = nodeList.item(j);
                if (node.nodeName == "title") {
                   var title = node.firstChild.nodeValue;
                }
                if (node.nodeName == "guid") {
                   var guid = node.firstChild.nodeValue; 
                }
                if (node.nodeName == "image1") {
                   var image1 = node.firstChild.nodeValue; 
                }
                if (node.nodeName == "location1") {
                   var location1 = node.firstChild.nodeValue; 
                }
                if (node.nodeName == "content:encoded") {
                   var description = node.firstChild.nodeValue; 
                }
             } 
    
    var html = "<table cellpadding='5' cellspacing='0' border='0'><tr valign='top'><td><a href='" + guid + "' target='_parent'><img src='" + image1 + "' width='425px' style='border: 1px solid #666666; padding: 5px; margin-bottom: 2px;' onload='_IG_AdjustIFrameHeight()' /></a></td><td><h1 style='color: black; font-size: 22px; margin: 0px;'>" + title + "</h1><h2 style='color: #666; font-size: 18px; margin: 0px;'>" + location1 + "</h2><span style='font-size: 12px; color: #666;'>" + description + "</span><h3><a href='" + guid + "' target='_parent'>Continue on to see more work, rate and comment&nbsp;&raquo;</a></h3></td></tr></table>";         
    
    document.getElementById('content_div').innerHTML = html;
    gadgets.window.adjustHeight();
  };
gadgets.util.registerOnLoadHandler(makeDOMRequest);
    </script>
  ]]>
  </Content>
</Module>