// JavaScript Document
// Set thickbox loading image
tb_pathToImage = "images/25.gif";

var mycarousel_itemList = [
	{url: "images/gallery/60.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/61.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/62.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/63.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/64.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/65.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/66.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/67.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/68.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/69.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/70.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/71.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/72.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/73.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/74.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/75.jpg", title: "Yates German Shepherds"},
/*    {url: "images/gallery/01.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/02.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/03.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/04.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/05.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/06.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/07.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/08.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/09.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/10.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/11.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/12.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/13.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/14.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/15.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/16.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/17.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/18.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/19.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/20.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/21.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/22.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/23.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/24.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/25.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/26.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/27.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/28.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/29.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/30.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/31.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/32.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/33.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/34.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/35.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/36.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/37.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/38.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/39.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/40.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/41.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/42.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/43.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/44.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/45.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/46.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/47.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/48.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/49.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/50.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/51.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/52.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/53.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/54.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/55.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/56.jpg", title: "Yates German Shepherds"},
	{url: "images/gallery/57.jpg", title: "Yates German Shepherds"},
    {url: "images/gallery/58.jpg", title: "Yates German Shepherds"}*/
];

function mycarousel_itemLoadCallback(carousel, state)
{
    for (var i = carousel.first; i <= carousel.last; i++) {
        if (carousel.has(i)) {
            continue;
        }

        if (i > mycarousel_itemList.length) {
            break;
        }

        // Create an object from HTML
        var item = jQuery(mycarousel_getItemHTML(mycarousel_itemList[i-1])).get(0);

        // Apply thickbox
        tb_init(item);

        carousel.add(i, item);
    }
};

/**
 * Item html creation helper.
 */
function mycarousel_getItemHTML(item)
{
    var url_m = item.url.replace(/_s.jpg/g, '_m.jpg');
    return '<a href="' + url_m + '" title="' + item.title + '"><img src="' + item.url + '" width="89" border="0" alt="' + item.title + '" /></a>';
};

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        size: mycarousel_itemList.length,
        itemLoadCallback: {onBeforeAnimation: mycarousel_itemLoadCallback},
		scroll: 7
    });
});