$(document).ready(function() {
	$("[id*='spanBreadcrumbRoot']").replaceWith('<span id="ctl00_ctl00_Content_Content_spanBreadcrumbRoot"><a id="ctl00_ctl00_Content_Content_lnkBreadcrumbRoot" href="http://www.tisbookiu.com/home.aspx">Home</a>&nbsp;&gt;</span>');

	// Change inline background color style of MerchList nav button row //
	$('table [id*=dgMerch] tr').add('table [id*=dgBooks] tr').css('background-color','white');
	
	// Swap default MerchList page nav buttons with custom images //
	//$('input[alt="<<"]').attr("src","SiteImages/11-SchoolImages/11-newSite/11-button_first.png");
	//$('input[alt="<"]').attr("src","SiteImages/11-SchoolImages/11-newSite/11-button_prev.png");
	//$('input[alt=">"]').attr("src","SiteImages/11-SchoolImages/11-newSite/11-button_next.png");
	//$('input[alt=">>"]').attr("src","SiteImages/11-SchoolImages/11-newSite/11-button_last.png");
	
	// Check if we're already logged in.  If so, replace the //
	// "log in" link with the "log out" link, within the     //
	// div using the ID "login".                             //
			
	$('.iFooterPane div:first-child').hide(); 
	
	/* Make changes to the ReCaptcha box on registration page */
	 
	var reg = $('input[value=Register]').parent();
	$('<table id="reg_table"><tr><td id="recap_target" rowspan=2></td><td id="reg_text">To complete your registration, fill in the two security words and hit Register</td></tr><tr><td id="reg_target"></td></tr></table>').appendTo(reg);
	 
	$('#recaptcha_widget_div').appendTo('#recap_target');
	$('#recaptcha_area').css('margin-left','auto').css('margin-right','auto');
	$('input[value=Register]').appendTo('#reg_target');
	$('#reg_table').css('width','715px').css('margin-right','auto').css('margin-left','auto');
	$('#reg_text').css('text-align','center').css('color','#ffffff');
	$('#reg_target').css('text-align','center');

		
	//$('#ctl00_ctl00_div_content_sec').append
	//$('#top').after('<div id="header"><div id="logo"><h1><a href="http://www.tisbookiu.com/" title="T.I.S College Bookstore"></a></h1><p class="tagline"></p></div><div id="searcharea"><p></p><div id="mySearch"><center><a href="http://www.facebook.com/TISUofIllinois" target="_blank"><img height="50" height="50" src="http://www.tisbook.com/newsites/cham/images/facebook.gif" /></a> <a href="http://twitter.com/#!/tisillinois" target="_blank"><img height="50" height="50" src="http://www.tisbook.com/newsites/cham/images/twitter.gif" /></a> </center></div></div></div>');
	
	//$('<div id="header"><div id="logo"><h1><a href="http://www.tisbookiu.com/" title="T.I.S College Bookstore"></a></h1><p class="tagline"></p></div><div id="searcharea"><p></p><div id="mySearch"><center><a href="http://www.facebook.com/TISUofIllinois" target="_blank"><img height="50" height="50" src="http://www.tisbook.com/newsites/cham/images/facebook.gif" /></a> <a href="http://twitter.com/#!/tisillinois" target="_blank"><img height="50" height="50" src="http://www.tisbook.com/newsites/cham/images/twitter.gif" /></a> </center></div><div id="myCart"></div></div></div>').appendTo('#ctl00_ctl00_ctl07_dvHtmlContent');
	$('<div id="header"><div id="logo"><h1><a href="http://www.tisbookiu.com/" title="T.I.S College Bookstore"></a></h1></div><div id="searcharea"><div id="myCart"></div><div id="mySearch"></div></div></div>').appendTo('[id*="div_top_sec"]');
	//<div id="mySearch"><center><a href="http://www.facebook.com/TISUofIllinois" target="_blank"><img height="50" height="50" src="http://www.tisbook.com/newsites/cham/images/facebook.gif" /></a> <a href="http://twitter.com/#!/tisillinois" target="_blank"><img height="50" height="50" src="http://www.tisbook.com/newsites/cham/images/twitter.gif" /></a> </center></div>
	//$('<div id="header"><div id="logo"><h1><a href="http://www.tisbookiu.com/" title="T.I.S College Bookstore"></a></h1><p class="tagline"></p></div><div id="searcharea"><div id="mySearch"><center><a href="http://www.facebook.com/TISUofIllinois" target="_blank"><img height="50" height="50" src="http://www.tisbook.com/newsites/cham/images/facebook.gif" /></a> <a href="http://twitter.com/#!/tisillinois" target="_blank"><img height="50" height="50" src="http://www.tisbook.com/newsites/cham/images/twitter.gif" /></a> </center></div></div></div>').appendTo('[id*="dvHtmlContent"]');
	
	//$('#content').after('<div id="header"><div id="logo"><h1><a href="http://www.tisbookiu.com/" title="T.I.S College Bookstore"></a></h1></div><div id="cartSearch"><div id="mySearch"><div id="ctl00_ctl00_ctl06_pnlHorz"><center><a href="http://www.facebook.com/TISUofIllinois" target="_blank"><img height="50" height="50" src="http://www.tisbook.com/newsites/facebook.gif" /></a> <a href="http://twitter.com/#!/tisillinois" target="_blank"><img height="50" height="50" src="http://www.tisbook.com/newsites/twitter.gif" /></a> </center><!-- Shopping cart and login link could go here --><label class="speakonly" id="ctl00_ctl00_ctl06_Label1" for="ctl00_ctl00_ctl06_txtSearchHorz">Search: </label><input name="ctl00$ctl00$ctl06$txtSearchHorz" tabindex="32765" id="ctl00_ctl00_ctl06_txtSearchHorz" onkeypress="return clickButton(event,\'ctl00_ctl00_ctl06_btnSearchHorz\');" type="text" size="25" maxlength="70" value="Search for Merchandise" /> <input name="ctl00$ctl00$ctl06$btnSearchHorz" tabindex="32766" id="ctl00_ctl00_ctl06_btnSearchHorz" type="submit" value="Search" /></div></div></div></div>');
	//$('#content').after('<div id="header"><div id="logo"><h1><a href="http://www.tisbookiu.com/" title="T.I.S College Bookstore"></a></h1></div><div id="cartSearch"><div id="mySearch"><center><a href="http://www.facebook.com/TISUofIllinois" target="_blank"><img height="50" height="50" src="http://www.tisbook.com/newsites/facebook.gif" /></a> <a href="http://twitter.com/#!/tisillinois" target="_blank"><img height="50" height="50" src="http://www.tisbook.com/newsites/twitter.gif" /></a> </center></div></div></div>');

	//$('#header').after('<div class="menustyle" id="menu"><ul><li><a href="http://www.tisbookiu.com">Home <br />Page</a></li><li><a href="#" rel="menu1">Cardinal <br />Apparel</a></li><li><a href="#" rel="menu2">Cardinal <br />Giftware</a></li><li><a href="#" rel="menu3">Textbook <br />Department</a></li><li><a href="#" rel="menu4">Alumni &amp; <br />Graduation</a></li><li><a href="#" rel="menu5">School <br />Supplies</a></li></ul><p align="right"></p></div>');
	$('#header').after('<div class="menustyle" id="menu"><ul><li><a href="http://www.tisbookiu.com">Home <br /> Page</a></li><li><a href="#" rel="menu1">IU Hoosiers <br /> Apparel</a></li><li><a href="#" rel="menu2">IU Hoosiers <br /> Giftware</a></li><li><a href="#" rel="menu3">Textbook <br /> Department</a></li><li><a href="#" rel="menu4">Alumni &amp; <br /> Graduation</a></li><li><a href="#" rel="menu5">School <br /> Supplies</a></li></ul><div><a href="http://www.facebook.com/TISIU" target="_blank"><img height="45" height="45" src="http://tisbookiu.com/SiteImages/168-SchoolImages/168-facebook.gif" /></a> <a href="http://twitter.com/TISIndiana" target="_blank"><img height="45" height="45" src="http://tisbookiu.com/SiteImages/168-SchoolImages/168-twitter.gif" /></a></div></div>');
	$('#menu').after('<div class="dropmenu" id="menu1" style="width: 150px"><a href="http://tisbookiu.com/MerchList.aspx?ID=14012">T-Shirts</a><a href="http://tisbookiu.com/MerchList.aspx?ID=14020">Sweatshirts</a><a href="http://tisbookiu.com/MerchList.aspx?ID=15208">Adidas Shop &nbsp;&nbsp; <img height="15" src="http://tisbookiu.com/SiteImages/168-SchoolImages/168-adidas.png"></a><a href="http://tisbookiu.com/MerchList.aspx?ID=16616">UnderArmor &nbsp;&nbsp; <img height="15" src="http://tisbookiu.com/SiteImages/168-SchoolImages/168-underarmor.png"></a><a href="http://tisbookiu.com/MerchList.aspx?ID=14017">Hats</a><a href="http://tisbookiu.com/MerchList.aspx?ID=14018">Outerwear</a><a href="http://tisbookiu.com/MerchList.aspx?ID=14222">Polos & Dress Shirts</a><a href="http://tisbookiu.com/MerchList.aspx?ID=14019">Shorts & pants</a><a href="http://tisbookiu.com/MerchList.aspx?ID=14016">Kids Gear</a><a href="http://tisbookiu.com/MerchList.aspx?ID=14015">Womens Wear</a><a href="http://tisbookiu.com/MerchList.aspx?ID=15515">XXXL Sizes</a><a href="http://tisbookiu.com/MerchList.aspx?ID=19509">Vintage Vault Collection</a><a href="http://tisbookiu.com/MerchList.aspx?ID=16723">Icons of B-Town</a><a href="http://tisbookiu.com/MerchList.aspx?ID=15588">ON SALE</a></div>');
	$('#menu1').after('<div class="dropmenu" id="menu2" style="width: 150px"><a href="http://tisbookiu.com/MerchList.aspx?ID=16433">Drinkware</a><a href="http://tisbookiu.com/MerchList.aspx?ID=16436">Car Accessories</a><a href="http://tisbookiu.com/MerchList.aspx?ID=16489">Pets</a><a href="http://tisbookiu.com/MerchList.aspx?ID=16437">Golf</a><a href="http://tisbookiu.com/MerchList.aspx?ID=16432">Home & Office</a><a href="http://tisbookiu.com/MerchList.aspx?ID=16438">Jewelry</a><a href="http://tisbookiu.com/MerchList.aspx?ID=16439">Novelties</a><a href="http://tisbookiu.com/MerchList.aspx?ID=16431">Books, Music & Video</a><a href="http://tisbookiu.com/MerchList.aspx?ID=16434">Toys & Games</a><a href="http://tisbookiu.com/MerchList.aspx?ID=18294">Game Room</a><a href="http://tisbookiu.com/MerchList.aspx?ID=16435">Tailgating & Outdoors</a><a href="http://www.theclasswatch.com/schools/iu.html" target="_blank">Indiana Watches</a><a href="http://tisbookiu.com/MerchList.aspx?ID=16440">Holiday</a></div>');//<a href="http://tisbookiu.com/MerchList.aspx?ID=16689">Gift Baskets</a>
	$('#menu2').after('<div class="dropmenu" id="menu3" style="width: 225px"><a href="http://tisbookiu.com/SelectTermDept.aspx">Buy/Rent Online</a><a href="http://tisbookiu.com/Buyback.aspx">Sellback Information</a><a href="http://tisbookiu.com/SiteText.aspx?id=6554">Rental FAQs</a><a href="https://tisbookiu.mybooksandmore.com/MBM/screens/products/more/trade.jsp" target="_blank">Reference Books, Movies, & Music</a></div>');
	$('#menu3').after('<div class="dropmenu" id="menu4" style="width: 150px"><a href="http://tisbookiu.universityframes.com/eframe/Welcome.asp?reid=5">Diploma Frames</a><a href="http://tisbookiu.com/MerchList.aspx?ID=14013">Alumni Merchandise</a></div>');
	$('#menu4').after('<div class="dropmenu" id="menu5" style="width: 133px"><a href="http://tisbookiu.com/MerchList.aspx?ID=14025">Supplies</a></div>');
	//$('#menu4').after('<div class="dropmenu" id="menu5" style="width: 175px;"><a href="http://tisbookiu.com/MerchList.aspx?ID=19161">Binders & Notebooks</a><a href="http://tisbookiu.com/MerchList.aspx?ID=19162">Pens & Pencils</a><a href="http://tisbookiu.com/MerchList.aspx?ID=19163">Markers & Highlighters</a><a href="http://tisbookiu.com/MerchList.aspx?ID=19164">Calculators</a><a href="http://tisbookiu.com/MerchList.aspx?ID=19165">Misc.</a></div>');
	$('#menu5').after('<div class="subMenu"><a href="http://tisbookiu.com/Contact.aspx">Contact Us</a> | <a href="http://www.tisbook.com/rewards/" target="_blank">Rewards Card</a> | <a href="http://tisbook.iapplicants.com/" target="_blank">Employment</a> | <a href="http://www.facebook.com/TheIndianaShop" target="_blank">The Indiana Shop</a> | <a href="http://www.taylorimprints.com/" target="_blank">Taylor Imprinted Sportswear</a> | <a href="http://tisbookiu.com/StoreAbout.aspx">Store Info</a></div>');
	//$('#content').after('<div class="subMenu"><a href="http://tisbookiu.com/Contact.aspx">Contact Us</a> | <a href="http://www.tisbook.com/rewards/">Rewards Card</a> | <a href="http://tisbook.iapplicants.com/">Employment</a> | <a href="http://www.facebook.com/TheIlliniShop" target="_blank">The Illini Shop</a> | <a href="http://www.taylorimprints.com/" target="_blank">Taylor Imprinted Sportswear</a> | <a href="http://tisbookiu.com/StoreAbout.aspx">Store Info</a></div>');
	
	//$("[id*='pnlHorz']").appendTo("#mySearch");
 		
	// Get cart values //
	var cartSubTotal = $('#dvCart span[id*=lblCartTotal]').text();
	var cartItemCount = $('#dvCart span[id*=lblCount]').text();
	
	// Append to div#myCart //
	//$('div#myCart').html('<div><a href="http://tisbookiu.com/ShoppingCart.aspx">Total Items In Cart</a>: <span>' + cartItemCount + '</span></div><div>Sub Total: <span>' + cartSubTotal + '</span></div><div id="login"></div>');
	$('div#myCart').html('<div id="ctl00_ctl00_ctl08_upMiniCart"><a href="http://tisbookiu.com/ShoppingCart.aspx" style="color:black">Shopping Cart</a><div>SubTotal: <span>' + cartSubTotal + '</span></div><div>Item Count: <span>' + cartItemCount + '</span></div></div><div id="login"></div>');
		
	if($('div.AspNet-Menu-Vertical a:contains("Log Out")').length) {
		$('div#login').html('<a href="http://tisbookiu.com/logout.aspx">Log Out</a> / <a href="http://tisbookiu.com/customeraccount.aspx">Account</a>');
	} else {
		$('div#login').html('<a href="http://tisbookiu.com/login.aspx">Log In</a>');
	}
	
	$('table.search_v label[id*="lblS"]').addClass('speakonly');
	$('table.search_v label[id*="lblS"]').text('Search: ');
	$('[id*="txtSearch"]').attr('style', '');
	$('[id*="txtSearch"]').attr('size', '25');
	$('[id*="txtSearch"]').attr('value', 'Search');

	$('table.search_v label[id*="lblS"]').appendTo('#mySearch');
	$('[id*="txtSearch"]').appendTo('#mySearch');
	$('[id*="btnSearch"]').appendTo('#mySearch');
	//$('<br />').appendTo('#mySearch');
	$('[id*="listSearch"]').appendTo('#mySearch');
	
	//$("[id*='td_left_sec']").remove();
	$("[id*='dv_Logo']").remove();
	$("[id*='menu_v']").remove();
	$("[id*='div_footer_sec']").remove();
	
	$('div#ctl00_ctl00_div_content_sec').attr('id', 'div_content_sec');
	$('table#tbl_left_cont_right').attr('class', '');
	$('table#tbl_left_cont_right').attr('id', '');
	
	$('div#ctl00_ctl00_Content_ctl00_dvHtmlContent').attr('id', 'dvHtmlContent');
	$('#div_left_sec').remove(); 
	
	//$('link').remove();
	//$('div#ctl00_ctl00_div_top_sec').after('<br /><br />');
	$('#spacerdiv').after($("[id*='dMerchModule51']"));
	$('div.LocationBar').before($("[id*='dMerchModule51']"));
	cssdropdown.startmenu("menu"); 
	
	/*$("td.donotspeak ~ td").css('width', '');
	$('td.donotspeak').css('padding', '5px');
	$('td.donotspeak').attr('width', '110');
	$('td.donotspeak + td').attr('width', '720');*/
});

 

