$(function() { jQuery.fn.extend({ round: function(corners, style) { $(this).addClass(style ? 'rounded-'+style : 'rounded'); var divs = (corners || 'tl tr bl br').split(' '); for (var i = 0; i < divs.length; ++i) { $(this).append('
'); } } }); $('#footer').round(); // Index $('#callouts #alibris-basic').round('tl tr bl br', 'blue'); $('#callouts #alibris-gold').round('tl tr bl br', 'blue'); $('#callouts #testimonial').round('tl tr bl br', 'gold'); $('#callouts #monsoon-promo').round('tl tr bl br', 'gold'); // Interior pages $('#interior-content').round('bl br', 'interior'); $('#interior-content #subnav div').round('bl br', 'interior'); // Professional sellers page $('.professional #main .callouts .left').round('tl bl'); $('.professional #main .callouts .right').round('tr br'); // Casual sellers page $('.casual #main #alibris-basic').round('tl tr bl br', 'gold'); // Fees page $('#basic-plan .summary').round('bl br', 'blue'); $('#gold-plan .summary').round('bl br', 'gold'); // Seller pages $('#how-it-works').round('tl tr bl br', 'blue'); $('.special-offer').round('tl tr bl br', 'gold'); $('#links').round(); // Help/Forum pages $('#sidebar').round('tl tr'); // Inventory Demo page $('.demo .explanation').round('tl tr bl br', 'demo'); // Business Partners page function tooltipHover(e) { var offset = $(this).parents('div').offset(); var tooltip = $(this).parent().next('dd'); tooltip.css({ position: 'absolute', 'z-index': 99, clear: 'none', top: (e.pageY - offset.top + 10) + 'px', left: (e.pageX - offset.left + 10) + 'px' }); tooltip.show(); } $('dl.partner-group').find('dd').hide().end() .find('dt').wrapInner('') .find('a').hover(tooltipHover, function() { $(this).parent().next('dd').hide(); }) .mousemove(tooltipHover).click(function() { return false; }); // IE6 PNG transparency $('img#testimonial-image, img#list-here, img#contact-image, img#stack, h1#thanks').css('behavior', 'url(/framework/skins/sellerPortal/js/iepngfix.htc)'); // Help behavior $('#help-index dd').hide(); $('#help-index dt a').click(function() { var href = $(this).attr('href'); $('#help-index').find(href).toggle(); $(this).toggleClass('open'); return false; }); $('.help-content').hide(); $('#help-index dd a').click(function() { var href = $(this).attr('href'); $('.help-content').hide(); $(href).parent('.help-content').show(); }); });