jQuery.noConflict();

// Put all your code in your document ready area

jQuery(document).ready(function($) {

    // Do jQuery stuff using $ this where the functions need to go   


    $(document).ready(function() {

        // ======================== HOVER GRAYSCALE =======================================
        // Code commented because it is slow in grayscaling the images because they are too large
        //		    $('#navigation').find('a[href]').mouseover(function() {
        //                $('.homeslide_container').find('img').each(function() {
        //                    grayscale(this);
        //                    //$(this).toggle();
        //                });
        //            });
        //            
        //            $('#navigation').find('a[href]').mouseout(function() {
        //                $('.homeslide_container').find('img').each(function() {
        //                    grayscale.reset(this);
        //                });
        //            });
        //              enabling the function below interferes with the jquery slide            
        //            $('.homeslide_container').find('img').each(function() {
        //                grayscale.prepare(this);
        //            }); 

        // ======================= ADD PRINT BUTTON TO BOTTOM UL =========================

        $('p#print_page a').click(function() {
            window.print();
            return false;
        });



        // ======================= CHANGE FONT SIZE ===================================

        $(document).ready(function() {
            // Reset Font Size
            var originalFontSize = $('html').css('font-size');
            $(".resetFont").click(function() {
                $('html').css('font-size', originalFontSize);
            });
            // Increase Font Size
            $(".increaseFont").click(function() {
                var currentFontSize = $('html').css('font-size');
                var currentFontSizeNum = parseFloat(currentFontSize, 10);
                var newFontSize = currentFontSizeNum * 1.2;
                $('html').css('font-size', newFontSize);
                return false;
            });
            // Decrease Font Size
            $(".decreaseFont").click(function() {
                var currentFontSize = $('html').css('font-size');
                var currentFontSizeNum = parseFloat(currentFontSize, 10);
                var newFontSize = currentFontSizeNum * 0.8;
                $('html').css('font-size', newFontSize);
                return false;
            });
        });


        // ======================= HOMEPAGE SLIDER =========================

        $('div#homeslide').cycle({
            fx: 'fade',
            timeout: 10000,
            delay: 10,
            next: 'a#next',
            prev: 'a#prev',
            pause: true,
            cleartypeNoBg: true,
            pause: 1
        });

        $('div.sidebarslider').cycle({
            fx: 'fade',
            timeout: 2000,
            delay: -3,
            cleartypeNoBg: true

        });
    });

    /*==================== SIDENAV JQUERY ================*/

    $(document).ready(function() {

     //   $("ul.sidenav li ").hover(function() {
     //       $(this).find("ul.hoverbox").stop()
	 //							.animate({ left: "210", opacity: 1 }, "fast")
	 //							.css("display", "block")

     //   }, function() {
     //       $(this).find("ul.hoverbox").stop()
	 //							.hide({ left: "-200", opacity: 0 }, "fast")
	 //							.css("display", "none")
     //   });



        $("div.howcanwehelp").hide();
        $('a#nav_how_we_can_help,div.howcanwehelp').mouseover(function() {
            if (window.howcanwehelp) clearTimeout(window.howcanwehelp);
            $('div.howcanwehelp').stop().show();
        }).mouseout(function() {
            window.howcanwehelp = setTimeout(function() {
                $('div.howcanwehelp').stop().hide();
            }, 150);
        });

        $("div.yourquestions").hide();
        $('a#nav_your_questions,div.yourquestions').mouseover(function() {
            if (window.yourquestions) clearTimeout(window.yourquestions);
            $('div.yourquestions').stop().show();
        }).mouseout(function() {
            window.yourquestions = setTimeout(function() {
                $('div.yourquestions').stop().hide();
            }, 150);
        });

        $("div.coveryourtracks").hide();
        $('a#nav_cover_your_tracks,div.coveryourtracks').mouseover(function() {
            if (window.coveryourtracks) clearTimeout(window.coveryourtracks);
            $('div.coveryourtracks').stop().show();
        }).mouseout(function() {
            window.coveryourtracks = setTimeout(function() {
                $('div.coveryourtracks').stop().hide();
            }, 150);
        });
		
		$("div.volunteer").hide();
        $('a#nav_volunteer,div.volunteer').mouseover(function() {
            if (window.volunteer) clearTimeout(window.volunteer);
            $('div.volunteer').stop().show();
        }).mouseout(function() {
            window.volunteer = setTimeout(function() {
                $('div.volunteer').stop().hide();
            }, 150);
        });


    });
    /*==================== News Ticker ================*/

    $('marquee').marquee('pointer').mouseover(function() {
													   

        if ($(this).data('drag') == true) {
            this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
			
        }
    });

    // ======================= BULLETPOINT TOOGLE =========================

    $("div#slider_overlay,div.event_overlay").hide();

    $("li.overlay_selector,div.overlay_selector").hover(function() {
        $("div#slider_overlay,div.event_overlay").slideToggle('1000', function() {
            // Animation complete.
        });
    });


});
					
		




