// Make a box

function spawnBox( title, pic, link )
{
	var dummy = $( '<div>' ) ;

	var box = $( '<div>' )
		.attr( 'class', 'box' )
		.appendTo( dummy ) ;

	var header = $( '<div>' )
		.attr( 'class', 'h10' )
		.html( title )
		.appendTo( box ) ;

	var line = $( '<div>' )
		.attr( 'class', 'line' )
		.css( 'width', '180px' )
		.appendTo( box ) ;

	var stripes = $( '<div>' )
		.attr( 'class', 'stripes' ) ;

	if( link ) {
		var a = $( '<a>' )
			.attr( 'href', link )
			.appendTo( box ) ;

		stripes.appendTo( a ) ;
	}
	else {
		stripes.appendTo( box ) ;
	}

	var image = $( '<img>' )
		.attr( 'src', pic )
		.appendTo( stripes ) ;

	document.write( dummy.html( ) ) ;
}

