jQuery.noConflict();

// Use jQuery via jQuery(...)
jQuery(document).ready(function(){
    jQuery("#tabs").smartTab({
        autoProgress: false,
        stopOnFocus:true,
        transitionEffect:'slide'
    });

    // choose text for the show/hide link - can contain HTML (e.g. an image)
    var showText='<img src="http://www.wijncultuur.nl/skin/frontend/default/wijncultuur/images/expand.png" alt="Toon meer/minder" title="Toon meer/minder" />';
    var hideText='<img src="http://www.wijncultuur.nl/skin/frontend/default/wijncultuur/images/expand.png" alt="Toon meer/minder" title="Toon meer/minder" />';

    // initialise the visibility check
    var is_visible = false;

    // append show/hide links to the element directly preceding the element with a class of "toggle"
    jQuery('.toggle').prev().append(' <span class="toggleLink">'+showText+'<\/span>');

    // hide all of the elements with a class of 'toggle'
    jQuery('.toggle').hide();

    // capture clicks on the toggle links
    jQuery('span.toggleLink').click(function() {

        // switch visibility
        is_visible = !is_visible;

        // change the link depending on whether the element is shown or hidden
        jQuery(this).html( (!is_visible) ? showText : hideText);

        // toggle the display - uncomment the next line for a basic "accordion" style
        //$('.toggle').hide();$('a.toggleLink').html(showText);
        jQuery(this).parent().next('.toggle').toggle('slow');

        // return false so any link destination is not followed
        return false;

    });

});
