helgajijka,
$(window).load(function() {
$(".slider-main").flexslider({
animation: "slide",
controlNav: false,
slideshow: false,
after: function(sl) {
var images = $(sl.slides[sl.currentSlide]).data("thumb").split("|");
$.each(images, function(indx, src) {
slider.addSlide($('<li><img src="' + src + '" /></li>'), indx)
});
$.each(slider.slides, function(indx, el) {
indx >= images.length && slider.removeSlide(el)
})
}
});
var slider = $(".minislider").flexslider({
animation: "slide",
animationLoop: false,
itemWidth: 200,
itemMargin: 5,
minItems: 2,
maxItems: 3,
directionNav: false,
slideshow: false
}).data("flexslider")
});