Preheat the oven to gas 4, 180C, 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 he 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 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 25x3.5cm (1 1/2in) 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 1/2fl 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/8in) 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.