$(document).ready(function() {

  //Layout Mods
  breadcrumb.removeLastRaqou();
  nav1.addAnchor();

  //Plugins
  $('#banner').cycle({
		fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...,
    speed:    2000,
    timeout:  6000
	});

  $('.item-text-image .colorbox').colorbox();
  newsticker.init();
});


/* ============ Layout mods ============ */
/* ===================================== */


var breadcrumb = {
  removeLastRaqou: function() {
    var lastItem = $('#breadcrumb li:last').html();
    $('#breadcrumb li:last').html(lastItem.replace('»',''));
  }
}
/* ===================================== */



/* ============ Nav mods ============ */
/* ===================================== */

var nav1 = {
  addAnchor: function() {
    
    $('#nav-1 a').each(function(){
      var href = $(this).attr("href") + '#content';
      $(this).attr("href", href);
    });
  }
}


/* ============ Animations ============ */
/* ===================================== */

var newsticker = {
  init: function() {
    $('#news-list').vTicker({
       speed: 1000,
       pause: 3000,
       showItems: 3,
       animation: 'fade',
       mousePause: true,
       height: 200,
       direction: 'up'
    });
  }
}
