

$(document).ready(function() {
	
	$(".click_grant").fancybox({ height: "90%", width: 710, type: "iframe" });

	$(".click_enlarge").fancybox({
		'transitionIn'	:	'fade',
		'transitionOut'	:	'fade',
		'speedIn'		:	200, 
		'speedOut'		:	200,
		'padding':5

	});
	
	$(".click_iframe").fancybox({
		'width'				: '60%',
		'height'			: '80%',
		'autoScale'			: true,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe',
		'padding':5
	});
	
	$(".click_iframe_close").click(function(){
		parent.$.fancybox.close();
	
	});
	

    $("#gallery").css("visibility","visible");
    $('#gallery-thumbs img').mouseover(function(){
        var pic = $(this).attr('src');
        var part = pic.split('/');
        $('.gallery-image').attr('src',part[0]+'/gallery/'+part[2]);
    });

    //styling form item widths with jquery
    $('#gallery-roll').before('<ul id="gallery-nav">').cycle({
        fx:     'fade',
        sync:   1,
        speed:  'fast',
        timeout: 0,
        pager:  '#gallery-nav',

        // callback fn that creates a thumbnail to use as pager anchor
        pagerAnchorBuilder: function(idx, slide) {
            return '<li><a href="#"><img src="' + slide.src + '" width="80" height="60" /></a></li>';
        },
        pagerEvent: 'mouseover' 
    });
   
	


});


