
// 'stacks' is the Stacks global object.
// All of the other Stacks related Javascript will 
// be attatched to it.
var stacks = {};


// this call to jQuery gives us access to the globaal
// jQuery object. 
// 'noConflict' removes the '$' variable.
// 'true' removes the 'jQuery' variable.
// removing these globals reduces conflicts with other 
// jQuery versions that might be running on this page.
stacks.jQuery = jQuery.noConflict(true);

// Javascript for stacks_in_12_page22
// ---------------------------------------------------------------------

// Each stack has its own object with its own namespace.  The name of
// that object is the same as the stack's id.
stacks.stacks_in_12_page22 = {};

// A closure is defined and assigned to the stack's object.  The object
// is also passed in as 'stack' which gives you a shorthand for referring
// to this object from elsewhere.
stacks.stacks_in_12_page22 = (function(stack) {

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
//
// Copyright (c) 2011; Inc.
// TabSnap Javascript 
// Modified 11-28-2011 09:33:58 AM
//


function tabsnap($) {

	function loadStylesheet() {
	       // add jqueryui stylesheet
	       var head = document.getElementsByTagName('head')[0];
	       var de = document.documentElement, db = document.body;
	       if (!head) {
	           head = document.createElement('head');
	           var docEl = document.getElementsByTagName('html')[0] || de;
	           docEl.insertBefore(head, docEl.firstChild);
	       }
	       var $link = $(document.createElement('link'))
	           .attr({type: 'text/css', href: 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/black-tie/jquery-ui.css', rel: 'stylesheet'});
	       var link = $link[0];
	       head.appendChild(link);
	   }
	   
	   
	 $(document).ready(function() {
	 
//	 		$('head').append('<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/black-tie/jquery-ui.css" type="text/css" />');

			loadStylesheet();
	
	        // Tabs
	        
	        $('#stacks_in_12_page22 > div.ydts-tabs').tabs({ fx: { opacity: 'toggle', duration: 'fast' }, event: 'click',
	                            collapsible: false });
	                            
	        // add tabs
	        $('#stacks_in_12_page22 > div.ydts-tabs > div.tab').each(function(n) {
	        
	        	$('#stacks_in_12_page22 .ydts-tabs').tabs('add', '#'+$(this).attr('id'), $(this).attr('title'), n)
	        	
	        });
	    
	        
	    
	});

}; // tabsnap fn

tabsnap($);
	return stack;
})(stacks.stacks_in_12_page22);



