public static function get( $filename, array $options = array() )
	{
		if( class_exists( 'finfo' ) )
		{
			try
			{
				$finfo = new finfo( FILEINFO_MIME_TYPE );
				$mimetype = $finfo->file( $filename );
			}
			catch( Exception $e )
			{
				throw new MW_Media_Exception( $e->getMessage() );
			}
		}
		else if( function_exists( 'mime_content_type' ) )
		{
			$mimetype = mime_content_type( $filename );
		}
		else
		{
			$msg = sprintf( 'No method for retrieving the mime type available: %1$s', 'finfo, mime_content_type' );
			throw new MW_Media_Exception( $msg );
		}

		$mimeparts = explode( '/', $mimetype );

		switch( $mimeparts[0] )
		{
			case 'image':
				return new MW_Media_Image_Default( $filename, $mimetype, $options );
		}

		return new MW_Media_Application_Default( $filename, $mimetype, $options );
	}