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

$.localScroll.defaults.axis = 'x';
$.localScroll();	
								
$('.scroll-pane').jScrollPane();
	
//	$('#landing-gallery').before('<ul id="landingnav">').cycle({ 
var topOffset = -300;


	$('#nav ul li a').click(function(){	
			if ($(this).attr('href') == "#home") {
			$('html, body').animate({scrollTop:0}, 'slow');
			} else {
			$.scrollTo( $(this).attr('href'), 600,{offset: {top:topOffset, left:0} })
			}
	});


    $('#landing-quotes').cycle({
		    fx:  'fade',
			pager: '#quote-nav',
	 		pagerAnchorBuilder: function(idx, slide) { 
		
		return '<li><a class="quote-nav"></a></li>'; 
    	
			} 		
		});
		
	
$('#btn-rating[title], .social-nav ul li a[title]').qtip({
	
position: {
   target: 'mouse',
   adjust: { mouse: true },
   corner: {
      target: 'bottomLeft',
      tooltip: 'bottomLeft'
   }
},
show: { 
	effect: 'fade' 
	},
style: {  
	 background:'#09f',
	 padding:12,
	 color:'#FFF',
	 	border: {
		color:'#00abbf' 
		        },
      	tip: { // Now an object instead of a string
         corner: 'bottomLeft', // We declare our corner within the object using the corner sub-option
         color: '#00abbf',
		 	size: {
          	  x: 10, // Be careful that the x and y values refer to coordinates on screen, not height or width.
          	  y : 8 // Depending on which corner your tooltip is at, x and y could mean either height or width!
        		 }
			  } 		 
    }
   
});

	
		
    
$('#about-gallery').cycle({ 
    fx:     'scrollHorz', 
    speed:  'slow' , 
	pager: '#aboutnav',
   // callback fn that creates a thumbnail to use as pager anchor 
    pagerAnchorBuilder: function(idx, slide) { 
	if(idx % 2 == 0) {
       return '<li><a class="pizzanavDWN"></a></li>'; 
	}else{
		return '<li><a class="pizzanavUP"></a></li>'; 
		}
    } 	
});

$('#ev-cycle-gallery').cycle({ 
    fx:     'scrollHorz', 
    speed:  'slow' , 
	pager: '#ev-gallery-nav',
   // callback fn that creates a thumbnail to use as pager anchor 
    pagerAnchorBuilder: function(idx, slide) { 
	if(idx % 2 == 0) {
       return '<li><a class="pizzanavDWN"></a></li>'; 
	}else{
		return '<li><a class="pizzanavUP"></a></li>'; 
		}
    } 	
});


//When page loads...
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content
	
	$("#menu-ev ul.tabs li:first, #delivery-ev ul.tabs li:first").addClass("active").show(); //Activate first tab
	$("#menu-ev .tab_content:first, #delivery-ev .tab_content:first").show(); //Show first tab content


	//On Click Event
	    $("ul.tabs li").click(function() {
		
		/*$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content
		*/
		
		
		//Make sure we don't disrupt other tabbed content
		var section = $(this).parent().parent().attr('id');

		$("#"+section+" ul.tabs li").removeClass("active"); 
		$(this).addClass("active"); 
		$("#"+section+" .tab_content").hide(); 
		
		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active ID content
		return false;
	});



 $("div#twitter").tweet({
            username: "lassonyc",
            join_text: "auto",
            avatar_size: 0,
            count: 1,
            loading_text: "loading tweets...",
			auto_join_text_default: "",
			auto_join_text_ed: "", 
			auto_join_text_ing: "",
			auto_join_text_reply: "",
			auto_join_text_url: "",		
        });


/*
$('#flickrBox').jflickrfeed({
		limit: 20,
		feedapi: 'photos_public.gne',
		qstrings: {
			id: '27675831@N05'
		},
		
		itemTemplate: '<li>'+
						'<a rel="prettyPhoto[Flickr]" href="{{image}}" title="{{title}}">' +
							'<img src="{{image_s}}" alt="{{title}}" />' +
						'</a>' +
					  '</li>'
	}, function(data) {
		
		
		$("a[rel^='prettyPhoto']").prettyPhoto({
			animation_speed: 'fast',
			overlay_gallery: false
			});
	});
	*/
	
/*	
$('#favoritesBox').jflickrfeed({
		limit: 20,
		feedapi: 'photos_faves.gne',
		qstrings: {
			id: '27675831@N05'
		},
		itemTemplate: '<li>'+
						'<a rel="prettyPhoto[Favorites]" href="{{image}}" title="{{title}}">' +
							'<img src="{{image_s}}" alt="{{title}}" />' +
						'</a>' +
					  '</li>'
	}, function(data) {
		
		$("a[rel^='prettyPhoto']").prettyPhoto({
			animation_speed: 'fast',
			overlay_gallery: false
			});

	});
	
	*/
	
	
	$("a[rel^='prettyPhoto']").prettyPhoto({
			animation_speed: 'fast',
			overlay_gallery: false,
			theme: 'light_square'
			});
			

});



