jQuery(document).ready(function($) {
	
	jQuery.fn.addImageVoteWrap = function(votes, voted) {
		$(this).each(function() {
				if(!$(this).hasClass('vote-image-false')) {
				  var html = "";
				  html += "<div class='image-vote' id='"+$(this).attr('src')+"'>";
				  if(voted) {
					  html += "<p class='vote-confirm'><img src='"+global_siteurl+"/images/tagged_as_fav.png' border='0' alt='Tagged as Favorite' /></p>";
				  }else {
					  html += "<p class='vote-button'><a href='#' class='image-vote-button'><img src='"+global_siteurl+"/images/tag_as_fav.png' border='0' alt'Tag Image As Favorite' /></a></p>";
				  }
				  html += "<p class='vote-total'><span class='vote-count'>"+votes+"</span>";
				  html += "</p>";
				  html += "</div>";
				  //add image vote
				  $(this).after(html);				  
				}
		});
	}
				
});
