
// '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_13_page0
// ---------------------------------------------------------------------

// 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_13_page0 = {};

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	

/*
 * QR Code Generator By WeaverAddons.com
 * Version 1.0.0
 *
 * Visit http://www.weaveraddons.com for more information on how to use this stack in RapidWeaver.
 *
 */

/**
 * @author Paul Chan / KF Software House 
 * http://www.kfsoft.info
 *
 * Version 0.5
 * Copyright (c) 2010 KF Software House
 *
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
	
(function(a){var b=null;jQuery.fn.MyQRCode=function(c){b=a.extend({},a.fn.MyQRCode.defaults,c);return this.each(function(){var c="https://chart.googleapis.com/chart?chs={size}&cht=qr&chl={content}&choe={encoding}",d=c.replace(/{size}/g,b.size);d=d.replace(/{content}/g,escape(b.content)),d=d.replace(/{encoding}/g,b.encoding),a(this).append("<img src='"+d+"'>")})},jQuery.fn.MyQRCode.defaults={encoding:"UTF-8",content:window.location,size:"150x150"}})(jQuery)

$(function() {
	var text = $('#stacks_in_13_page0text').text();
	if (text == "" || text == "Type Data String Here") {
		text = window.location.href;
	}
	
	$('#stacks_in_13_page0container').MyQRCode({content: text, size:'128x128'});
});

	return stack;
})(stacks.stacks_in_13_page0);



