
 


$(function () {
    $('#header a, #wrapper a').add('a.scroll').click(function () {
        var target = $(this.hash);
        var hash = this.hash;

        if (target.length) {
            var targetOffset = target.offset().top;
            $('html,body').animate({scrollTop: targetOffset}, 600);
            return false;
		}
	});
	
	
});



$(function() {
        $('.wrapper a').lightBox();

});


$(document).ready(function(){

  //Calling Local Scroll Function
	/**
	 * Most jQuery.localScroll's settings, actually belong to jQuery.ScrollTo, check it's demo for an example of each option.
	 * @see http://flesler.demos.com/jquery/scrollTo/
	 * You can use EVERY single setting of jQuery.ScrollTo, in the settings hash you send to jQuery.LocalScroll.
	 */
		
	
	// Scroll initially if there's a hash (#something) in the url 
	$.localScroll.hash({
		queue:true,
		duration:1500,
		offset: {left:0, top:-90},
		onAfter: trigger
	});
	
	
	

	// bind the navigation clicks to update the selected nav:
	$('#nav').find('a').click(selectNav);

	// handle nav selection - lots of nice chaining :-)
	function selectNav() {
		$(this)
    			.parents('ul:first') // find the first UL parent
      			.find('a') // find all the A elements
        				.removeClass('selected') // remove from all
      				.end() // go back to all A elements
    				.end() // go back to 'this' element
    			.addClass('selected');
	}

	function trigger(data) {
  	// within the #navigation element, find the = element
  	// whose href ends with ID ($= is ends with)
		var el = $('#nav').find('a[href$="' + data.id + '"]').get(0);
  
  	// we're passing the actual element, and not the jQuery instance.
		selectNav.call(el);
	}

	if (!window.location.hash) {
      	$('#nav a:first').click();
	}

  });
  
  
  
  $(function() {
        $('.wrapper a').lightBox();

});
  
  
  
  function formatText(index, panel) {
		  return index + "";
	    }
    
        $(function () {
        
            $('.anythingSlider').anythingSlider({
                easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
                autoPlay: false,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
                delay: 3000,                    // How long between slide transitions in AutoPlay mode
                startStopped: false,            // If autoPlay is on, this can force it to start stopped
                animationTime: 600,             // How long the slide transition takes
                hashTags: true,                 // Should links change the hashtag in the URL?
                buildNavigation: false,          // If true, builds and list of anchor links to link to each slide
        		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
		        navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)
            });
            
            $("#slide-jump").click(function(){
                $('.anythingSlider').anythingSlider(6);
            });
            
        });
