
//jQuery(document).ready(function(){jQuery('#mycarousel').jcarousel({});});
jQuery("div.homeBook").mouseout(function(){jQuery("div#pointy").hide();jQuery("div#pointyArr").hide();});

var books=new Array();

/* NEW RELEASES PAGE REVIEWS BEGIN */
books["pictureBooks"]	=	"&ldquo;Complex seek-and-find images provide an intriguing backdrop for the story of a tenacious toy train. No puzzle herethese well-designed scenes are another success from the picture-challenge master.&rdquo;<br> Kirkus Reviews"
"<img src='http://www.scholastic.com/ems/Trade/091311_BU/images/star.gif' align='center' style='max-width:10px;max-height:10px;'> &ldquo;A favorite ancient fable beautifully presented in the tradition of the finest picture books.&rdquo; <br> Kirkus, starred review",<img src='http://www.scholastic.com/ems/Trade/091311_BU/images/star.gif' align='center' style='max-width:10px;max-height:10px;'> "&ldquo;A gratifying addition to Nancy Ekholm Burkert&sbquo;s small but treasured oeuvre.&rdquo;<br> Publishers Weekly, starred review",<img src='http://www.scholastic.com/ems/Trade/091311_BU/images/star.gif' align='center' style='max-width:10px;max-height:10px;'> &ldquo;For storyhours, one-on-one sharing, family read-alouds, or African studies, this book will be appreciated by a wide audience.&rdquo;<br> School Library Journal, starred review"
"&ldquo;A reassuring story about separation and love."
"&ldquo;A Velentine's Day story about finding your own special sweetheart."
		
books["nonFiction"]	=	"&ldquo;A child's first introduction to the U.S. presidents."
		
books["middleGrades"]	=	"&ldquo;Brooks&sbquo; writing, as always, is smooth, his dialogue realistic, and his characters and setting fully developed.&rdquo;<br> Booklist"
"&ldquo;A roaring, supernatural adventure that spans New York and the globe!&rdquo;"
"&ldquo;This will pull in young male readers and have them asking for the next installment. It looks like a war book, reads like a war book, and it makes you wonder how you would have acted in those situations."<br> Library Media Connection"
"&ldquo;An old foe sets a deadly trap for two young werewolves in a sequel framed by family reunions and positively festooned with hideous vampires.&rdquo;<br> Kirkus Reviews"
"&ldquo;The final installment of P.B. Kerr's magical Children of the Lamp series.&rdquo;"
"&ldquo;Lasky builds the wolf society as if it were a human tribe of both wise and blind leaders, living in a culture of cruelty, survival, evil, and honor.&rdquo;<br> School Library Journal"
"&ldquo;Lasky builds the wolf society as if it were a human tribe of both wise and blind leaders, living in a culture of cruelty, survival, evil, and honor.&rdquo;<br> School Library Journal"
"&ldquo;An explosive new series from the bestselling 39 Clues franchise -- The adventure is just beginging!&rdquo;"

books["youngAdult"]	=	"<img src='http://www.scholastic.com/ems/Trade/091311_BU/images/star.gif' align='center' style='max-width:10px;max-height:10px;'> &ldquo;The prose is spare but dense, lyrical and strongly emotive, and younger teens will find the story accessible and affecting even as older readers can revel in its emotional complexity and thematic sophistication.&rdquo;<br> Bulletin of the Center for Children&sbquo;s Books, starred review"
"&ldquo;Fans of Cashore&sbquo;s Graceling will greatly enjoy Digger&sbquo;s unique voice and strength of character, along with Bunce&sbquo;s ability to fully immerse readers in a finely crafted world.&rdquo; Voice of Youth Advocates"
/* NEW RELEASES PAGE REVIEWS END */

/* Main Tradebooks Page Reviews Begin */

books["featuredBooksMain"]=new Array();
books["featuredBooksMain"]=[""]

books["featuredBooks2"]=new Array();
books["featuredBooks2"]=[""]

books["featuredBooks3"]=new Array();
books["featuredBooks3"]=[""]

books["whatsHappening"]=new Array();
books["whatsHappening"]=[""]

books["authorSporlight"]=new Array();
books["authorSporlight"]=[""]

books["authorSporlightBook1"]=new Array();
books["authorSporlightBook1"]=[""]

books["authorSporlightBook2"]=new Array();
books["authorSporlightBook2"]=[""]

books["inviteAnAuthor"]=new Array();
books["inviteAnAuthor"]=[""]

books["featuredVideo"]=new Array();
books["featuredVideo"]=[""]

books["criticsCornerBook1"]=new Array();
books["criticsCornerBook1"]=["<img src='http://www.scholastic.com/ems/Trade/091311_BU/images/star.gif' align='center' style='max-width:10px;max-height:10px;'> &ldquo;Warm, delicious and filling.&rdquo;<br> Kirkus Reviews, starred review<br><br><img src='http://www.scholastic.com/ems/Trade/091311_BU/images/star.gif' align='center' style='max-width:10px;max-height:10px;'> &ldquo;Weeks deftly leavens moments of hilarity with the process of grieving in this sweet coming-of-age story.&rdquo;<br>  School Library Journal, starred review"]

books["criticsCornerBook2"]=new Array();
books["criticsCornerBook2"]=["<img src='http://www.scholastic.com/ems/Trade/091311_BU/images/star.gif' align='center' style='max-width:10px;max-height:10px;'> &ldquo;His narrative is fascinating, winding through formative early-teen experiences in Japan as he honed his skills and opened his eyes to the greater world around him.&ldquo;<br>  Booklist, starred review<br><br><img src='http://www.scholastic.com/ems/Trade/091311_BU/images/star.gif' align='center' style='max-width:10px;max-height:10px;'> &ldquo;Harmoniously designed.&rdquo;<br>  Horn Book, starred review<br><br><img src='http://www.scholastic.com/ems/Trade/091311_BU/images/star.gif' align='center' style='max-width:10px;max-height:10px;'> &ldquo;Exquisite drawings, paintings, comics and photographs balance each other perfectly as they illustrate Say&#146;s childhood path to becoming an artist.&rdquo;<br>  Kirkus Reviews, starred review<br><br><img src='http://www.scholastic.com/ems/Trade/091311_BU/images/star.gif' align='center' style='max-width:10px;max-height:10px;'> &ldquo;His story is so engaging.&rdquo;<br>  School Library Journal, starred review<br><br><img src='http://www.scholastic.com/ems/Trade/091311_BU/images/star.gif' align='center' style='max-width:10px;max-height:10px;'> &ldquo;A fascinating story, filled with startling developments.&rdquo;<br>  Bulletin of the Center for Children&#146;s Books, starred review"]

books["criticsCornerBook3"]=new Array();
books["criticsCornerBook3"]=["<img src='http://www.scholastic.com/ems/Trade/091311_BU/images/star.gif' align='center' style='max-width:10px;max-height:10px;'> &ldquo;A favorite ancient fable beautifully presented in the tradition of the finest picture books.&rdquo; <br>  Kirkus, starred review<br><br><img src='http://www.scholastic.com/ems/Trade/091311_BU/images/star.gif' align='center' style='max-width:10px;max-height:10px;'> &ldquo;A gratifying addition to Nancy Ekholm Burkert&#146;s small but treasured oeuvre.&rdquo;<br>  Publishers Weekly, starred review<br><br><img src='http://www.scholastic.com/ems/Trade/091311_BU/images/star.gif' align='center' style='max-width:10px;max-height:10px;'> &ldquo;For story hours, one-on-one sharing, family read-alouds, or African studies, this book will be appreciated by a wide audience.&rdquo;<br>  School Library Journal, starred review<br><br><img src='http://www.scholastic.com/ems/Trade/091311_BU/images/star.gif' align='center' style='max-width:10px;max-height:10px;'> &ldquo;Children (and adults) will pore over the minute details, while simultaneously admiring the grand majesty on each spread of this exquisite offering.&rdquo;<br> Booklist, starred review"]

books["criticsCornerBook4"]=new Array();
books["criticsCornerBook4"]=["<img src='http://www.scholastic.com/ems/Trade/091311_BU/images/star.gif' align='center' style='max-width:10px;max-height:10px;'> &ldquo;Another rip-roaring adventure with wide audience appeal.&rdquo;<br>   School Library Journal, starred review<br><br><img src='http://www.scholastic.com/ems/Trade/091311_BU/images/star.gif' align='center' style='max-width:10px;max-height:10px;'> &ldquo;A clever, old-fashioned adventure with some modern twists and a light-hearted tone, this, like TenNapel&#146;s previous work, is not to be missed.&rdquo;<br>   Booklist, starred review"]

books["criticsCornerBook5"]=new Array();
books["criticsCornerBook5"]=["<img src='http://www.scholastic.com/ems/Trade/091311_BU/images/star.gif' align='center' style='max-width:10px;max-height:10px;'> &ldquo;Masterful. Like nothing else out there now.&rdquo;<br> Kirkus, starred review<br><br><img src='http://www.scholastic.com/ems/Trade/091311_BU/images/star.gif' align='center' style='max-width:10px;max-height:10px;'> &ldquo;An utterly compelling read.&rdquo;<br> Publishers Weekly, starred review<br><br><img src='http://www.scholastic.com/ems/Trade/091311_BU/images/star.gif' align='center' style='max-width:10px;max-height:10px;'> &ldquo;An intoxicating ride.&rdquo;<br>The Horn Book, starred review<br><br><img src='http://www.scholastic.com/ems/Trade/091311_BU/images/star.gif' align='center' style='max-width:10px;max-height:10px;'> &ldquo;A book with cross-appeal to lovers of fantasy, horse stories, romance, and action adventure.&rdquo;<br>Booklist, starred review<br><br><img src='http://www.scholastic.com/ems/Trade/091311_BU/images/star.gif' align='center' style='max-width:10px;max-height:10px;'> &ldquo;Action, conflict, excitement, and a heart-stopping climax.&rdquo;<br> School Library Journal, starred review"]

books["newDiscussionGuides1"]=new Array();
books["newDiscussionGuides1"]=[""]

books["newBios1"]=new Array();
books["newBios1"]=[""]

books["newBios2"]=new Array();
books["newBios2"]=[""]

books["newBios3"]=new Array();
books["newBios3"]=[""]

books["newBooktalks1"]=new Array();
books["newBooktalks1"]=[""]

books["newBooktalks2"]=new Array();
books["newBooktalks2"]=[""]

books["newBooktalks3"]=new Array();
books["newBooktalks3"]=[""]

books["newBooktalks4"]=new Array();
books["newBooktalks4"]=[""]


/* Main Tradebooks Page Reviews End */



function displayPopup(n, arr, dir) {
	if(typeof(dir) == "undefined") dir="";
	var tipTool=document.getElementById("pointy");
	var tipToolContent=document.getElementById("pContent");
	var tipToolArrow=document.getElementById("pointyArr");
	var bookLayer=document.getElementById(arr+n);
	if ( n == '')
	{
		tipToolContent.innerHTML=books[arr];
	}
	else {
		tipToolContent.innerHTML=books[arr][n];
	}
	tipTool.style.display="block";
	tipToolArrow.style.display="block";
	hx=bookLayer.offsetHeight;
	hp=tipTool.offsetHeight;
	wp=tipTool.offsetWidth;
	h=hx-hp;

	//t=getposOffset(bookLayer,"top")+h-130;
	t=getposOffset(bookLayer,"top")+h-30;
	if(dir == "left") {
		l=getposOffset(bookLayer,"left")-wp+30;
		arrowLeft=l+wp-1;
		arrowTop=t+parseInt(hp / 2)-12;
		tipToolArrow.innerHTML='<img src="/products/tradebooks/images/pointyRight.gif" style="width:26px;height:25px;" />';
	}
	else {
		l=getposOffset(bookLayer,"left")+185;
		if(arr == "home") l+=- 40;
		arrowLeft=l-25;
		arrowTop=t+parseInt(hp / 2)-12;
		tipToolArrow.innerHTML='<img src="/products/tradebooks/images/pointyLeft.gif" style="width:26px;height:25px;" />';
	}
	tipTool.style.left=l+"px";
	tipTool.style.top=t+"px";
	tipToolArrow.style.left=arrowLeft+"px";
	tipToolArrow.style.top=arrowTop+"px";
}



function hidePopup() {
	document.getElementById("pointy").style.display="none";
	document.getElementById("pointyArr").style.display="none";
}


function getposOffset(overlay, offsettype){
	var totaloffset=(offsettype=="left")? overlay.offsetLeft : overlay.offsetTop;
	var parentEl=overlay.offsetParent;
	while (parentEl!=null){
		totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
		parentEl=parentEl.offsetParent;
	}
	return totaloffset;
}



/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
var menu_cs=new Array();
menu_cs[menu_cs.length]='<a href="http://www.scholastic.com/titles/abbyhayes">Abby Hayes</a>';
menu_cs[menu_cs.length]='<a href="http://alliefinkle.scholastic.com/Default.aspx">Allie Finkle</a>';
menu_cs[menu_cs.length]='<a href="http://www.scholastic.com/bone/">Bone</a>';
menu_cs[menu_cs.length]='<a href="http://www.scholastic.com/canyouseewhatisee/index_stacks.htm">Can You See What I See?</a>';
menu_cs[menu_cs.length]='<a href="http://www.scholastic.com/captainunderpants/">Captain Underpants</a>';
menu_cs[menu_cs.length]='<a href="http://www.scholastic.com/charliebone/">Charlie Bone</a>';
menu_cs[menu_cs.length]='<a href="http://www.scholastic.com/titles/childrenofthelamp/">Children of the Lamp</a>';
menu_cs[menu_cs.length]='<a href="http://www.scholastic.com/titles/deardumbdiary/index.htm">Dear Dumb Diary</a>';
menu_cs[menu_cs.length]='<a href="http://www.scholastic.com/deltora/">Deltora</a>';
menu_cs[menu_cs.length]='<a href="http://www.scholastic.com/dinosaurcove/">Dinosaur Cove</a>';
menu_cs[menu_cs.length]='<a href="http://www.scholastic.com/elliotspark/">Elliots Park</a>';
menu_cs[menu_cs.length]='<a href="http://www.scholastic.com/titles/geronimostilton/index.htm">Geronimo Stilton</a>';
menu_cs[menu_cs.length]='<a href="http://www.scholastic.com/goosebumps/">Goosebumps</a>';
menu_cs[menu_cs.length]='<a href="http://www.scholastic.com/graphix/">Graphix</a>';
menu_cs[menu_cs.length]='<a href="http://www.scholastic.com/harrypotter/">Harry Potter</a>';
menu_cs[menu_cs.length]='<a href="http://scholastic.com/kids/middleschoolsurvival/">How I Survived Middle School</a>';
menu_cs[menu_cs.length]='<a href="http://www.scholastic.com/thehungergames/">Hunger Games</a>';
menu_cs[menu_cs.length]='<a href="http://www.scholastic.com/julianrodriguez/">Julian Rodriguez</a>';
menu_cs[menu_cs.length]='<a href="http://www.scholastic.com/titles/keys/">Keys to the Kingdom</a>';
menu_cs[menu_cs.length]='<a href="http://www.scholastic.com/elyon/">Land of Elyon</a>';
menu_cs[menu_cs.length]='<a href="http://www.scholastic.com/mainstreet/">Main Street</a>';
menu_cs[menu_cs.length]='<a href="http://www.scholastic.com/andygriffiths/">Schooling Around</a>';
menu_cs[menu_cs.length]='<a href="http://www.scholastic.com/skeletoncreek/">Skeleton Creek</a>';

var menuwidth='185'
var menubgcolor='#E9F6DC'
var disappeardelay=250;
var hidemenu_onclick="yes" //hide menu when user clicks within menu?
var layerId;
var platform=navigator.platform.indexOf("Mac");
var ie4=document.all
var ns6=document.getElementById&&!document.all
function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth+"px";
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth : window.pageXOffset+window.innerWidth
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
if(ie4 && platform != -1) edgeoffset+=- 15
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight : window.pageYOffset+window.innerHeight
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
if(ie4 && platform != -1) edgeoffset+=-15
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6) {
	if(layerId == "homeSeriesDropDown") menuwidth=menuwidth; else menuwidth="143";
	what='<table border="0" cellpadding="0" cellspacing="0" width="'+menuwidth+'"><tr><td>'+what.join("")+'</td></tr></table>';
//dropmenuobj.innerHTML=what.join("")
dropmenuobj.innerHTML=what;
}
}


function dropdownmenu(obj, e, menucontents, mwidth){

if (mwidth == "143")
{
	layerId="homeDropDown";
}
else {
	layerId="homeSeriesDropDown";
	menuwidth = mwidth;
}

if (window.event) event.cancelBubble=true;
else if (e.stopPropagation) e.stopPropagation();
clearhidemenu();
dropmenuobj=document.getElementById? document.getElementById(layerId) : layerId;
populatemenu(menucontents);

if (ie4||ns6){
showhide(dropmenuobj.style, e,"visible","hidden", mwidth)
dropmenuobj.x=getposOffset(obj,"left")+2
if(ie4) dropmenuobj.y=getposOffset(obj,"top")
else dropmenuobj.y=getposOffset(obj,"top")-2
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj,"rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj,"bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b=b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes") document.onclick=hidemenu
