$( document ).ready( function() {
	$( ".download").corner();
	$( "div.round-picture, div.round-picture" ).each( function( s ) {
		var img = $(this).find("img")[0];
		var load_img = new Image();
		load_img.src = $(img).attr("src");
		$(this).css( {
			backgroundImage: "url("+$(img).attr("src")+")", 
			backgroundColor: "transparent", 
			width: $(img).attr("width"), 
			height: $(img).attr("height")
		} );
		$(img).attr( {
			src: base_image + "shim.gif", 
			width: $(this).attr("width"), 
			height: $(this).attr("height")
		} );
		$(this).addClass( "rounded" );
	} );
	$( ".rounded" ).each( function(s) {
		if($(this).hasClass("round-top")) {
			$(this).corner("top");
		} else if($(this).hasClass("round-bottom")) {
			$(this).corner("bottom");
		} else {
			$(this).corner();
		}
	} );
	$("a.account").overlay( {
		expose: "#000000", 
		onBeforeLoad: function() {
			$("#account-pop").load( this.getTrigger().attr("href"), function() {
				$("#form-account").corner();
			} ); 
        } 
	 } );
} );
function is_email( e ) {
	var r = new RegExp("^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$");
	return r.test(e);
}