// Main Code
$(document).ready(function(){
	// Navigation Main
	$(".nav-main-list li").hover(
		function(){
			$('a',this).css('color','#a32325');
			$(this).addClass('hover');
		},
		function(){
			$('a',this).css('color','');
			$(this).removeClass('hover');
		}
	).click(function(){document.location.href=$('a',this).attr('href');}).css('cursor','pointer');
	// Navigation Partners
	$(".nav-partners div").cycle({
		fx:     'fade',
		timeout:  4000,
		delay:   -2000,
		before: function(curr,next,opts) {
			$(next).css({
				'margin-left': ((130 - $(next).outerWidth()) / 2)
			});
		}
	}).click(function(){document.location.href='/resources/';}).css('cursor','pointer');
	// News
	$(".headlines div").cycle({
		fx:     'fade',
		timeout:  4000,
		delay:   -2000
	});
});

// Classes & Functions

/* Class Inheritance Example
var Person = Class.extend({
  init: function(isDancing){
    this.dancing = isDancing;
  },
  dance: function(){
    return this.dancing;
  }
});
var Ninja = Person.extend({
  init: function(){
    this._super( false );
  },
  dance: function(){
    // Call the inherited version of dance()
    return this._super();
  },
  swingSword: function(){
    return true;
  }
});

var p = new Person(true);
p.dance(); // => true

var n = new Ninja();
n.dance(); // => false
n.swingSword(); // => true

// Should all be true
p instanceof Person && p instanceof Class &&
n instanceof Ninja && n instanceof Person && n instanceof Class
*/