Preheat the oven to Gas Mark 4, 180°C, fan 160°C. Grease a 20cm (8in) square tin and line with two pieces of nonstick baking paper (leaving an overhang to help you remove the cake once cooked). In a bowl, beat the butter and sugar until pale and fluffy. Gradually add the eggs, beating well between each addition. Fold in the vanilla extract and flour, then tip the mixture into the tin and smooth the surface. Bake for 40-45 minutes, or until a skewer inserted into the middle comes out clean. Cool in the tin for a few minutes, then turn out onto a wire rack to cool completely.
Warm the jam in a small pan and sieve to remove any lumps. Brush the top of the cake with the jam. Dust a clean surface with icing sugar and roll out the marzipan thinly. Cut a 20cm (8in) square sheet and place it on top of the cake. Chill in the freezer for 10 minutes.
To make the buttercream, beat the butter and icing sugar until smooth then beat in the vanilla extract.
Cut the cake into 25 x 3·5cm (1½in) equal squares. Spread the four exposed sides of each square with a thin layer of buttercream and then, using a piping bag, pipe a blob of buttercream on top of the marzipan on each square. Chill for 1 hour or overnight until set.
Put the fondant icing in a mixer with a paddle attachment and churn (or beat in a bowl with an electric hand whisk) until the icing starts to break up. Gradually add 75-90ml (3-3½fl oz) water until it reaches a pouring consistency. Divide between three bowls and add a few drops of different food colouring to each, stirring to combine to give the desired colour.
Stick a fork in the base of each cake and spoon over the fondant icing, turning the fork until evenly coated. Place on a wire rack. Repeat until all 25 cakes are iced in different colours. Leave to set for 10 minutes.
Spoon the melted chocolate into a piping bag fitted with a 2mm (1/6in) nozzle and quickly pipe it over the cakes in a zig zag pattern. Leave to set for 2 hours in a cool, dry place, but don't chill while they're drying or the icing will lose its shine.
Freezing and defrosting guidelines
Bake according to the recipe but stop before adding decoration or icing if called for. Allow to cool completely. Wrap well in clingfilm and tin foil (to prevent freezer burn) and freeze for up to 3 months.
Loosen the tin foil and clingfilm but leave to defrost in packaging at room temperature for several hours before serving. If you wish to add icing or decoration, add them after the baked goods have fully defrosted and are at room temperature.
They can be stored in an airtight container in a cool dark place for 2-3 days – after this time they will not be as fresh.