// ------------------------------ simple actions ------------------------------

var simpleActions = {};
simpleActions.jq= jQuery.noConflict();

(function($) {
    simpleActions.jq(document).ready(function() {

        // vars

        // actions
        //$("label").inFieldLabels();

        $('.tabsBlock').tabs();

        $('.accordion').accordion({
            collapsible: true,
            autoHeight: false
        });

        $('.accordionClosed').accordion({
            collapsible: true,
            autoHeight: false,
            active: -1
        });

        $('.noVideoThumb').each(function () {
            var tab = $(this).parents(".tabsBlock");
            tab.tabs('option', 'disabled', [2]);
        });

        $('.imageWithTitle a').lightBox();
        $('.gallery a').lightBox();

        jQuery('.carousel').jcarousel({
            wrap: 'both',
            scroll: 1
        });

        $('input.color').ColorPicker({
            onSubmit: function(hsb, hex, rgb, el) {
                $(el).val(hex);
                $(el).ColorPickerHide();
            },
            onBeforeShow: function () {
                $(this).ColorPickerSetColor(this.value);
            }
        })
        .bind('keyup', function(){
            $(this).ColorPickerSetColor(this.value);
        });

        $('.bottom-slider').show();
        $("#bottomScroller").simplyScroll({
			autoMode: 'loop'
		});


        //$('.imageWithTitle img').each(function () {
        // $(this).parents(".imageWithTitle").width($(this).width());
        //$(this).parents(".imageWithTitle").children('dd').html($(this).attr('title'))
        //});

        $('#runningString').loopedSlider({
            containerClick: false,
            autoStart: 4000
        });
        
        // functions
        $('.show-give-question-tab').click(function () {
            $(this).parents(".tabsBlock").tabs('option', 'selected', 1);
        });

    });
})(jQuery);

// ------------------------------ END simple actions ------------------------------
