$(document).ready(function() {
	$('img').each(function() {
		if($(this).attr("alt") != "") {
		
			var alt = $(this).attr("alt");
			var src = $(this).attr("src");
			var style = $(this).attr("style");
			var width = $(this).attr("width");
			
  			$(this).parent().replaceWith("<div class='imgdiv' style='" + style + "'><img src='" + src + "' width='" + width + "'><div class='caption'>" + alt + "</div></div>");

		}
	});
	
	$('div.imgdiv').each(function() {
		if($(this).css("float") == "right") {
		$(this).css("margin","5px 0 5px 5px");
		} else if($(this).css("float") == "left") {
		$(this).css("margin","10px 10px 10px 0px");
		}
	});
});


// Slider for the sign in page
 $(document).ready(function(){
//close all the content divs on page load
$('.mover').hide();

// toggle slide
$('#slideToggle').click(function(){
// by calling sibling, we can use same div for all demos
$('#popup').slideToggle();
});

});