this.randomtip = function(listItem){
    var el = $(listItem),
        length = el.length,
        selected = [],
        visible = 3,
        max_loops = 4,
        current_loop = 0;

    if(length > 0) {
        while(selected.length < visible) {
            if(current_loop == max_loops) {
                selected = [1,2,3];
                break;
            }

            var rand = Math.floor(Math.random() * length) + 1;
            if($.inArray(rand, selected) == -1) {
                selected.push(rand);
            }
            current_loop++;
        }

        var ul = el.parent();
            ul.empty();

        $.each(selected, function(k, num) {
            el.each(function(index, o) {
                if(num == (index + 1)) {
                    ul.prepend($(o));
                    $(o).show();
                }
            });
        });

        el.parent().parent().empty().append(ul);
    }
};
$(function(){
	$('#mycarousel').jcarousel({
		wrap: 'circular',
		start: 1,
		scroll: 1
	});
	$(".blocPush li").hide();
	randomtip(".blocPush li");

	$(".jcarousel-prev, .jcarousel-next").wrapAll('<div style="width: 950px; margin: 0pt auto;"></div>');
	
	$('.homepage .footer').css('bottom','0px');	
	$('.homepage .global').css('height','auto');		
});


