// JQUERY CUSTOM COMMANDS
$(document).ready( function() {  // start javascript when document is loaded

	$("a#donate").bind("click", function() {
		$("#donate_form").submit();
		return false;
	});

	$("a#single_1").fancybox();
		
	$("a#single_2").fancybox({
		'zoomOpacity'			: true,
		'overlayShow'			: false,
		'zoomSpeedIn'			: 500,
		'zoomSpeedOut'			: 500
	});
	
	$("a#single_3").fancybox({
		'overlayShow'			: false,
		'zoomSpeedIn'			: 600,
		'zoomSpeedOut'			: 500,
		'easingIn'				: 'easeOutBack',
		'easingOut'				: 'easeInBack'
	});
	
	$("a.group").fancybox({
		'hideOnContentClick': false
	});
	
	/* CYCLE */
	$('#cranes_home').cycle({
	    fx:     'fade',
	    speed:   1500, // speed of the transition (any valid fx speed value)
	    timeout: 4000, // milliseconds between slide transitions (0 to disable auto advance) 
		speedIn:  900, 
   		speedOut: 900, 
   		fit:      1,
   		pauseOnPagerHover: 1,
	    //next:   '#cranes_home', // id of element to use as click trigger for next slide 
	    pause:   1, // true to enable "pause on hover" 
		pager: 	'#productsnav', // id of element to use as pager container 
		pagerAnchorBuilder: function(idx, slide) { 
       		// return selector string for existing anchor 
        	return '#productsnav li:eq(' + idx + ') a'; 
    	} 
	});
	
	$('#aboutus_top').cycle({fx:     'fade', fit:1});
	
	$('#productdetail_specs_detail').cycle({
	    fx:     'fade',
	    speed:   100, // speed of the transition (any valid fx speed value)
	    timeout: 0, // milliseconds between slide transitions (0 to disable auto advance) 
		speedIn:  100, 
   		speedOut: 100, 
	    pause:   1, // true to enable "pause on hover" 
		pager: 	'#productdetail_specs_buttons', // id of element to use as pager container 
		pagerAnchorBuilder: function(idx, slide) { 
       		// return selector string for existing anchor 
        	return '#productdetail_specs_buttons li:eq(' + idx + ') a'; 
    	} 
	});	
	
	$('#gallery_bottom706').cycle({
	    fx:     'fade',
	    speed:   100, // speed of the transition (any valid fx speed value)
	    timeout: 0, // milliseconds between slide transitions (0 to disable auto advance) 
		speedIn:  100, 
   		speedOut: 100, 
	    pause:   1, // true to enable "pause on hover" 
	    cleartype:true,
	    cleartypeNoBg:true, 
		pager: 	'#gallery_top_right706', // id of element to use as pager container 
		pagerAnchorBuilder: function(idx, slide) { 
       		// return selector string for existing anchor 
        	return '#gallery_top_right706 li:eq(' + idx + ') a'; 
    	} 
	});	
	
	$('#gallery_bottom547').cycle({
	    fx:     'fade',
	    speed:   100, // speed of the transition (any valid fx speed value)
	    timeout: 0, // milliseconds between slide transitions (0 to disable auto advance) 
		speedIn:  100, 
   		speedOut: 100, 
	    pause:   1, // true to enable "pause on hover" 
	    cleartype:true,
	    cleartypeNoBg:true, 
		pager: 	'#gallery_top_right547', // id of element to use as pager container 
		pagerAnchorBuilder: function(idx, slide) { 
       		// return selector string for existing anchor 
        	return '#gallery_top_right547 li:eq(' + idx + ') a'; 
    	} 
	});	

	$('#gallery_bottom376').cycle({
	    fx:     'fade',
	    speed:   100, // speed of the transition (any valid fx speed value)
	    timeout: 0, // milliseconds between slide transitions (0 to disable auto advance) 
		speedIn:  100, 
   		speedOut: 100, 
	    pause:   1, // true to enable "pause on hover" 
	    cleartype:true,
	    cleartypeNoBg:true, 
		pager: 	'#gallery_top_right376', // id of element to use as pager container 
		pagerAnchorBuilder: function(idx, slide) { 
       		// return selector string for existing anchor 
        	return '#gallery_top_right376 li:eq(' + idx + ') a'; 
    	} 
	});	

	$('#gallery_bottom295').cycle({
	    fx:     'fade',
	    speed:   100, // speed of the transition (any valid fx speed value)
	    timeout: 0, // milliseconds between slide transitions (0 to disable auto advance) 
		speedIn:  100, 
   		speedOut: 100, 
	    pause:   1, // true to enable "pause on hover" 
	    cleartype:true,
	    cleartypeNoBg:true, 
		pager: 	'#gallery_top_right295', // id of element to use as pager container 
		pagerAnchorBuilder: function(idx, slide) { 
       		// return selector string for existing anchor 
        	return '#gallery_top_right295 li:eq(' + idx + ') a'; 
    	} 
	});	
	
	
	$('#gallery_bottom095').cycle({
	    fx:     'fade',
	    speed:   100, // speed of the transition (any valid fx speed value)
	    timeout: 0, // milliseconds between slide transitions (0 to disable auto advance) 
		speedIn:  100, 
   		speedOut: 100, 
	    pause:   1, // true to enable "pause on hover" 
	    cleartype:true,
	    cleartypeNoBg:true, 
		pager: 	'#gallery_top_right095', // id of element to use as pager container 
		pagerAnchorBuilder: function(idx, slide) { 
       		// return selector string for existing anchor 
        	return '#gallery_top_right095 li:eq(' + idx + ') a'; 
    	} 
	});	
	
	
	$('#gallery_bottom094').cycle({
	    fx:     'fade',
	    speed:   100, // speed of the transition (any valid fx speed value)
	    timeout: 0, // milliseconds between slide transitions (0 to disable auto advance) 
		speedIn:  100, 
   		speedOut: 100, 
	    pause:   1, // true to enable "pause on hover" 
	    cleartype:true,
	    cleartypeNoBg:true, 
		pager: 	'#gallery_top_right094', // id of element to use as pager container 
		pagerAnchorBuilder: function(idx, slide) { 
       		// return selector string for existing anchor 
        	return '#gallery_top_right094 li:eq(' + idx + ') a'; 
    	} 
	});		
	
	
	$('#gallery_bottom506').cycle({
	    fx:     'fade',
	    speed:   100, // speed of the transition (any valid fx speed value)
	    timeout: 0, // milliseconds between slide transitions (0 to disable auto advance) 
		speedIn:  100, 
   		speedOut: 100, 
	    pause:   1, // true to enable "pause on hover" 
	    cleartype:true,
	    cleartypeNoBg:true, 
		pager: 	'#gallery_top_right506', // id of element to use as pager container 
		pagerAnchorBuilder: function(idx, slide) { 
       		// return selector string for existing anchor 
        	return '#gallery_top_right506 li:eq(' + idx + ') a'; 
    	} 
	});	
	
	$('#gallery_bottomadvertising').cycle({
	    fx:     'fade',
	    speed:   100, // speed of the transition (any valid fx speed value)
	    timeout: 0, // milliseconds between slide transitions (0 to disable auto advance) 
		speedIn:  100, 
   		speedOut: 100, 
	    pause:   1, // true to enable "pause on hover" 
	    cleartype:true,
	    cleartypeNoBg:true, 
		pager: 	'#gallery_top_rightadvertising', // id of element to use as pager container 
		pagerAnchorBuilder: function(idx, slide) { 
       		// return selector string for existing anchor 
        	return '#gallery_top_rightadvertising li:eq(' + idx + ') a'; 
    	} 
	});	
	
	$('#gallery_bottombrochures').cycle({
	    fx:     'fade',
	    speed:   100, // speed of the transition (any valid fx speed value)
	    timeout: 0, // milliseconds between slide transitions (0 to disable auto advance) 
		speedIn:  100, 
   		speedOut: 100, 
	    pause:   1, // true to enable "pause on hover" 
	    cleartype:true,
	    cleartypeNoBg:true, 
		pager: 	'#gallery_top_rightbrochures', // id of element to use as pager container 
		pagerAnchorBuilder: function(idx, slide) { 
       		// return selector string for existing anchor 
        	return '#gallery_top_rightbrochures li:eq(' + idx + ') a'; 
    	} 
	});	
	
	
	$('#gallery_bottom094n').cycle({
	    fx:     'fade',
	    speed:   200, // speed of the transition (any valid fx speed value)
	    timeout: 0, // milliseconds between slide transitions (0 to disable auto advance) 
		speedIn:  100, 
   		speedOut: 100, 
	    pause:   1, // true to enable "pause on hover" 
	    cleartype:true,
	    cleartypeNoBg:true, 
		pager: 	'#gallery_top_right094', // id of element to use as pager container 
		pagerAnchorBuilder: function(idx, slide) { 
       		// return selector string for existing anchor 
        	return '#gallery_top_right094 li:eq(' + idx + ') a'; 
    	} 
	});	
	
	$('#gallery_bottom095n').cycle({
	    fx:     'fade',
	    speed:   200, // speed of the transition (any valid fx speed value)
	    timeout: 0, // milliseconds between slide transitions (0 to disable auto advance) 
		speedIn:  100, 
   		speedOut: 100, 
	    pause:   1, // true to enable "pause on hover" 
	    cleartype:true,
	    cleartypeNoBg:true, 
		pager: 	'#gallery_top_right095', // id of element to use as pager container 
		pagerAnchorBuilder: function(idx, slide) { 
       		// return selector string for existing anchor 
        	return '#gallery_top_right095 li:eq(' + idx + ') a'; 
    	} 
	});	
	
	$('#gallery_bottom245n').cycle({
	    fx:     'fade',
	    speed:   200, // speed of the transition (any valid fx speed value)
	    timeout: 0, // milliseconds between slide transitions (0 to disable auto advance) 
		speedIn:  100, 
   		speedOut: 100, 
	    pause:   1, // true to enable "pause on hover" 
	    cleartype:true,
	    cleartypeNoBg:true, 
		pager: 	'#gallery_top_right245', // id of element to use as pager container 
		pagerAnchorBuilder: function(idx, slide) { 
       		// return selector string for existing anchor 
        	return '#gallery_top_right245 li:eq(' + idx + ') a'; 
    	} 
	});	
	
	$('#gallery_bottom295n').cycle({
	    fx:     'fade',
	    speed:   200, // speed of the transition (any valid fx speed value)
	    timeout: 0, // milliseconds between slide transitions (0 to disable auto advance) 
		speedIn:  100, 
   		speedOut: 100, 
	    pause:   1, // true to enable "pause on hover" 
	    cleartype:true,
	    cleartypeNoBg:true, 
		pager: 	'#gallery_top_right295', // id of element to use as pager container 
		pagerAnchorBuilder: function(idx, slide) { 
       		// return selector string for existing anchor 
        	return '#gallery_top_right295 li:eq(' + idx + ') a'; 
    	} 
	});	
	
	$('#gallery_bottom376n').cycle({
	    fx:     'fade',
	    speed:   200, // speed of the transition (any valid fx speed value)
	    timeout: 0, // milliseconds between slide transitions (0 to disable auto advance) 
		speedIn:  100, 
   		speedOut: 100, 
	    pause:   1, // true to enable "pause on hover" 
	    cleartype:true,
	    cleartypeNoBg:true, 
		pager: 	'#gallery_top_right376', // id of element to use as pager container 
		pagerAnchorBuilder: function(idx, slide) { 
       		// return selector string for existing anchor 
        	return '#gallery_top_right376 li:eq(' + idx + ') a'; 
    	} 
	});	
	
	$('#gallery_bottom506n').cycle({
	    fx:     'fade',
	    speed:   200, // speed of the transition (any valid fx speed value)
	    timeout: 0, // milliseconds between slide transitions (0 to disable auto advance) 
		speedIn:  100, 
   		speedOut: 100, 
	    pause:   1, // true to enable "pause on hover" 
	    cleartype:true,
	    cleartypeNoBg:true, 
		pager: 	'#gallery_top_right506', // id of element to use as pager container 
		pagerAnchorBuilder: function(idx, slide) { 
       		// return selector string for existing anchor 
        	return '#gallery_top_right506 li:eq(' + idx + ') a'; 
    	} 
	});	
	
	$('#gallery_bottom547n').cycle({
	    fx:     'fade',
	    speed:   200, // speed of the transition (any valid fx speed value)
	    timeout: 0, // milliseconds between slide transitions (0 to disable auto advance) 
		speedIn:  100, 
   		speedOut: 100, 
	    pause:   1, // true to enable "pause on hover" 
	    cleartype:true,
	    cleartypeNoBg:true, 
		pager: 	'#gallery_top_right547', // id of element to use as pager container 
		pagerAnchorBuilder: function(idx, slide) { 
       		// return selector string for existing anchor 
        	return '#gallery_top_right547 li:eq(' + idx + ') a'; 
    	} 
	});	
	
	$('#gallery_bottom706n').cycle({
	    fx:     'fade',
	    speed:   200, // speed of the transition (any valid fx speed value)
	    timeout: 0, // milliseconds between slide transitions (0 to disable auto advance) 
		speedIn:  100, 
   		speedOut: 100, 
	    pause:   1, // true to enable "pause on hover" 
	    cleartype:true,
	    cleartypeNoBg:true, 
		pager: 	'#gallery_top_right706', // id of element to use as pager container 
		pagerAnchorBuilder: function(idx, slide) { 
       		// return selector string for existing anchor 
        	return '#gallery_top_right706 li:eq(' + idx + ') a'; 
    	} 
	});	
	
	$('#gallery_bottomadvertisingn').cycle({
	    fx:     'fade',
	    speed:   200, // speed of the transition (any valid fx speed value)
	    timeout: 0, // milliseconds between slide transitions (0 to disable auto advance) 
		speedIn:  100, 
   		speedOut: 100, 
	    pause:   1, // true to enable "pause on hover" 
	    cleartype:true,
	    cleartypeNoBg:true, 
		pager: 	'#gallery_top_rightadvertising', // id of element to use as pager container 
		pagerAnchorBuilder: function(idx, slide) { 
       		// return selector string for existing anchor 
        	return '#gallery_top_rightadvertising li:eq(' + idx + ') a'; 
    	} 
	});
		
	$('#gallery_bottombrochuresn').cycle({
	    fx:     'fade',
	    speed:   200, // speed of the transition (any valid fx speed value)
	    timeout: 0, // milliseconds between slide transitions (0 to disable auto advance) 
		speedIn:  100, 
   		speedOut: 100, 
	    pause:   1, // true to enable "pause on hover" 
	    cleartype:true,
	    cleartypeNoBg:true, 
		pager: 	'#gallery_top_rightbrochures', // id of element to use as pager container 
		pagerAnchorBuilder: function(idx, slide) { 
       		// return selector string for existing anchor 
        	return '#gallery_top_rightbrochures li:eq(' + idx + ') a'; 
    	} 
	});	
}); // end ready function


