// when the DOM is ready...
$(document).ready(function () {

	var winW = 630, winH = 460;
	
	if (parseInt(navigator.appVersion)>3) {
	 if (navigator.appName=="Netscape") {
	  winW = window.innerWidth;
	  winH = window.innerHeight;
	 }
	 if (navigator.appName.indexOf("Microsoft")!=-1) {
	  winW = document.body.offsetWidth;
	  winH = document.body.offsetHeight;
	 }
	}

	//alert(winW);
	//$('.scrollContainer').css('width',screen.width);
	$('.node').css('width', 584);
	$('.node').css('padding-left',((winW-568)/2)-8);
	$('.node').css('padding-right',((winW-568)/2)-8);
	
	$('.logodiv').css('width', 584);
	$('.logodiv').css('padding-left',((winW-868)/2)-8);
	
	
	$('.block ul').css('width', 800);
	$('.block ul').css('padding-left',((winW-760)/2)-8);
	$('.block ul').css('padding-right',((winW-760)/2)-8);
	


    // if false, we'll float all the panels left and fix the width 
    // of the container
    var horizontal = true;

    // float the panels left if we're going horizontal
   

    // collect the scroll object, at the same time apply the hidden overflow
    // to remove the default scrollbars that will appear
    var $scroll = $('#slider .scroll').css('overflow', 'hidden');

    // apply our left + right buttons
    

    // handle nav selection
    function selectNav() {
        $(this)
            .parents('ul:first')
                .find('a')
                    .removeClass('selected')
                .end()
            .end()
            .addClass('selected');
        
    }

    $('#slider .navigation').find('a').click(selectNav);

    // go find the navigation link that has this target and select the nav
    function trigger(data) {
        var el = $('#slider .navigation').find('a[href$="' + data.id + '"]').get(0);
        selectNav.call(el);
    }
    
    
  
    

    if (window.location.hash) {
        trigger({ id : window.location.hash.substr(1) });
    } else {
        $('ul.navigation a:first').click();
    }

    // offset is used to move to *exactly* the right place, since I'm using
    // padding on my example, I need to subtract the amount of padding to
    // the offset.  Try removing this to get a good idea of the effect
 

});