/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
var orientation = new Array('v', 'h');
var slicesCount = new Array(0, 3, 5);
var disperseFactor = new Array(20, 40);

$(function(){
    $('#li1').load('/pictures/load/photos/1', function(){        
        $('#sb-slider1').slicebox({
            orientation: orientation[Math.floor(Math.random()*2)],
            disperseFactor: disperseFactor[Math.floor(Math.random()*2)],
            slicesCount: slicesCount[Math.floor(Math.random()*3)]
        });
        $('#last1').load(function(){            
            $('#loading').hide();
            $('#bigslider').show();
            
            $('#li2').load('/pictures/load/design/2', function(){              
                $('#sb-slider2').slicebox({
                    orientation: orientation[Math.floor(Math.random()*2)],
                    disperseFactor: disperseFactor[Math.floor(Math.random()*2)],
                    slicesCount: slicesCount[Math.floor(Math.random()*3)]
                });
                $('#li3').load('/pictures/load/contact/3', function(){                
                    $('#sb-slider3').slicebox({
                        orientation: orientation[Math.floor(Math.random()*2)],
                        disperseFactor: disperseFactor[Math.floor(Math.random()*2)],
                        slicesCount: slicesCount[Math.floor(Math.random()*3)]
                    });                
                    setTimeout( function() {
                        $("#bigslider").sudoSlider({
                           customLink:'a.customLink',
                           prevNext:false
                        });        
                    },1000);
                });
            });
        });
    });
})
