
      	   		
				document.domain = 'realsimple.com';
			
				$(document).ready(function() {
		   			/* define overrides */
					var pollOverrides = {
					 
						poll_template: function() {
							return '<form method="post" action="#" id="poll_form_#{id}" class="pollForm"><div class="poll_errors" id="poll_#{id}_errors"></div>#{prebuilt_questions}<input class="pollAnswer" type="submit" value=""></input></form>';
						},
					
						question_template: function() {
							return '<div id="rspollValues"><div class="pollquestion"><span>Poll</span><img width="75" height="75" title="Woman cleaning a cutting board with lemon" alt="Woman cleaning a cutting board with lemon" src="http://img4.realsimple.com/images/home-organizing/new-uses/0202REDO/lemon-cutting_75.jpg"><h3 id="question_#{id}">#{text}</h3></div><div class="clear"></div><ul class="multi">#{prebuilt_answers}</ul></div>';
						},
						answer_template: function() {
							return '<li class="multi"><div class="input"><input value="#{id}" id="answer_#{id}" name="question_#{question_id}" type="radio" /></div><div><span class="multi">#{text}</span></div></li>';
						},
					
						closed_poll_template: function() {
							return '#{prebuilt_questions}';
						},
						closed_question_template: function() {
							return '<div id="rspollValues"><div class="pollquestion"><span>Poll</span><img width="75" height="75" title="Woman cleaning a cutting board with lemon" alt="Woman cleaning a cutting board with lemon" src="http://img4.realsimple.com/images/home-organizing/new-uses/0202REDO/lemon-cutting_75.jpg"><h3>#{text}</h3></div><div class="clear"></div><ul class="multirslt">#{prebuilt_answers}</ul></div>';
						},
					
						closed_answer_template: function() {
							return '<li><div class="l">#{percentage:Poll.drop_decimals}%</div><div class="r">#{text}<br /><div style="position:relative" class="pollResults"><div class="bar" style="width:#{percentage:Poll.drop_decimals}%; height:12px; background:rgb(195,240,121);"></div></div></div></li>'
						},
					
						drop_decimals: function(x) { return(Number(x).toFixed()); }
					};
				
					/* set colors */
					Format.colors = [[195,240,121]];
					
					/* initialize RS Community */
					$RS.COMMUNITY.init();
					
					/* initialize and configure Poll */
					Poll.init({base_url: "http://profiles.realsimple.com", brand: "RealSimple", section: "Home-Organizing", article: "C00000000029414", data_url: "http://www.realsimple.com/home-organizing/poll.json"});
					
					/* apply overrides */
					$.extend(Poll, pollOverrides);
				
					/* render Poll */
					Poll.render_polls(); 
				});				
			
