// 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 analyticsTrackingString = "?utm_source=" + document.location.href + "&utm_medium=widget_news_light&utm_content=EN&utm_campaign=widget";
		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&nbsp;<a style="color: #fff; text-decoration: none;" href="http://www.moleskine.com">Moleskine.com</a></div><ul id="widgetNewsList"><li style="list-style: none">31 Jan 2012 - <a target="_blank" href="http://www.moleskine.com/about_us/news/lego.php' + analyticsTrackingString + '">For big kids. Moleskine meets LEGO® </a></li><li style="list-style: none">25 Jan 2012 - <a target="_blank" href="http://www.moleskine.com/about_us/news/moleskine_portraits_newyork.php' + analyticsTrackingString + '">Portraits in New York</a></li><li style="list-style: none">16 Jan 2012 - <a target="_blank" href="http://www.moleskine.com/about_us/news/utility_bag.php' + analyticsTrackingString + '">The Utility Bag</a></li></ul><div id="widgetMoreNews"><a target="_blank" href="http://www.moleskine.com">more news on Moleskine.com</a></div></div>';
		
		document.write (widgetContent);

	}

//Show Last Moleskine News (with images)
function showMoleskineNewsFull()
	{
		var analyticsTrackingString = "?utm_source=" + document.location.href + "&utm_medium=widget_news_full&utm_content=EN&utm_campaign=widget";		
		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; min-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&nbsp;<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/lego.php' + analyticsTrackingString + '" 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/lego/lego_190.jpg?width=30&height=30&cropratio=1:1&image=http://www.moleskine.com/news/lego/lego_190.jpg" alt="For big kids. Moleskine meets LEGO® " /></a><a target="_blank" href="http://www.moleskine.com/about_us/news/lego.php' + analyticsTrackingString + '">For big kids. Moleskine meets LEGO® </a><br/>31 Jan 2012</li><li style="list-style: none"><a href="http://www.moleskine.com/about_us/news/moleskine_portraits_newyork.php' + analyticsTrackingString + '" 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/Moleskine-Portraits-Us-190.jpg?width=30&height=30&cropratio=1:1&image=http://www.moleskine.com/Moleskine-Portraits-Us-190.jpg" alt="Portraits in New York" /></a><a target="_blank" href="http://www.moleskine.com/about_us/news/moleskine_portraits_newyork.php' + analyticsTrackingString + '">Portraits in New York</a><br/>25 Jan 2012</li><li style="list-style: none"><a href="http://www.moleskine.com/about_us/news/utility_bag.php' + analyticsTrackingString + '" 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/Utility-Bag-190.jpg?width=30&height=30&cropratio=1:1&image=http://www.moleskine.com/Utility-Bag-190.jpg" alt="The Utility Bag" /></a><a target="_blank" href="http://www.moleskine.com/about_us/news/utility_bag.php' + analyticsTrackingString + '">The Utility Bag</a><br/>16 Jan 2012</li></ul><div id="widgetMoreNews"><a target="_blank" href="http://www.moleskine.com">more news on Moleskine.com</a></div></div>';
		
		document.write (widgetContent);

	}

