$(function() {
	var $test1 = $('#test1'),
		$test2 = $('#test2'),
		$test3 = $('#test3'),
		$caption = $('div.caption'),
		$pause = $('#pause'),
		$resume = $('#resume'),
		$freeze = $('#freeze'),
		$stop = $('#stop'),
		$restart = $('#restart'),
		captions = ['Sand Castle', 'Sunflower', 'Flip Flops', 'Rubber Ring'],
		STOP = 1, RUN = 2, PAUSE = 3;

	
	
//	$('#rotateimage').crossSlide({
//  speed: 20,
//  fade: 2
//}, [
//  { src: '/images/site-images/sample1.jpg', dir: 'up'   },
//  { src: '/images/site-images/sample2.jpg',   dir: 'down' },
//  { src: '/images/site-images/sample3.jpg',  dir: 'up'   },
//  { src: '/images/site-images/sample4.jpg', dir: 'down' },
//  { src: '/images/site-images/sample5.jpg', dir: 'up' }
//]);


});

  
  $(document).ready(function() {


 // hides the quickquote as soon as the DOM is ready
 // (a little sooner than page load)
 // $('#quickquote').hide();
 // shows the quickquote on clicking the noted link
  $('a#slick-show').click(function() {
 $('#quickquote').fadeIn('slow');
 
 return false;
  });
 // hides the quickquote on clicking the noted link
  $('a#slick-hide').click(function() {
 $('#quickquote').fadeIn('fast');
 return false;
  });
 // toggles the quickquote on clicking the noted link
  $('a#slick-toggle').click(function() {
 $('#quickquote').toggle(1000);
 return false;
  });


      $.validator.addMethod("NumbersOnly", function(value, element) {
        return this.optional(element) || /^[0-9\.]+$/i.test(value);
    }, "May only contain numbers");



	$("#contactorm").validate();


  

});


$(function() {
	$('#gallery a').lightBox({fixedNavigation:true});
});





var $container;
		
		$(document).ready(	
			function() {
				$container = $("#container");
				$container.wtRotator({
					width:960,
					height:200,
					background_color:"#fff",
					border:"0px solid #333",
					button_width:24,
					button_height:24,
					button_margin:4,
					auto_start:true,
					delay:3000,
					transition:"fade.left",
					transition_speed:1000,
					block_size:100,
					vert_size:50,
					horz_size:100,
					cpanel_align:"BR",
					display_thumbs:false,
					display_dbuttons:false,
					display_playbutton:false,
					display_tooltip:false,
					display_numbers:false,
					cpanel_mouseover:false,
					text_mouseover:false
				});
		
				$("#transitions").val("random").change(
					function() {
						changeTransition($(this).val());
					}
				);
				
				$("#cpalignments").val("BR").change(
					function() {
						changeCPAlign($(this).val());
					}
				);
				
				$("#thumbs-cb").attr("checked", "checked").change(
					function() {
						displayThumbs($(this).attr("checked"));	
					}
				);
				
				$("#dbuttons-cb").attr("checked", "checked").change(
					function() {
						displayDButtons($(this).attr("checked"));	
					}				
				);
 
				$("#playbutton-cb").attr("checked", "checked").change(
					function() {
						displayPlayButton($(this).attr("checked"));	
					}				
				);
				
				$("#tooltip-cb").attr("checked", "checked").change(
					function() {
						displayTooltip($(this).attr("checked"));	
					}				
				);								
				
				$("#text-cb").attr("checked", "").change(
					function() {
						changeDescMouseover($(this).attr("checked"));	
					}				
				);
				
				$("#cpanel-cb").attr("checked", "").change(
					function() {
						changeCPMouseover($(this).attr("checked"));	
					}				
				);				
			}
		);
		
		function changeTransition(transition) {
			$container.updateTransition(transition);
		}
 
		function changeCPAlign(align) {
			$container.updateCpAlign(align);
		}
		
		function displayThumbs(display) {
			$container.displayThumbs(display);	
		}
	
		function displayDButtons(display) {
			$container.displayDButtons(display);	
		}
		
		function displayPlayButton(display) {
			$container.displayPlayButton(display);	
		}
			
		function displayTooltip(display) {
			$container.displayTooltip(display);	
		}
					
		function changeDescMouseover(mouseover) {
			$container.updateMouseoverDesc(mouseover);			
		}
		
		function changeCPMouseover(mouseover) {
			$container.updateMouseoverCP(mouseover);
		}
