jQuery.noConflict();




jQuery(document).ready(function($) {

	$("ul#nav li#one").hover (
		function () {
    		$(this).append($('<span class="hoverimage"><img src="_images/showreel.jpg" alt="image" /></span>'));
  		},
  		
  		function () {
    		$(this).find("span:last").remove();
  		}
	);
	
	$("ul#nav li#two").hover (
		function () {
    		$(this).append($('<span class="hoverimage"><img src="_images/showreel/image2.jpg" alt="image" /></span>'));
  		},
  		
  		function () {
    		$(this).find("span:last").remove();
  		}
	);
	
	$("ul#nav li#three").hover (
		function () {
    		$(this).append($('<span class="hoverimage"><img src="_images/showreel/image3.jpg" alt="image" /></span>'));
  		},
  		
  		function () {
    		$(this).find("span:last").remove();
  		}
	);
	
	$("ul#nav li#four").hover (
		function () {
    		$(this).append($('<span class="hoverimage"><img src="_images/showreel/image4.jpg" alt="image" /></span>'));
  		},
  		
  		function () {
    		$(this).find("span:last").remove();
  		}
	);
	
	$("ul#nav li#five").hover (
		function () {
    		$(this).append($('<span class="hoverimage"><img src="_images/showreel/image5.jpg" alt="image" /></span>'));
  		},
  		
  		function () {
    		$(this).find("span:last").remove();
  		}
	);
	
	$("ul#nav li#six").hover (
		function () {
    		$(this).append($('<span class="hoverimage"><img src="_images/showreel/image6.jpg" alt="image" /></span>'));
  		},
  		
  		function () {
    		$(this).find("span:last").remove();
  		}
	);
	
	$("ul#nav li#seven").hover (
		function () {
    		$(this).append($('<span class="hoverimage"><img src="_images/showreel/image7.jpg" alt="image" /></span>'));
  		},
  		
  		function () {
    		$(this).find("span:last").remove();
  		}
	);
	
	$("ul#nav li#eight").hover (
		function () {
    		$(this).append($('<span class="hoverimage"><img src="_images/showreel/image8.jpg" alt="image" /></span>'));
  		},
  		
  		function () {
    		$(this).find("span:last").remove();
  		}
	);
	
	
	
	
	
	
	
	
	

	
	

	//Rayner Solar Process Tabs on the Home Page
	$( "#tabs" ).tabs({
		event: "mouseover"
	});
	
	//Jcarousel plugin used for the partners in the foot
	$('#mycarousel').jcarousel({
		wrap: 'circular',
		scroll: 1,
		auto: 4
	});
	
	$("#scroller").simplyScroll({
		autoMode: 'loop'
	});
	
	// hides the slickbox as soon as the DOM is ready (a little sooner that page load)
  $('.answer1, .answer2, .answer3, .answer4, .answer5, .answer6, .answer7, .answer8, .answer9, .answer10, .answer11, .answer12, .answer13, .answer14, .answer15, .answer16, .answer17, .answer18, .answer19, .answer20').hide();
  
  $('.question1').click(function() {
    $('.answer1').slideToggle(400);
    return false;
  });
  
  $('.question2').click(function() {
    $('.answer2').slideToggle(400);
    return false;
  });
  
  $('.question3').click(function() {
    $('.answer3').slideToggle(400);
    return false;
  });
  
  $('.question4').click(function() {
    $('.answer4').slideToggle(400);
    return false;
  });
  
  $('.question5').click(function() {
    $('.answer5').slideToggle(400);
    return false;
  });
  
  $('.question6').click(function() {
    $('.answer6').slideToggle(400);
    return false;
  });
  
  $('.question7').click(function() {
    $('.answer7').slideToggle(400);
    return false;
  });
  
  $('.question8').click(function() {
    $('.answer8').slideToggle(400);
    return false;
  });
  
  $('.question9').click(function() {
    $('.answer9').slideToggle(400);
    return false;
  });
  
  
  $('.question10').click(function() {
    $('.answer10').slideToggle(400);
    return false;
  });
  
  $('.question11').click(function() {
    $('.answer11').slideToggle(400);
    return false;
  });
  
  $('.question12').click(function() {
    $('.answer12').slideToggle(400);
    return false;
  });
  
  $('.question13').click(function() {
    $('.answer13').slideToggle(400);
    return false;
  });
  
  $('.question14').click(function() {
    $('.answer14').slideToggle(400);
    return false;
  });
  
  $('.question15').click(function() {
    $('.answer15').slideToggle(400);
    return false;
  });
  
  $('.question16').click(function() {
    $('.answer16').slideToggle(400);
    return false;
  });
  
  $('.question17').click(function() {
    $('.answer17').slideToggle(400);
    return false;
  });
  
  $('.question18').click(function() {
    $('.answer18').slideToggle(400);
    return false;
  });
  
  $('.question19').click(function() {
    $('.answer19').slideToggle(400);
    return false;
  });
  
  $('.question20').click(function() {
    $('.answer20').slideToggle(400);
    return false;
  });
  
  $('#showreel').cycle({
		fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		speed:  4000
	});
	
	 $('.fade-in-out').cycle({
		fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		timeout:  10000 
	});
	
	
	


	
	$(document).ready(function() {
			/*
			*   Examples - images
			*/

			$("a#example1").fancybox();

			$("a#example2").fancybox({
				'overlayShow'	: false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic'
			});

			$("a#example3").fancybox({
				'transitionIn'	: 'none',
				'transitionOut'	: 'none'	
			});

			$("a#example4").fancybox({
				'opacity'		: true,
				'overlayShow'	: false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'none'
			});

			$("a#example5").fancybox();

			$("a#example6").fancybox({
				'titlePosition'		: 'outside',
				'overlayColor'		: '#000',
				'overlayOpacity'	: 0.9
			});

			$("a#example7").fancybox({
				'titlePosition'	: 'inside'
			});

			$("a#example8").fancybox({
				'titlePosition'	: 'over'
			});

			$("a[rel=example_group]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});

			/*
			*   Examples - various
			*/

			$("#various1").fancybox({
				'titlePosition'		: 'inside',
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
			});

			$("#various2").fancybox();

			$("#various3").fancybox({
				'width'				: 550,
				'height'			: 740,
        		'autoScale'     	: true,
        		'transitionIn'		: 'elastic',
				'transitionOut'		: 'fade',
				'type'				: 'iframe'
			});
			
			$("#various5").fancybox({
				'width'				: 550,
				'height'			: 740,
        		'autoScale'     	: true,
        		'transitionIn'		: 'elastic',
				'transitionOut'		: 'fade',
				'type'				: 'iframe'
			});

			$("#various4").fancybox({
				'padding'			: 0,
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
			});
		});
		
		
  
  });
