$(function(){  $('A[href=#]').click( false );  $.diHighlights = {    obj: $('#highlights'),    wrapper: null,    ul: null,    li: null,    prev: null,    next: null,    data: {      idx: 0,      amount: 0,      scroll: 192,      min: 5    },    init: function() {      if (this.obj.length) {        this.ul = this.obj.find('UL');        this.prev = this.obj.find('.prev');        this.next = this.obj.find('.next');        this.wrapper = this.ul.prev();        this.li = this.ul.find('LI');        this.data.amount = this.li.length;        //if (this.data.amount > this.data.min) {          var self = this;          this.prev.click(function( e ) {            e.preventDefault();            if (!self.ul.is(':animated') && self.data.idx > 0) {              self.data.idx--;              self.showNav();            }          });          this.next.click(function( e ) {            e.preventDefault();            if (!self.ul.is(':animated') && self.data.idx + self.data.min < self.data.amount) {              self.data.idx++;              self.showNav();            }          });          this.showNav();        //}      }    },    showNav: function() {      //this.prev.css('visibility', this.data.idx == 0 ? 'hidden' : 'visible');      //this.next.css('visibility', this.data.amount > this.data.min && this.data.idx + this.data.min < this.data.amount ? 'visible' : 'hidden');      this.ul.animate(         {'left': (this.data.idx * this.data.scroll) * -1 },          { "duration": 750 }      );    }  };    $.diHighlights.init();    $('DL.collapse').find('DT').children('A').click(function( e ) {    e.preventDefault();    var p = $(this).parent(), dd = p.next(), act = p.hasClass('active');    if (dd.is('DD') && !dd.is(':animated')) {       p.toggleClass('active', !act).siblings().removeClass('active').parent().find('DD').hide();      dd.toggle( !act );    }  });    $('#project-gallery-container').cycle({  	activePagerClass: 'active',  	fx: 'scrollHorz',  	easing: 'easeInOutExpo',  	sync: 1,  	timeout: 0,  	allowPagerClickBubble: false,  	fastOnEvent: 1000,  	speed: 1000,  	manualTrump: false,  	pager: '#project-pager'  });  $('#promo-slide').cycle({  	activePagerClass: 'active',  	fx: 'scrollHorz',  	easing: 'easeInOutExpo',    	timeout: 10000,  	sync: 1,  	speed: 1500,  	fastOnEvent: 1500,  	allowPagerClickBubble: false,  	manualTrump: false,  	pager: '#promo-pager',  	pause: true,  	pauseOnPagerHover: true,  	before: function() {       $('#promo-caption').html(this.title);    }    });  /*  $('A.switch-holder').click(function( e ){	  e.preventDefault();	  $( $(this).parent().hide().end().attr('href') ).show();  });  */  $('.switch-holder').children('A').click(function( e ) {  	e.preventDefault();  	var o = $(this);  	o.hide().siblings().show();  	$( o.attr('href') ).show().siblings().hide();  });    $('TABLE.sortable-table').find('TR').hover(function(){  	$(this).toggleClass('hover');  });    $('UL.highlights').children('LI').hover( function(){  	$(this).toggleClass('hover');  });    $('UL.people').children('LI').children('A').hover( function() {  	$(this).parent().toggleClass('hover');  });    $('UL.thumbs').children('LI').children('A, IMG').css({opacity: 0.20}).hover( function() {  	$(this).css({opacity:1});  }, function() {  	$(this).css({opacity:0.20});  });    /*  var tablePreview = $('DL.sortable-table-thumbs');  if (tablePreview.length) {  	tablePreview = tablePreview.children('DD');  	$('TABLE.sortable-table').find('A').each(function(){	  	var el = $(this), preview = el.data('preview');	  	if (typeof preview !== 'undefined' && preview.length) {	  		el.hover(	  			function() {	  				tablePreview.css({ 'background-image': "url('" + preview + "')" });	  			}, function() {	  				tablePreview.css({ 'background-image': 'none' });	  			}	  		);	  	}	  });  }  */});
