$(document).ready(function() { $("a[rel*=external]").attr('target','_blank'); // non-semantic DOM additions var ornament = '
'; $('div#main blockquote.q').prepend('').append(''); $('.split span:last').after(ornament); $('div.aside.offset, body#itsolutions p.hilite, .reason').prepend(ornament); // helpful classes //$('ul li:first-child, blockquote *:first-child, div.colb > p:first-child').addClass('first'); //$('ul li:last-child').addClass('last'); $('div#features p:not(.hilite)').addClass('no-hilite'); $('tr:even').addClass('even'); $('tr:odd').addClass('odd'); // nice classes for table columns var cols = 5; var i; for(i = 1; i<=cols; i++) { $('tr td:nth-child('+i+')').addClass('col'+i); } // collapsible table lists $('table.shop td:nth-child(4)').each(function(i){ $('ul li:gt(2)', this).wrapAll('
'); }); $('table.shop div.h').after('See more specs').hide(); $('a.slider').click(function() { if($(this).hasClass('up')) { $(this).text('See less specs').removeClass('up').addClass('down').siblings('div.h').slideDown(); } else { $(this).text('See more specs').removeClass('down').addClass('up').siblings('div.h').slideUp(); } }); // shop table enhancements $('table.shop td.col5').wrapInner(''); // add numbers to the ol elements on about us section var reason = 1; $('body#about div.ornament').each(function(i) { $(this).addClass('london').text(reason); reason++; }); // home page accordions $('div#plans > div').each(function(i) { $(this).children('p').wrapAll('
'); }); $('div.inner:not(:first)').hide(); $('div#plans h4').click(function() { $('div#plans > div').removeClass('on'); $('div.inner').slideUp('normal'); if($(this).siblings('div.inner').is(':hidden') == true) { $(this).parent('div').addClass('on'); $(this).siblings('div.inner').slideDown('normal'); } }); // Superfish $('ul#nav-home').superfish({ delay: 1000, animation: {opacity:'show',height:'show'}, speed: 'normal' }); $('ul#nav-home li a span.sf-sub-indicator').text(''); $('ul#nav').superfish({ delay: 1000, animation: {opacity:'show',height:'show'}, speed: 'normal' }); $('ul#nav li a span.sf-sub-indicator').text(''); //fading partner logos $('').css('display', 'none').prependTo($('ul#partners li')); $('ul#partners li a').each(function() { $(this).bind('mouseenter', function() { $(this).siblings('.fake').fadeIn('slow'); }).bind('mouseleave', function() { $(this).siblings('.fake').fadeOut('slow'); }); }); //flash embedding of cost calculator $('div#costCalc').flashembed('cost-calculator.swf'); $('#PromoCarousel').anythingSlider({ height : 280, width : 640, easing : 'easeOutQuart', autoPlay : true, delay : 6000, animationTime : 1500 }); testimonialInitial = setTimeout("loopTestimonials()", 2000); //$('#VideoPopup').addVimeo(); //$("a#VideoLink").fancybox(); }); function loopTestimonials() { clearTimeout(testimonialInitial); var currTestimonial = $('#testimonials li.active'); var hiddenTestimonials = $('#testimonials li:not(.active)'); var randNumber = Math.floor(Math.random() * hiddenTestimonials.length); var randTestimonial = hiddenTestimonials.eq(randNumber); currTestimonial.fadeOut('slow', function() { $(this).removeClass('active'); randTestimonial.fadeIn('slow', function() { $(this).addClass('active'); }); }); testimonialLoop = setTimeout("loopTestimonials()", 4000); }