/**
 * global.js
 *
 * Global JavaScript functions and variables for Your Fight Site CMS front-end.
 *
 * @author Martin Bean <martin@yourfightsite.com>
 */
$(document).ready(function() {
    Cufon.replace('h1 span.title');
    Cufon.replace('h2 span.title');
    Cufon.replace('h3 span.title');
    Cufon.replace('#navigation a', { hover: true });
    $('a[rel="external"]').addClass('external').attr('title', function() { return this.title + ' (opens in new window)'; }).click(function() { window.open(this.href); return false; });
    $('a[rel="popup"]').fancybox({
        overlayOpacity: '0.5',
        overlayColor: '#000'
    });
    $('input#checkout').click(function() { window.location.href = config.domain + '/cart/checkout'; return false; });
    $('table.cart td.remove a').click(function() {
        return confirm('Are you sure you wish to delete this item from your cart?');
    });
    $('.carousel .inner').jCarouselLite({
        btnNext: '.next',
        btnPrev: '.prev',
        visible: 6
    });
});
