﻿try {
    Typekit.load({
        /*
        * This funtion will be called as soon as fonts have started loading.
        */
        loading: function (data) {
            // fonts are loading.
        },

        /*
        * This function will be called after the fonts have loaded and rendered.
        */
        active: function () {
            // fonts have loaded!
        },

        /*
        * This function will be called if Typekit does not support the current browser.
        */
        inactive: function () {
            // this browser doesn't support fonts
        }

    });
} catch (e) { }

//$(document).ready(function () {

//    $('.gallery').each(function () {
//        $(this).after('<div class="imgSelectNav"><div class="imgSelect imgSelect0"></div></div><div class="clear"></div>').cycle({
//            fx: 'fade',
//            speed: '1000',
//            timeout: 7000,
//            pager: '.imgSelect0',
//            pagerAnchorBuilder: function (idx, slide) {
//                return '<a href="#"></a>';
//            }
//        });
//    });
//    $('.news_reel').each(function () {
//        $(this).cycle({
//            fx: 'fade',
//            speed: '1000',
//            timeout: 5000
//        });
//    });

//    /* Stop Main Cycle */
//    $('#gallery').click(function () {
//        $(this).cycle('pause');
//    });
//    $('.imgSelect a').live('click', function () {
//        $('#gallery').cycle('pause');
//    });
//});
$(window).load(function () {

    $('.gallery').each(function () {
        $(this).after('<div class="imgSelectNav"><div class="imgSelect imgSelect0"></div></div><div class="clear"></div>').cycle({
            fx: 'fade',
            speed: '1000',
            timeout: 7000,
            pager: '.imgSelect0',
            pagerAnchorBuilder: function (idx, slide) {
                return '<a href="#"></a>';
            }
        });
    });
    $('.news_reel a').css({ "display": "block"});
    $('.news_reel').each(function () {
        $(this).cycle({
            fx: 'fade',
            speed: '1000',
            timeout: 5000
        });
    });

    /* Stop Main Cycle */
    $('#gallery').click(function () {
        $(this).cycle('pause');
    });
    $('.imgSelect a').live('click', function () {
        $('#gallery').cycle('pause');
    });
});
