Battelle for Kids - Home | |
H1 tags : .gallaryImage {display: none;} .imageContainer .button IMG {display: none;} var tir_timer; var tir_pause; $(document).ready(function() { var baselines = $('#tabbedImageRotator .baseline td'); baselines.each(function(index) { $(this).bind('click', { id: index, control: $(this) }, selectClick); }); baselines.eq(0).click(); tir_timer = setTimeout(function() { rotate(); }, 5000); $('#tabbedImageRotator *').mousemove(function(e) { if (!(tir_pause)) { tir_pause = true; clearTimeout(tir_timer); } }).mouseout(function(e) { if (tir_pause) { tir_pause = false; tir_timer = setTimeout(function() { rotate(0) }, 5000); } }); }); function rotate() { clearTimeout(tir_timer); if (tir_pause) { return; } var id = 0; var risers = $('#tabbedImageRotator .riser td'); risers.each(function(index){ if($(this).hasClass('selected')){ id = index + 1; } }); id = (id == risers.length) ? 0 : id; $('#tabbedImageRotator .baseline td').eq(id < 2 ? 0 : id - 1).click(); tir_timer = setTimeout(function() { rotate() }, 5000); } function selectClick(event){ var id = event.data.id; var control = event.data.control; var risers = $('#tabbedImageRotator .riser td'); risers.each(function(index) { if ($(this).hasClass('selected')) { if (index === 0) { $('#tabbedImageRotator .baseline td') .eq(index) .before('' + $(this).html() + ''); } else { $('#tabbedImageRotator .baseline td') .eq(index - 1) .after('' + $(this).html() + ''); } var thisBaseline = $('#tabbedImageRotator .baseline td').eq(index); thisBaseline.bind('click', { id: index, control: thisBaseline }, selectClick); if (index === 0) { thisBaseline.addClass('first'); } else if (index === risers.length - 1) { thisBaseline.addClass('last'); } $(this) .attr('rowspan', 1) .removeClass('selected') .empty(); } }); risers.eq(id) .empty() .append($(control).html()) .addClass('selected') .attr('rowspan', 2) $('#tabbedImageRotator .leftOf').toggleClass('leftOf'); $(control).prev().find('div').toggleClass('leftOf'); $(control).remove(); $('#tabbedImageRotator .imageContainer img') .css('display', 'none'); var galleryItem = $('#tabbedImageRotator .imageContainer img[galleryIndex=' + id + ']').first(); galleryItem.css('display', 'inline'); var galleryButton = $('#tabbedImageRotator .imageContainer a[parentIndex=' + id + ']').first() if(galleryButton.length === 1){ galleryButton.css({ 'left' : galleryItem.attr('button_x'), 'top' : galleryItem.attr('button_y') }) .attr('href', galleryItem.attr('target_href')) .children('img') .first() .css('display', 'inline'); } } Teacher EffectivenessEducator CompensationStrategic CommunicationsValue-AddedFormative Instruction |
Last Update : | 28/December/2011 |
Google PR : | 5 |
Internal links : | 38 |
External links : | 17 |
Archive : | Check how did the site look in the past? |