    var currentArrowPosition = 520;

    $(document).ready(function(){
        $.init_slide('imgstore','showhere',1,1,1000,1,5000,1,'_self');
        
        anchor.init()

        $("#navigation li").find("a").click(function(){ 
	      	currentArrowPosition = eval($(this).offset().left);
	    })
	    $("#navigation li").find("a").hover(function() {
		    $('#arrow').animate({ left: eval($(this).offset().left)+'px' }, "slow");
		    $('#arrow').dequeue();
        }, function() {
            $('#arrow').animate({ left: currentArrowPosition+"px" }, "slow");
		    $('#arrow').dequeue();
        });
    });

    anchor = {
	    init : function()  {
		    $("a.anchorLink").click(function () {	
			    elementClick = $(this).attr("href")
			    destination = $(elementClick).offset().top;
			    $("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination}, 1100 );
		      	return false;
		    })
	    }
    }


    featuredcontentglider.init({
	    gliderid: "canadaprovinces", //ID of main glider container
	    contentclass: "glidecontent", //Shared CSS class name of each glider content
	    togglerid: "p-select", //ID of toggler container
	    remotecontent: "", //Get gliding contents from external file on server? "filename" or "" to disable
	    selected: 0, //Default selected content index (0=1st)
	    persiststate: false, //Remember last content shown within browser session (true/false)?
	    speed: 500, //Glide animation duration (in milliseconds)
	    direction: "leftright", // "updown", "downup", "leftright", or "rightleft"
	    autorotate: false, 
	    autorotateconfig: [6000, 2] 
    })

    $(function() {
        $('#gallery a').lightBox();
    });

