/* 
* Skeleton V1.0.2
* Copyright 2011, Dave Gamache
* www.getskeleton.com
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
* 5/20/2011
*/	
	
var name = "nav";  
var menuYloc = null; 

$(document).ready(function() {

	/* Tabs Activiation
	================================================== */
	var tabs = $('ul.tabs'),
	    tabsContent = $('ul.tabs-content');
	
	tabs.each(function(i) {
		//Get all tabs
		var tab = $(this).find('> li > a');
		tab.click(function(e) {
			
			//Get Location of tab's content
			var contentLocation = $(this).attr('href') + "Tab";
			
			//Let go if not a hashed one
			if(contentLocation.charAt(0)=="#") {
			
				e.preventDefault();
			
				//Make Tab Active
				tab.removeClass('active');
				$(this).addClass('active');
				
				//Show Tab Content
				$(contentLocation).show().siblings().hide();
				
			} 
		});
	}); 
		
		
	
	/* Fade in
	================================================== 
	$('body').hide().delay(500).fadeIn(2000);
	*/
	
	/* Scrolling
	================================================== */
	jQuery(function( $ ){
		$.localScroll();
	});
	
	/* Moving Menu
	================================================== */
	/*
	$("body").scroll(function(){
		$("nav").css({"position":"fixed","top":"0","background":"#292929 url(../images/bg_body.jpg)"."z-index":"20"});
	});
	
	menuYloc = parseInt($(name).css("top").substring(0,$(name).css("top").indexOf("px")))  
	$(window).scroll(function () {  
		var offset = menuYloc+$(document).scrollTop()+"px";  
		$(name).animate({top:offset},{duration:800,queue:false});  
	});  */
	
});

addLoadEvent(function() {
         if (document.getElementById && document.getElementsByTagName) {
              var aImgs = document.getElementById("content").getElementsByTagName("img");
              imgSizer.collate(aImgs);
         }
    });
