﻿$(document).ready(function() {

    /*$("#slideshow").before('<div id="slideshow_nav">').cycle({
        timeout:10000,
        pager:"#slideshow_nav",
		cleartypeNoBg: false
				//pagerAnchorBuilder: function(idx, slide){
					//	return '<li><a class="trial" href="#"></a></li>'; 
			}//
    });*/

    // Pause the slideshow when a nav number is clicked

    /*$("#slideshow_nav a").click(function() {
        $("ul#slideshow").cycle('pause');
    });*/


    $("#slideshow").cycle({
        timeout: 10000,
        speed: 750,
        pause: true,
        pauseOnPagerHover: true,
        pagerEvent: "mouseover",
        pager: "#home_nav ul",
        pagerAnchorBuilder: function(idx, slide) {
            // return sel string for existing anchor
            return '#home_nav li:eq(' + (idx) + ')';
        }
    });

    // follow links in the slideshow nav
    $("#home_nav a").click(function(event) {
        window.location = $(this).attr('href');
    });

});


