﻿(function ($) {
    $(function () {
        $("a[rel=example_group]").fancybox({
            'transitionIn': 'none',
            'transitionOut': 'none',
            'titlePosition': 'over',
            'titleFormat': function (title, currentArray, currentIndex, currentOpts) {
                return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
            }
        });

    });



    $(function () {
        $("img").each(function (i, item) {
            $(item).attr("title", $(item).attr("alt"));
        });
    });
})(jQuery);


function onYouTubePlayerReady(playerId) {
    ytplayer = document.getElementById("video_overlay");
    ytplayer.setVolume(100);
}

//accordion
window.onload = function () {

    // Pick your classes
    var myBox = document.getElementsByClassName('box_title');
    var myBoxOpen = document.getElementsByClassName('information');

    // Create the accordion
    var myAccordion = new fx.Accordion(
			myBox, myBoxOpen, {
			    onActive: function (tog) {
			        tog.setStyles({ color: '#fff', background: '#333' });
			    },
			    onBackground: function (tog) {
			        tog.setStyles({ color: '#666', background: '#ccc' });
			    },
			    alwaysHide: true
			}
		);
}
