
// '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_315_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_315_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_315_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;
	

/*
 * Copy Paste Attribution Stack By WeaverAddons.com
 * Version 1.0.0
 *
 * Visit http://weaveraddons.com for more information on how to use this stack in RapidWeaver.
 *
 */

/**
 * 
 * Copy & Paste
 * v1.9.6 [2011-11-11]
 *
 * Copyright (C) 1998-2011 DYNAMIC+. All rights reserved.
 * 
 * http://e.xplo.it/jquery/jquery.copypaste.js
 * e@xplo.it
 * 
 * 
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *  
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 */

$.fn.copypaste=function(c){var b={clipboard:'<b>%title%</b><br />\n&bdquo;%copy%&ldquo;<br />\n<br />\n<address><a href="%url%">%url%</a></address>',skip_tags:["INPUT","TEXTAREA"],base_node:"<span></span>",word_separator:/[^A-Za-z0-9]+/i,trim:!0,min_chars:0,max_chars:0,min_words:0,max_words:0,safe_js_write:!0,track_events:!0};c&&("function"==typeof c?c={clipboard:c}:"object"!=typeof c&&(c={clipboard:""+c}),$.extend(b,c));this.bind("copy",function(c){if(b.clipboard){var a=b.clipboard,j=!1;if(b.skip_tags&&
(c=c.target&&c.target.nodeName?c.target.nodeName.toUpperCase():null))for(var n in b.skip_tags)if(b.skip_tags[n].toUpperCase()==c){j=!0;break}if(!j){j=function(a){if(0<b.min_chars&&a.length<b.min_chars||0<b.max_chars&&a.length>b.max_chars)return!0;if(0<b.min_words||0<b.max_words)if(a=a.split(b.word_separator),0<b.min_words&&a.length<b.min_words||0<b.max_words&&a.length>b.max_words)return!0;return!1};n=function(a){if(b.track_events){if(window._gaq&&_gaq.push)return _gaq.push(["_trackEvent","Copy & Paste",
"Copy",a]),!0;return window._gat&&_gat._getTracker&&window.pageTracker&&pageTracker._trackEvent?(pageTracker._trackEvent("Copy & Paste","Copy",a),!0):!1}return null};if("function"!=typeof a)var c=new Date,f=function(a){return(""+a).split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;").split('"').join("&quot;").split("'").join("&#39;")},a=(""+a).replace(/%title%/gi,f(document.title)),a=a.replace(/%url%/gi,f(location.href)),a=a.replace(/%domain%/gi,f(location.hostname)),a=a.replace(/%path%/gi,
f(location.pathname)),a=a.replace(/%referrer%/gi,f(document.referrer)),a=a.replace(/%date%/gi,f(c.toLocaleDateString())),a=a.replace(/%time%/gi,f(c.getHours()+":"+("00"+c.getMinutes()).slice(-2))),a=a.replace(/%timestamp%/gi,f(c.getTime())),a=a.replace(/%random%/gi,f(Math.round(2147483647*Math.random()))),a=a.replace(/%hide-start%/gi,'<span style="position:absolute; left:-999999px; top:auto; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); clip:rect(0,0,0,0);">'),a=a.replace(/%hide-end%/gi,
"</span>"),a=a.replace(/%browser%/gi,f(navigator.userAgent)),a=a.replace(/%percent%/gi,"%");try{if(document.selection&&document.selection.createRange&&document.body&&document.body.createTextRange&&!window.opera){var d=document.selection.createRange(),h=b.trim?$.trim(d.text):d.text;if(h&&!j(h)){var k=d.htmlText,l="function"==typeof a?a(k):a.replace(/%(copy|paste|clipboard)%/gi,k);if(null!=l){n(h);if(b.safe_js_write){var m=[document.write,document.writeln];document.write=function(){};document.writeln=
function(){}}var i=$(b.base_node?b.base_node:"<span></span>").append(""+l),g=$("<div></div>").css({position:"absolute",left:$("body").scrollLeft()+"px",top:$("body").scrollTop()+"px",width:"1px",height:"1px",overflow:"hidden",clip:"rect(0 0 0 0)",color:"black",backgroundColor:"white",textAlign:"left",textDecoration:"none",border:"none"}).append("<br />");g.append(i);$("body").append(g);var e=document.body.createTextRange();e.moveToElementText(i.get(0));e.select();window.setTimeout(function(){g.remove();
if(b.safe_js_write)document.write=m[0],document.writeln=m[1];try{d.select()}catch(a){}},1)}}}else if(window.getSelection&&document.createRange&&(d=getSelection(),(h=b.trim?$.trim(d.toString()):d.toString())&&!j(h)))if(d.getRangeAt?e=d.getRangeAt(0):(e=document.createRange(),e.setStart(d.anchorNode,d.anchorOffset),e.setEnd(d.focusNode,d.focusOffset)),k=$("<span></span>").append(e.cloneContents()).html(),l="function"==typeof a?a(k):a.replace(/%(copy|paste|clipboard)%/gi,k),null!=l){n(h);if(b.safe_js_write)m=
[document.write,document.writeln],document.write=function(){},document.writeln=function(){};i=$(b.base_node?b.base_node:"<span></span>").append(""+l);g=$("<div></div>").css({position:"absolute",left:"-999999px",top:"-999999px",maxWidth:"999998px",maxHeight:"999998px",overflow:"hidden",clip:"rect(0,0,0,0)",color:"black",backgroundColor:"white",textAlign:"left",textDecoration:"none",border:"none"}).append("<br />");g.append(i);$("body").append(g);if(d.selectAllChildren)d.selectAllChildren(i.get(0));
else{var o=document.createRange();o.selectNodeContents(i.get(0));d.removeAllRanges();d.addRange(o)}window.setTimeout(function(){g.remove();if(b.safe_js_write)document.write=m[0],document.writeln=m[1];try{d.setBaseAndExtent?d.setBaseAndExtent(e.startContainer,e.startOffset,e.endContainer,e.endOffset):(d.removeAllRanges(),d.addRange(e))}catch(a){}},1)}}catch(p){}}}});return this};$.copypaste=function(c){return $(function(){$("body").copypaste(c)})};

$(function() {
	$.copypaste({clipboard     : ('below' == 'below' ? '%copy%<br />\nPlease visit: <a href="%url%">%url%</a>' + ('© 2012 | 便利将棋 Benri Shogi' ? '<br />\n© 2012 | 便利将棋 Benri Shogi' : '') : 'Please visit: <a href="%url%">%url%</a><br />\n' + ('© 2012 | 便利将棋 Benri Shogi' ? '© 2012 | 便利将棋 Benri Shogi<br />\n' : '') + '<br />\n%copy%'),
  			 	 min_words     : 10,
  			 	 track_events  : false
		});
});

	return stack;
})(stacks.stacks_in_315_page0);


// Javascript for stacks_in_1_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_1_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_1_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;
	

//-- InfoBar Stack v1.0.6 by Joe Workman --//
/* Activebar2 is free software http://www.westhoffswelt.de */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(d($){$.7.4=d(a){p a=$.7.1b({},$.7.4.G,a);i($.7.4.8==q){$.7.4.8=H(a)}I($.7.4.8,a);$.7.4.y();$(\'.r\',$.7.4.8).1c();$(m).1d(d(){$(\'.r\',$.7.4.8).s(m)});$.7.4.8.J(\'z\');i(a.n!=q){$.7.4.8.z(d(){j.1e.1f=a.n})}$.7.4.8.9(\'e\',\'-\'+$.7.4.8.k()+\'o\');$.7.4.K()};$.7.4.G={\'l\':\'1g\',\'L\':\'#1h\',\'M\':\'1i\',\'N\':\'1j 1k 1l,1m,1n-1o\',\'O\':\'1p\',\'A\':\'1q\',\'t\':\'P/4-1r.Q\',\'R\':\'P/4-1s.Q\',\'n\':q};$.7.4.g=0;$.7.4.8=q;$.7.4.K=d(){i($.7.4.g>1){B}$.7.4.g=2;$.7.4.8.9(\'C\',\'1t\');p a=$.7.4.8.k();$.7.4.8.S({\'e\':\'+=\'+a+\'o\'},a*T,\'U\',d(){$.7.4.g=3})};$.7.4.y=d(){i($.7.4.g<2){B}$.7.4.g=1;p a=$.7.4.8.k();$.7.4.8.S({\'e\':\'-=\'+a+\'o\'},a*T,\'U\',d(){$.7.4.8.9(\'C\',\'V\');$.7.4.1u=1v})};d H(b){p c=$(\'<f></f>\').u(\'1w\',\'4-8\');c.9({\'C\':\'V\',\'W\':\'1x\',\'1y\':\'1z\',\'e\':\'X\',\'v\':\'X\',\'1A\':\'1B\'});$(j).1C(\'Y\',d(){c.w($(m).w())});$(j).1D(\'Y\');i($.D.1E&&($.D.Z.10(0,1)==\'5\'||$.D.Z.10(0,1)==\'6\')){c.9(\'W\',\'1F\');$(j).1G(d(){c.1H(11,11);i($.7.4.g==3){c.9(\'e\',$(j).12()+\'o\')}1I{c.9(\'e\',($(j).12()-c.k())+\'o\')}})}c.s($(\'<f></f>\').u(\'E\',\'t\').9({\'13\':\'v\',\'w\':\'x\',\'k\':\'x\',\'F\':\'14 h h h\'}));c.s($(\'<f></f>\').u(\'E\',\'15\').9({\'13\':\'1J\',\'F\':\'14 h h h\',\'w\':\'x\',\'k\':\'x\'}).z(d(a){$.7.4.y();a.1K()}));c.s($(\'<f></f>\').u(\'E\',\'r\').9({\'F\':\'1L 16 h 16\'}));$(\'1M\').1N(c);B c};d I(a,b){a.9({\'l\':b.l,\'1O\':\'1P 1Q \'+b.L});a.J(\'1R 1S\');a.1T(d(){$(m).9(\'17\',b.M)},d(){$(m).9(\'17\',b.l)});$(\'.t\',a).9(\'l\',\'18 n( \\\'\'+b.t+\'\\\' ) e v 19-1a\');$(\'.15\',a).9(\'l\',\'18 n( \\\'\'+b.R+\'\\\' ) e v 19-1a\');$(\'.r\',a).9({\'1U\':b.O,\'1V\':b.N,\'A\':b.A})}})(1W);',62,121,'||||activebar|||fn|container|css||||function|top|div|state|4px|if|window|height|background|this|url|px|var|null|content|append|icon|attr|left|width|16px|hide|click|fontSize|return|display|browser|class|margin|defaults|initializeActivebar|setOptionsOnContainer|unbind|show|border|highlight|font|fontColor|images|png|button|animate|20|linear|none|position|0px|resize|version|substring|true|scrollTop|float|6px|close|28px|backgroundColor|transparent|no|repeat|extend|empty|each|location|href|InfoBackground|c8c8c8|Highlight|Bitstream|Vera|Sans|verdana|sans|serif|InfoText|12px|information|closebtn|block|visible|false|id|fixed|zIndex|9999|cursor|pointer|bind|trigger|msie|absolute|scroll|stop|else|right|stopPropagation|8px|body|prepend|borderBottom|1px|solid|mouseenter|mouseleave|hover|color|fontFamily|jQuery'.split('|'),0,{}))

$(document).ready(function() {
    $('#infobar_stacks_in_1_page0').activebar({  button:'files/infobar-close.png',
                                    icon:'files/infobar-close.png',
                                    url:null,
                                    background:'#FFFFFF',
                                    highlight:'#E6E6E6',
                                    font:'Lucida Grande, sans-serif',
                                    fontColor:'#008000',
                                    fontSize:'12pt'
    });
});
//-- End InfoBar Stack --//

	return stack;
})(stacks.stacks_in_1_page0);



