// JavaScript Document

function mapOpenWindow() {

var mlHeight = 601;
var mlWidth = 600;
var mlTop = (screen.height) ? (screen.height - mlHeight) / 2 : 0;
var mlLeft = (screen.width) ? (screen.width - mlWidth) / 2 : 0;
var msParameters = 'location=no,top=' + 0 + ',left=' + mlLeft + ',menubar=no,resizable=no,status=no,height=' + mlHeight + ',width=' + mlWidth + ',scrollbars=no,toolbar=no,menubar=no,directories=no';
var oEvent = window.open('arcadia_map.php','Map',msParameters);
}


function yardageGuideOpenWindow() {

var mlHeight = 400;
var mlWidth = 600;
var mlTop = (screen.height) ? (screen.height - mlHeight) / 2 : 0;
var mlLeft = (screen.width) ? (screen.width - mlWidth) / 2 : 0;
var msParameters = 'location=no,top=' + 0 + ',left=' + mlLeft + ',menubar=no,resizable=no,status=no,height=' + mlHeight + ',width=' + mlWidth + ',scrollbars=no,toolbar=no,menubar=no,directories=no';
var oEvent = window.open('yardage_guide.php','YardageGuide',msParameters);
}

/* JS Based scrolling news */ 
(function($) {
        $(document).ready(function() {
                var $newsItems = $('#scroller li').hide();
                var $activeItem = $newsItems.first();
                $('#scroller').css('display','inline');

                $activeItem.show('slide',{direction:'up'},1000);

                if($.browser.msie == false || $.browser.version > 8)
                    $('#scroller').css({'max-width':'280px'});

                if($.browser.msie && $.browser.version < 8) {
                    $('#scroller').css({'margin':'0','margin-left':'-10px','max-width':'none',width:'350px',height:'100%'});
                }

                window.setInterval(function() {
                        var $nextItem = $activeItem.next();
                        if($nextItem.length == 0)
                                $nextItem = $newsItems.first();

                        $activeItem.hide('slide',{direction:'down'},1000,function() {
                                $nextItem.show('slide',{direction:'up'},1000);
                                $activeItem = $nextItem;
                        });
                },5000);
        });
})(jQuery);

