Q:

jQuery animate not smooth

I have wordpress website here http://www.itmc.lt/naujas/ and I made my header background to be slider with this jQuery script. The only problem is that in jsfiddle http://jsfiddle.net/M2LmH/245/ all transitions look smooth, while on my website there is no transition, just instant flash and image change.
$(document).ready(function () {
var img_array = [1, 2, 3, 4, 5],
    newIndex = 0,
    index = 0,
    interval = 8000;
(function changeBg() {
    //  --------------------------
    //  For random image rotation:
    //  --------------------------
    //  newIndex = Math.floor(Math.random() * 10) % img_array.length;
    //  index = (newIndex === index) ? newIndex -1 : newIndex;
    //  ------------------------------
    //  For sequential image rotation:
    //  ------------------------------
    index = (index + 1) % img_array.length;
    $('#branding').css('backgroundImage', function () {
        $('#branding').animate({
            backgroundColor: 'transparent'
        }, 2000, function () {
            setTimeout(function () {
                $('#branding').animate({
                    backgroundColor: 'rgb(255,255,255)'
                }, 2000);
            }, 4000);
        });
        return 'url(http://placekitten.com/150/15' + img_array[index] +')';
    });
    setTimeout(changeBg, interval);
})();
});

A:

You need to user jQuery.
Add this lines at the end of functions.php file:
function modify_jquery() {
    if (!is_admin()) {
        // comment out the next two lines to load the local copy of jQuery
        wp_deregister_script('jquery');
        wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js', false, '1.9.1');
        wp_enqueue_script('jquery');
    }
}
add_action('init', 'modify_jquery');

