
/* Merged Plone Javascript file
 * This file is dynamically assembled from separate parts.
 * Some of these parts have 3rd party licenses or copyright information attached
 * Such information is valid for that section,
 * not for the entire composite file
 * originating files are separated by - filename.js -
 */

/* - ++resource++tis.bestminds.js/ie6update.js - */
// http://www.bestmindsmeet.com/portal_javascripts/++resource++tis.bestminds.js/ie6update.js?original=1
<!--[if IE 6]><script type="text/javascript">if(typeof jQuery=='undefined'){document.write("<script type=\"text/javascript\"   src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js\"></"+"script>");var __noconflict=true}
var IE6UPDATE_OPTIONS={icons_path:"http://static.ie6update.com/hosted/ie6update/images/"}</script><script type="text/javascript" src="http://static.ie6update.com/hosted/ie6update/ie6update.js"></script>

/* - ++resource++plonetruegallery-portlet.js - */
// http://www.bestmindsmeet.com/portal_javascripts/++resource++plonetruegallery-portlet.js?original=1
(function($){
function set_controls_position(container){var width=container.find('img').width();var left=(width/2)-43;container.find('div.gallery-portlet-controls').css("left",left)}
function get_image(link){var container=link.parent().parent().parent();var controls=container.find('div.gallery-portlet-controls');var next=controls.find('span.next a');var prev=controls.find('span.prev a');var img=container.find('img');$.ajax({url:'@@get-image-for-gallery-portlet',data:link.attr('href').split('?')[1],type:'GET',dataType:'json',success: function(data,results){img.fadeOut("slow", function(){img.attr('src',data.src);img.parent().attr('href',data['image-link']);next.attr('href',next.attr('href').split('?')[0]+'?'+data['next-url']);prev.attr('href',prev.attr('href').split('?')[0]+'?'+data['prev-url']);set_controls_position(container);img.fadeIn("slow")})}})}
var timeout_id=0;
function perform_play(portlet){portlet.find('span.next a').trigger('click');timeout_id=setTimeout(function(){perform_play(portlet)},5000)}
function play(portlet){portlet.addClass('timed');portlet.find('span.play-pause').addClass('timed');timeout_id=setTimeout(function(){perform_play(portlet)},5000)}
function pause(portlet){portlet.removeClass('timed');portlet.find('span.play-pause').removeClass('timed');clearTimeout(timeout_id)}
$(document).ready(function(){$('dl.portletGallery span.next a,dl.portletGallery span.prev a').click(function(){get_image($(this));return false});$('dl.portletGallery span.play-pause').css({'display':'inline'});var portlets=$('dl.portletGallery');portlets.addClass('applied-portlet-gallery');portlets.each(function(){var portlet=$(this);set_controls_position(portlet);if(portlet.hasClass('timed')){play(portlet)}else{pause(portlet)}});$('dl.portletGallery span.play-pause a').click(function(){var portlet=$(this).parent().parent().parent();if(portlet.hasClass('timed')){pause(portlet)}else{play(portlet)}
return false});$('dl.portletGallery').hover(
function(){var controls=$(this).find('div.gallery-portlet-controls');controls.fadeIn()},
function(){var controls=$(this).find('div.gallery-portlet-controls');controls.fadeOut()})})})(jQuery);

/* - collective.flowplayer.js - */
(function($) {
        $(function() { 
            $('.autoFlowPlayer').each(function() {
                var config = {
    "clip": {
        "scaling": "fit", 
        "autoBuffering": false, 
        "autoPlay": false
    }, 
    "plugins": {
        "audio": {
            "url": "http%3A//www.bestmindsmeet.com//%2B%2Bresource%2B%2Bcollective.flowplayer/flowplayer.audio.swf"
        }, 
        "controls": {
            "url": "http%3A//www.bestmindsmeet.com//%2B%2Bresource%2B%2Bcollective.flowplayer/flowplayer.controls.swf", 
            "volume": true
        }
    }
};
                if ($(this).is('.minimal')) { config.plugins.controls = null; }
                var audio = $(this).is('.audio');
                if (audio) {
                    $(this).width(500);
                    config.plugins.controls.all = false;
                    config.plugins.controls.play = true;
                    config.plugins.controls.scrubber = true;
                    config.plugins.controls.mute = true;
                    config.plugins.controls.volume = true;
                }
                if ($(this).is('div')) {
                    // comming from Kupu, there are relative urls
                    config.clip.baseUrl = $('base').attr('href');
                    config.clip.url = $(this).find('a').attr('href');
                    // Ignore global autoplay settings
                    if ($(this).find('img').length == 0) {
                        // no image. Don't autoplay, remove all elements inside the div to show player directly.
                        config.clip.autoPlay = false;
                        $(this).empty();
                    } else {
                        // Clip is probably linked as image, so autoplay the clip after image is clicked
                        config.clip.autoPlay = true;
                    }
                }
                flowplayer(this, {"src": "http://www.bestmindsmeet.com//++resource++collective.flowplayer/flowplayer.swf"}, config).onLoad( function() { this.setVolume(50); });
                $('.flowPlayerMessage').remove();
            });
            $('.playListFlowPlayer').each(function() {
                var config = {
    "clip": {
        "scaling": "fit", 
        "autoBuffering": false, 
        "autoPlay": false
    }, 
    "plugins": {
        "audio": {
            "url": "http%3A//www.bestmindsmeet.com//%2B%2Bresource%2B%2Bcollective.flowplayer/flowplayer.audio.swf"
        }, 
        "controls": {
            "url": "http%3A//www.bestmindsmeet.com//%2B%2Bresource%2B%2Bcollective.flowplayer/flowplayer.controls.swf", 
            "volume": true
        }
    }
};
                var audio = $(this).is('.audio');
                if (audio) { config.plugins.controls.fullscreen = false; }
                if ($(this).is('.minimal')) { config.plugins.controls = null; }
                if ($(this).find('img').length > 0) { 
                    // has splash
                    config.clip.autoPlay = true;
                }
                portlet_parents = $(this).parents('.portlet');
                var playlist_selector = 'div#flowPlaylist';
                if (portlet_parents.length > 0) {
                    var portlet = true;
                    // playlist has to be bound to unique item
                    playlist_selector_id = portlet_parents.parent().attr('id')+'-playlist';
                    $(this).parent().find('.flowPlaylist-portlet-marker').attr('id', playlist_selector_id);
                    playlist_selector = '#'+playlist_selector_id;
                    if (audio) {
                        config.plugins.controls.all = false;
                        config.plugins.controls.play = true;
                        config.plugins.controls.scrubber = true;
                        config.plugins.controls.mute = true;
                        config.plugins.controls.volume = false;
                    }
                } else {
                    var portlet = false;
                }
                if (!portlet) {
                    $("#pl").scrollable({items:playlist_selector, size:4, clickable:false});
                }
                // manual = playlist is setup using HTML tags, not using playlist array in config
                flowplayer(this, {"src": "http://www.bestmindsmeet.com//++resource++collective.flowplayer/flowplayer.swf"}, config).playlist(playlist_selector, {loop: true, manual: true}).onLoad( function() { this.setVolume(50); });
                $(this).show();
                $('.flowPlayerMessage').remove();

            });
        });
})(jQuery);

