$(document).ready(function() {
	$(".model131").attr("title",$('#model131').html());
	$(".model113").attr("title",$('#model113').html());
	$(".model153").attr("title",$('#model153').html());
	$(".model111").attr("title",$('#model111').html());
	$(".modelSWTJE").attr("title",$('#modelSWTJE').html());
	$(".modelSWS").attr("title",$('#modelSWS').html());
	$(".tip").tooltip({
		effect: 'fade',
		opacity: .9
	});

	$.jGFeed('http://sensorwerks.blogspot.com/feeds/posts/default',
		function(feeds){
		  // Check for errors
		  if(!feeds){
			displayNoPosts()
			return false;
		  }
		  // do whatever you want with feeds here
		  if(feeds.entries.length < 1){
			displayNoPosts()
			return false;
		  }else{
			for(var i=0; i<feeds.entries.length; i++){
				var entry = feeds.entries[i];
				$('#blogInstance').append("<div id='blogTitle' style='float:left;margin:10px 0 0 10px;'><div style='float:left;'><a target='_blank' href='"+entry.link+"' style='font-size:14px;font-family:arial;font-weight:bold;text-decoration:none;color:#666;'>"+entry.title+"</a></div><div style='margin:0 0 0 10px;font-style:italic;font-size:12px;float:left;'> - "+entry.publishedDate+"</div></div><div id='blogContent' style='float:left;clear:both;margin:6px 0 0 10px;'>"+entry.content+"</div>");
			  }
		  }
		  
	}, 2);
});

function displayNoPosts(){
	$('#blogInstance').append("<div id='blogTitle' style='float:left;margin:10px 0 0 10px;'>There are currently no blogs to post.&nbsp;&nbsp;Please check back often for updates.</div>");
}
