$(document).ready(function() {

    var username = 'sinclairyork'; // set user name
    var format = 'json'; // set format, you really don't have an option on this one
    var url = 'http://api.twitter.com/1/statuses/user_timeline/' + username + '.' + format + '?callback=?'; // make the url

    $.getJSON(url, function(tweet) { // get the tweets
        $("#last-tweet").html(tweet[0].text); // get the first tweet in the response and place it inside the div
    });

    $('#ad_s').click(function() {
        $('#advanced_search_options').toggle('fast', function() {
            // Animation complete.
        });
    });

    $('#ad_s_close').click(function() {
        $('#advanced_search_options').toggle('fast', function() {
            // Animation complete.
        });
    });

    $("#s_r_v img[title]").tooltip();

    $('#slideshow').cycle({
        fx: 'fade',
        speed: 500,
        timeout: 5000
    });

    $('#slideshow2').cycle({
        fx: 'fade',
        speed: 500,
        next: "#slideshow2",
        timeout: 5000
    });

    AdvancedSearchTop_OnChange();

    //Galleria.loadTheme('galleria/src/themes/classic/galleria.classic.js');

    //$('.gallery').galleria();
});
