<?xml version="1.0" encoding="UTF-8" ?> 
<Module>
  <ModulePrefs title="Artist a Day: New Contemporary Art Every Day" description="New Art. Everyday. Artistaday.com’s goal is simple. We feel artists and their art 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_black.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="alerts" display_name="Show alerts" datatype="bool" default_value="true" />
	<Content type="html" view="home,preview">
  <![CDATA[ 
    <script>
    var hostname = document.location.hostname;
    if (hostname.indexOf('ig.gmodules.com') > 0) {
      document.location.href = 'http://www.gmodules.com'+document.location.href.substring(document.location.href.indexOf('/', 10));
    }
	</script>
  	<style>
	/*.mmlib_table {width: 100%; font: bold 12px arial,sans-serif; color: #000; background-color: #FFF; border-collapse: separate; border-spacing: 0px; padding: 5px; border: 1px solid #000; margin: 5px 0px;} */
	.mmlib_table {width: 100%; font: bold 12px arial,sans-serif; background: #fff;}
	a:link, a:visited, a:active, a:hover {color: #c09853; text-decoration: none; font-weight: bold;}  
	.mmlib_xlink {background: #fff;font: 1.1em; color: #666; cursor: pointer;}
	input {border:1px solid #E3E3E3;}
	input.btn{background-color:#E3E3E3;color:#666; border: none;}
   </style>
   	<div id="header" style="float: left; width: 100%; margin-right: -200px;"><div style="margin-right: 200px;"><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 style="float: right; width: 48px; padding-top: 5px;"><!-- <a href="https://pinterest.com/artistaday/" target="_blank" style="text-decoration: none;"><img src="http://www.artistaday.com/gadget/pinterest.png" width="16" height="16" style="border: 0;"/></a><a href="http://www.facebook.com/artistadaydotcom" target="_blank"><img src="http://www.artistaday.com/gadget/facebook.png" width="16" height="16" alt="" border="0" /></a><a href="http://twitter.com/artistaday" target="_blank"><img src="http://www.artistaday.com/gadget/twitter.png" width="16" height="16" alt="" border="0" /></a> --></div>
   	<br clear="all" />
   <div id="dep_warning" style="font-size: 12px;background-color:#fcf8e3; color: #c09853; border: 1px solid #fbeed5; padding: 8px 14px 8px 14px">
   	iGoogle is going away on <a href="http://support.google.com/websearch/bin/answer.py?hl=en&answer=2664197" target="_blank">Nov. 1, 2013</a>. If you want to continue to be exposed to great art, use <a href="http://artistaday.com" target="_blank">Artistaday.com</a> or try these other methods: <a href="http://facebook.com/artistadaydotcom" target="_blank">Facebook</a>, <a href="http://twitter.com/artistaday" target="_blank">Twitter</a>, <a href="http://pinterest.com/artistaday" target="_blank">Pinterest</a> or <a href="https://www.google.com/producer/editions/CAowjuVH/artistadaycom" target="_blank">Google Currents</a>. 
   </div>
   <div id="content_div"></div>
   <div style="font: bold 12px arial,sans-serif; color: #666;">
   <div style="float: left; width: 40%; padding-top: 5px;" id="todays"></div><div style="float: left; width: 60%; text-align: right; padding-top: 1px;">
   		<form action="http://artistaday.com/wp-comments-post.php" method="post" target="_blank" style="padding-bottom: 5px; margin: 0px;"><img src="http://www.aadstatic.com/uploads/glyph_comment.png" width="12" height="12" alt="" border="0" />&nbsp;<input type="text" size="20" name="comment" id="comment" value="Leave a comment" onFocus="if(this.value == 'Leave a comment') {this.value = '';}" onBlur="if (this.value == '') {this.value = 'Leave a comment';}"/><input type="submit" id="submit" value="Send" class="btn" style="margin-left: 3px;" /><input type="hidden" name="url" value="iGoogle.com" /><input type="hidden" name="comment_post_ID" id="comment_post_ID" value="" /><input type="hidden" name="email" id="email" value="" /><input type="hidden" name="author" id="author" value="iGoogle" /></form>
   </div><br clear="all" />
   </div> 
   <div>
<!-- <div style="position: relative;height: 40px;" id="footer"><div style="position: absolute;z-index: 2;left: 5px;"><img src="http://www.aadstatic.com/uploads/facebook_thumbs_up.jpg" width="40" height="40" alt="Artistaday.com on Facebook" border="0" /></div><div style="width: 100%;background: #34609D;height: 20px;top: 5px;position: absolute;z-index: 1;padding: 5px 0px;"><div style="float: left;width: 60%;"><div style="padding: 2px 0px 0px 55px;"><a href="http://facebook.com/artistadaydotcom" target="_blank"><span style="color: #fff;font-size: 13px;">Like us</span></a></div></div><div style="float: left;width: 40%;text-align: right;"><iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Ffacebook.com%2Fartistadaydotcom&send=false&layout=button_count&width=90&show_faces=false&action=like&colorscheme=light&font=arial&height=21&appId=384897621551568" scrolling="no" frameborder="0" style="border:none;overflow:hidden;width:90px;height:20px;" allowTransparency="true"></iframe></div><div class="clear"></div></div></div> -->

<!--<div style="position: relative;height: 40px;" id="footer"><div style="position: absolute;z-index: 2;left: 5px;"><img src="http://www.aadstatic.com/uploads/gplus_community.png" width="40" height="40" alt="Artistaday.com Google+ community" border="0" /></div><div style="width: 100%;background: #ccc;height: 20px;top: 5px;position: absolute;z-index: 1;padding: 5px 0px;"><div style="float: left;width: 100%;"><div style="padding: 2px 0px 0px 55px;"><a href="https://plus.google.com/u/0/communities/112397117106639727422" target="_blank"><span style="color: #666;font-size: 13px;">Talk art on our new Google+ community</span></a></div></div><div class="clear"></div></div></div>-->

<div style="text-align: center;background-color:#eee;">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-5786276180201208";
/* iGoogle gadget2 */
google_ad_slot = "9061564019";
google_ad_width = 320;
google_ad_height = 50;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
   	
    <script type="text/javascript">
    _IG_Analytics("UA-31089-28", "/gadget");
    
    function makeCachedRequest(url, callback, params, refreshInterval) {
	  var ts = new Date().getTime();
	  var sep = "?";
	  if (refreshInterval && refreshInterval > 0) {
	    ts = Math.floor(ts / (refreshInterval * 1000));
	  }
	  if (url.indexOf("?") > -1) {
	    sep = "&";
	  }
	  url = [ url, sep, "nocache=", ts ].join("");
	  gadgets.io.makeRequest(url, callback, params);
	}
	
    function makeDOMRequest() {    
        var params = {};  
        params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.DOM;  
        var url = "http://www.artistaday.com/wp-rss4.php";  
        makeCachedRequest(url, response, params, 75);
      };

	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.
    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 == "artnum1") {
           var artnum1 = node.firstChild.nodeValue; 
        }
    } 
    
    var html = "<a href='" + guid + "' target='_parent'><img src='" + image1 + "' width='100%' style='padding: 5px 0px; margin-bottom: 2px;' onload='gadgets.window.adjustHeight();' border='0' /></a>";  
    document.getElementById('content_div').innerHTML = html;
    document.getElementById('todays').innerHTML = title;
    document.getElementById('comment_post_ID').value = guid.replace("http://artistaday.com/?p=","");
    gadgets.window.adjustHeight();
  };
	gadgets.util.registerOnLoadHandler(makeDOMRequest);
	
	//grab alert preferences
    var prefs = new gadgets.Prefs();
    var alert_pref = prefs.getBool("alerts");
	
	if(prefs.getBool("alerts") == 1){
		//create mini message
		var msg = new gadgets.MiniMessage(__MODULE_ID__);
		msg.createDismissibleMessage(document.getElementById("footer"));
	}
	else {
		document.getElementById("footer").style.display = "none";
	}
    </script>
  ]]>
  </Content>
  <Content type="html" view="canvas">
   <![CDATA[ 
  	<style>
	.mmlib_table {width: 100%; font: bold 12px arial,sans-serif; color: #CB2027; background-color: #FFFFFF; border-collapse: separate; border-spacing: 0px; padding: 5px; border: 1px solid #CB2027; margin-bottom: 5px;}
	a:link, a:visited, a:active, a:hover {color: #CB2027; text-decoration: underline;}  
	.mmlib_xlink {font: normal 1.1em arial,sans-serif; font-weight: bold; color: #CB2027; cursor: pointer;}
	input {border:1px solid #E3E3E3;}
	input.btn{background-color:#E3E3E3;color:#666; border: none;}
   </style>
   
   <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 id="content_div"></div> 
   <div id="footer"><a href='http://www.pinterest.com/artistaday/' target='_blank' style='text-decoration: none;'><span style="vertical-align:top; font-size: 13px;">AAD is now on </span><img src="http://www.artistaday.com/gadget/pinterest_logo.png" width="62" height="16" alt="" border="0" /><span style="vertical-align:top; font-size: 13px;">. Follow us today&nbsp;&raquo;</span></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("alerts");
	
	if(prefs.getBool("alerts") == 1){
		//create mini message
		var msg = new gadgets.MiniMessage(__MODULE_ID__);
		msg.createDismissibleMessage(document.getElementById("footer"));
	}
	else {
		document.getElementById("footer").style.display = "none";
	}
    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='10' cellspacing='0' border='0'><tr valign='top'><td><a href='" + guid + "' target='_parent'><img src='" + image1 + "' style='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><form action=\"http://artistaday.com/wp-comments-post.php\" method=\"post\" target=\"_blank\" style=\"padding-bottom: 5px; margin: 0px;\"><img src=\"http://www.aadstatic.com/uploads/glyph_comment.png\" width=\"12\" height=\"12\" alt=\"\" border=\"0\" />&nbsp;<input type=\"text\" size=\"18\" name=\"comment\" id=\"comment\" value=\"Leave a comment\" onFocus=\"if(this.value == 'Leave a comment') {this.value = '';}\" onBlur=\"if (this.value == '') {this.value = 'Leave a comment';}\"/><input type=\"submit\" id=\"submit\" value=\"Send\" class=\"btn\" /><input type=\"hidden\" name=\"url\" value=\"iGoogle.com\" /><input type=\"hidden\" name=\"comment_post_ID\" id=\"comment_post_ID\" value=\"\" /><input type=\"hidden\" name=\"email\" id=\"email\" value=\"\" /><input type=\"hidden\" name=\"author\" id=\"author\" value=\"iGoogle\" /></form></td></tr><tr><td></td></tr></table>";               
       
    document.getElementById('content_div').innerHTML = html;
    gadgets.window.adjustHeight();
  };
gadgets.util.registerOnLoadHandler(makeDOMRequest);
    </script>
  ]]>
  </Content>
</Module>