$(document).ready(function() {
	
	//get text of nav li.on and apply as class to body
	var activeItemText =	$('#nav > li.on > a').text();
	var sectionClass  = activeItemText.split(' ');
	sectionClass = sectionClass[0].toLowerCase();
	$('body').addClass(sectionClass);
	
	if ($('#slideshow').length) {
		//console.log('slideshow exists');
		
		$('#slideshow')
		.before('<div id="slide_nav">')
		.cycle({
			fx: 'fade',
			speed: 800,
			timeout: 8000,
			pager: '#slide_nav',
			cleartype:  1, // enable cleartype corrections
			slideExpr: 'li.slide'
		});
	}
	
	//edit slideshow
	$('#edit_slideshow').css('opacity',0.8);

});	






	//Marquee 
/*
$(function () {
		$('div#marqueecontainer marquee').marquee('pointer').mouseover(function () {
            $(this).trigger('stop');
        }).mouseout(function () {
            $(this).trigger('start');
        }).mousemove(function (event) {
            if ($(this).data('drag') == true) {
                this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
            }
        }).mousedown(function (event) {
            $(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
        }).mouseup(function () {
            $(this).data('drag', false);
        });
    });
		*/
