﻿// jQuery DOM ready
$(function($) {

    // Update Promotion Message
    MLP.updateMarketingMessage();

    // Load slideshow if class '.cycle' is available
//    if ($('.cycle').length > 0) {
//        $('.cycle').cycle({
//            pager: '.slidenumbers span',
//            timeout: 0,
//            next: '.slidecontrols .next',
//            prev: '.slidecontrols .prev',
//            after: function() { MLP.getVideo(this.id); }
//        });
//    }

    // Update Featured Breeds
    if ($('#featuredlist').length > 0) {
        for (i = 1; i <= 9; i++) {
            setTimeout("MLP.updateBreeds(" + i + ")", 15000);
        }
    }

    // Switch photos out on profile page
    if ($('.photo-load').length > 0) {
        $('.photo-load').click(function() {
            $('.photo-large').attr('src', $(this).attr('src'));
        });
    }

    $('.dropdown li').hover(function() {
        $('ul:first', this).css({ display: 'block' });
    }, function() {
        $('ul:first', this).css({ display: 'none' });
    });
});
