<!-- Hook up the FlexSlider -->
  $(window).load(function() {
	  if (document.documentElement.clientWidth > 700) {

	  
    $('.flexslider').flexslider({
		  animation: "slide",             //Select your animation type (fade/slide)
		  slideshow: false,                //Should the slider animate automatically by default? (true/false)
		  slideshowSpeed: 7000,           //Set the speed of the slideshow cycling, in milliseconds
		  animationDuration: 600,         //Set the speed of animations, in milliseconds
		  directionNav: true,             //Create navigation for previous/next navigation? (true/false)
		  controlNav: true,              //Create navigation for paging control of each clide? (true/false)
		  keyboardNav: true,              //Allow for keyboard navigation using left/right keys (true/false)
		  touchSwipe: true,               //Touch swipe gestures for left/right slide navigation (true/false)
		  prevText: "Previous",           //Set the text for the "previous" directionNav item
		  nextText: "Next",               //Set the text for the "next" directionNav item
		  pausePlay: true,                //Create pause/play dynamic element (true/false)
		  randomize: false,               //Randomize slide order on page load? (true/false)
		  slideToStart: 0,                //The slide that the slider should start on. Array notation (0 = first slide)
		  animationLoop: true,            //Should the animation loop? If false, directionNav will received disabled classes when at either end (true/false)
		  pauseOnAction: true,            //Pause the slideshow when interacting with control elements, highly recommended. (true/false)
		  pauseOnHover: true,             //Pause the slideshow when hovering over slider, then resume when no longer hovering (true/false)
    });
	
	  }
	 
  });
  
<!--Accordion settings-->
	$(document).ready(function() {

    //custom animation for open/close
    $.fn.slideFadeToggle = function(speed, easing, callback) {
        return this.animate({opacity: 'toggle', height: 'toggle'}, speed, easing, callback);
    };

    $('.accordion').accordion({
    cssClose: 'accordion-close', //class you want to assign to a closed accordion header
    cssOpen: 'accordion-open', //class you want to assign an opened accordion header
    defaultOpen: '', //id that you want opened by default
    speed: 'fast', //speed of the slide effect
    bind: 'click', //event to bind to, supports click, dblclick, mouseover and mouseenter
    animateOpen: function (elem, opts) { //replace the standard slideDown with custom function
        elem.next().slideDown(opts.speed);
    },
    animateClose: function (elem, opts) { //replace the standard slideUp with custom function
        elem.next().slideUp(opts.speed);
    }
});
});


<!--Fancybox settings-->
$(document).ready(function() {
			/* This is basic - uses default settings */
			
			$("a#single_image").fancybox();
			
			/* Using custom settings */
			
			$("a.inline").fancybox({
				'hideOnContentClick': true			
			});
		
			/* Apply fancybox to multiple items */
			
			$("a.group").fancybox({
				'transitionIn'	:	'elastic',
				'transitionOut'	:	'elastic',
				'speedIn'		:	600, 
				'speedOut'		:	200, 
				'overlayShow'	:	false
			});
		});
		
<!--Imagefading-->
	$(document).ready(function(){
	$(".fade img").fadeTo("slow", 0.99); // This sets the opacity of the thumbs to fade down to 99% when the page loads

	$(".fade img").hover(function(){
		$(this).fadeTo("slow", 0.6); // This should set the opacity to 100% on hover
	},function(){
   		$(this).fadeTo("slow", 1.0); // This should set the opacity back to 60% on mouseout
	});
});

<!--http://www.randomsnippets.com/2008/02/12/how-to-hide-and-show-your-div/-->
function showonlyone(thechosenone) {
     $('div[name|="newboxes"]').each(function(index) {
          if ($(this).attr("id") == thechosenone) {
               $(this).show();
          }
          else {
               $(this).hide();
          }
     });
}


<!--jqueryfordesigners.com tabs-->
$(function () {
    var tabContainers = $('div.tabs > div');
    
    $('div.tabs nav.tabNavigation a').click(function () {
        tabContainers.hide().filter(this.hash).show();
        
        $('div.tabs nav.tabNavigation a').removeClass('selected');
        $(this).addClass('selected');
        
        return false;
    }).filter(':first').click();
});
