// Moleskine News Widget - v. 1.0

//Add slashes
function addslashes (str) 
	{
		return (str+'').replace(/([\\'])/g, "\\$1").replace(/\u0000/g, "\\0");
	}

//Show Last Moleskine News (without images)
function showMoleskineNewsLight()
	{
		
		var widgetContent = '<style type="text/css">.clearfix:after { clear:both; content:"."; display:block; height:0; visibility:hidden; }					* html .clearfix { height: 1%; } #widgetContainer { width: 100%; border: 1px solid #ccc; background: #fff; } #widgetLogo { width: 100%; height: 39px; background: #F0EEDF; border-bottom: 1px solid #ddd; } #widgetLogo img, #widgetLogo a img  { border: none; } #widgetTopBar { height: 21px; font: normal 10px Verdana; padding-top: 2px; color: #fff; background: url(http://www.moleskine.com/img/bg_widget_topbar.gif) repeat-x top }   #widgetNewsList {  margin: 10px; padding: 0px; list-style: none; } #widgetNewsList li { color: #333; padding: 6px 0px; border-bottom: 1px dotted #ccc; font: normal 11px Verdana; } #widgetNewsList li a:link, #widgetNewsList li a:visited, #widgetMoreNews a:link, #widgetMoreNews a:visited { color: #900; text-decoration: none } #widgetNewsList li a:hover { color: #333; text-decoration: underline; } #widgetMoreNews { width: 90%; float: right; margin: 0px 6px 10px 0px; text-align: right; padding: 0px 10px 0px 0px; background: url(http://www.moleskine.com/img/arr_red.gif) no-repeat right; font: normal 11px Verdana; } </style><div id="widgetContainer" class="clearfix"><div id="widgetLogo"><a style="color: #fff; text-decoration: none" href="http://www.moleskine.com" target="_blank"><img src="http://www.moleskine.com/img/moleskine_logo_widget.gif" alt="Moleskine.com" /></a></div><div id="widgetTopBar">&nbsp;&nbsp;from <a style="color: #fff; text-decoration: none" href="http://www.moleskine.com">Moleskine.com</a></div><ul id="widgetNewsList"><li style="list-style: none">04 Mar 2010 - <a target="_blank" href="http://www.moleskine.com/about_us/news/film_journal_the_video.php">Film Journal: the video</a></li><li style="list-style: none">01 Mar 2010 - <a target="_blank" href="http://www.moleskine.com/about_us/news/a_sof_cover_for_reporters.php">A Soft Cover for Reporters</a></li><li style="list-style: none">22 Feb 2010 - <a target="_blank" href="http://www.moleskine.com/about_us/news/wine_journal_the_video.php">Wine Journal: the Video</a></li></ul><div id="widgetMoreNews"><a target="_blank" href="http://www.moleskine.com">more news on Moleskine.com</a></div></div>';
		
		document.write (addslashes(widgetContent));

	}

//Show Last Moleskine News (with images)
function showMoleskineNewsFull()
	{
		
		var widgetContent = '<style type="text/css">.clearfix:after { clear:both; content:"."; display:block; height:0; visibility:hidden; }					* html .clearfix { height: 1%; } #widgetContainer { width: 100%; border: 1px solid #ccc; background: #fff; } #widgetLogo { width: 100%; height: 39px; background: #F0EEDF; border-bottom: 1px solid #ddd; } #widgetLogo img, #widgetLogo a img  { border: none; } #widgetTopBar { height: 21px; font: normal 10px Verdana; padding-top: 2px; color: #fff; background: url(http://www.moleskine.com/img/bg_widget_topbar.gif) repeat-x top }  #widgetNewsListFull {  margin: 10px; padding: 0px; list-style: none; } #widgetNewsListFull li {  color: #333; padding: 6px 0px; height: 40px; border-bottom: 1px dotted #ccc; font: normal 11px Verdana; line-height: 17px; } #widgetNewsListFull li a:link, #widgetNewsListFull li a:visited, #widgetMoreNews a:link, #widgetMoreNews a:visited { color: #900; text-decoration: none } #widgetNewsListFull li a:hover { color: #333; text-decoration: underline; } #widgetNewsListFull li .widgetThumb { border: 1px solid #ccc; float: left; margin-right: 6px; } #widgetMoreNews { width: 90%; float: right; margin: 0px 6px 10px 0px; text-align: right; padding: 0px 10px 0px 0px; background: url(http://www.moleskine.com/img/arr_red.gif) no-repeat right; font: normal 11px Verdana; } </style><div id="widgetContainer" class="clearfix"><div id="widgetLogo"><a href="http://www.moleskine.com" target="_blank"><img src="http://www.moleskine.com/img/moleskine_logo_widget.gif" alt="Moleskine.com" /></a></div><div id="widgetTopBar">&nbsp;&nbsp;from <a style="color: #fff; text-decoration: none" href="http://www.moleskine.com">Moleskine.com</a></div><ul id="widgetNewsListFull"><li style="list-style: none"><a href="http://www.moleskine.com/about_us/news/film_journal_the_video.php" target="_blank"><img class="widgetThumb" style="border: 1px solid #ccc; padding: 2px; background: #e3e3e3;" src="http://www.moleskine.com/smart_resizer/image.php/http://www.moleskine.com/news/images_2/filmvideo190.gif?width=30&height=30&cropratio=1:1&image=http://www.moleskine.com/news/images_2/filmvideo190.gif" alt="Film Journal: the video" /></a><a target="_blank" href="http://www.moleskine.com/about_us/news/film_journal_the_video.php">Film Journal: the video</a><br/>04 Mar 2010</li><li style="list-style: none"><a href="http://www.moleskine.com/about_us/news/a_sof_cover_for_reporters.php" target="_blank"><img class="widgetThumb" style="border: 1px solid #ccc; padding: 2px; background: #e3e3e3;" src="http://www.moleskine.com/smart_resizer/image.php/http://www.moleskine.com/news/images_2/reporter-large190.gif?width=30&height=30&cropratio=1:1&image=http://www.moleskine.com/news/images_2/reporter-large190.gif" alt="A Soft Cover for Reporters" /></a><a target="_blank" href="http://www.moleskine.com/about_us/news/a_sof_cover_for_reporters.php">A Soft Cover for Reporters</a><br/>01 Mar 2010</li><li style="list-style: none"><a href="http://www.moleskine.com/about_us/news/wine_journal_the_video.php" target="_blank"><img class="widgetThumb" style="border: 1px solid #ccc; padding: 2px; background: #e3e3e3;" src="http://www.moleskine.com/smart_resizer/image.php/http://www.moleskine.com/news/images_2/winevideo190.gif?width=30&height=30&cropratio=1:1&image=http://www.moleskine.com/news/images_2/winevideo190.gif" alt="Wine Journal: the Video" /></a><a target="_blank" href="http://www.moleskine.com/about_us/news/wine_journal_the_video.php">Wine Journal: the Video</a><br/>22 Feb 2010</li></ul><div id="widgetMoreNews"><a  target="_blank" href="http://www.moleskine.com">more news on Moleskine.com</a></div></div>';
		
		document.write (addslashes(widgetContent));

	}
