reset or change slides array of jquery plugin supersized
i'm using the supersized plugin for jquery to show fullsize background pictures. it works very well and i like it :)
now i want to change the array with the images (with "jquery.click()"), but without reloading the page. the link loads via ajax the content into a div, and at the same time i want to switch the array.

this is the default code i load for supersized:

    $.supersized({
        random: 1,
        image_protect: 0,
        slide_interval: 5000,
        transition: 1,
        transition_speed: 3000,
        vertical_center: 0,
        horizontal_center: 0,
        fit_portrait: 1,
        slides:
        [
            {image : 'imgs/bg-01.jpg'},
            {image : 'imgs/bg-02.jpg'},
            {image : 'imgs/bg-03.jpg'},
        ]
    });

that's what i've done to change the array:

    $('#link1').click(function() {
        // placeholder for ajax load

        $.supersized({
            random: 1,
            image_protect: 0,
            slide_interval: 5000,
            transition: 1,
            transition_speed: 3000,
            vertical_center: 0,
            horizontal_center: 0,
            fit_portrait: 1,
            slides:
            [
                {image : 'other-imgs/new-bg-01.jpg'},
                {image : 'other-imgs/new-bg-02.jpg'}
            ]
        });
    });

but this only adds the new 2 images to the other 3. how can i zero the first array and/or replace the content of it?

hope someine can help me :-/

reset or change slides array of jquery plugin supersized
===

i'm using the supersized plugin for jquery to show fullsize background pictures. it works very well and i like it :)
now i want to change the array with the images (with "jquery.click()"), but without reloading the page. the link loads via ajax the content into a div, and at the same time i want to switch the array.

this is the default code i load for supersized:

    $.supersized({
        random: 1,
        image_protect: 0,
        slide_interval: 5000,
        transition: 1,
        transition_speed: 3000,
        vertical_center: 0,
        horizontal_center: 0,
        fit_portrait: 1,
        slides:
        [
            {image : 'imgs/bg-01.jpg'},
            {image : 'imgs/bg-02.jpg'},
            {image : 'imgs/bg-03.jpg'},
        ]
    });

that's what i've done to change the array:

    $('#link1').click(function() {
        // placeholder for ajax load

        $.supersized({
            random: 1,
            image_protect: 0,
            slide_interval: 5000,
            transition: 1,
            transition_speed: 3000,
            vertical_center: 0,
            horizontal_center: 0,
            fit_portrait: 1,
            slides:
            [
                {image : 'other-imgs/new-bg-01.jpg'},
                {image : 'other-imgs/new-bg-02.jpg'}
            ]
        });
    });

but this only adds the new 2 images to the other 3. how can i zero the first array and/or replace the content of it?

hope someine can help me :-/
