﻿$(document).ready(function () {

    //$("div.accordion").accordion({ autoHeight: false, collapsible: false });

    $("div#search-site input.text").val("Search");
    $("div#search-site input.text").click(function () {
        if ($(this).val() == "Search")
            $(this).val("");
    });
    $("div#search-site input.text").blur(function () {
        if ($(this).val() == "")
            $(this).val("Search");
    });

    // home cycler
    var rotator = $('ul#home-cycler');
    $(rotator).cycle({
        fx: 'scrollHorz',
        timeout: 16000,
        speed: 750,
        pager: 'div#pager',
        after: onAfter
    });

    function onAfter() {
        $('#cycler-caption').html($(this).find("div.cycler-caption-li").html());
    }


});

ddaccordion.init({
    headerclass: "attorney-detail-header", //Shared CSS class name of headers group
    contentclass: "attorney-detail-body", //Shared CSS class name of contents group
    collapseprev: false, //Collapse previous content (so only one open at any time)? true/false 
    defaultexpanded: [0], //index of content(s) open by default [index1, index2, etc]. [] denotes no content.
    animatedefault: false, //Should contents open by default be animated into view?
    persiststate: false, //persist state of opened contents within browser session?
    toggleclass: ["attorney-detail-header-closed", "attorney-detail-header-open"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
    togglehtml: [], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
    animatespeed: "fast" //speed of animation: "fast", "normal", or "slow"
})


