$(document).ready(function(){ $('#header-search #s').toggleVal(); $('.section-title').innerwrap(''); $('.section-title').css({'padding' : '0'}); $('.inactive').show(); $('.section-title-slash').show(); $('.home-interview-container').hide(); $('.home-featured-link').click(function () { $('.home-featured-container').show(); $('.home-interview-container').hide(); }); $('.home-interview-link').click(function () { $('.home-featured-container').hide(); $('.home-interview-container').show(); }); $('a.rondefeo').click(function () { $('div.files-participants-body').hide(); $('div.rondefeo').show(); }); $('a.lutzes').click(function () { $('div.files-participants-body').hide(); $('div.lutzes').show(); }); $('a.pecoraro').click(function () { $('div.files-participants-body').hide(); $('div.pecoraro').show(); }); $('a.warrens').click(function () { $('div.files-participants-body').hide(); $('div.warrens').show(); }); $('a.kaplan').click(function () { $('div.files-participants-body').hide(); $('div.kaplan').show(); }); $('a.weber').click(function () { $('div.files-participants-body').hide(); $('div.weber').show(); }); $('a.holzer').click(function () { $('div.files-participants-body').hide(); $('div.holzer').show(); }); $('a.didio').click(function () { $('div.files-participants-body').hide(); $('div.didio').show(); }); $('a.anson').click(function () { $('div.files-participants-body').hide(); $('div.anson').show(); }); $('a.cromartys').click(function () { $('div.files-participants-body').hide(); $('div.cromartys').show(); }); $('a.osuna').click(function () { $('div.files-participants-body').hide(); $('div.osuna').show(); }); $('a.moran').click(function () { $('div.files-participants-body').hide(); $('div.moran').show(); }); $('.files-slider .prev').fadeTo("fast", 0.6); $('.files-house .file-nav').serialScroll({ items:'li', prev:'.files-house .prev', next:'.files-house .next', offset:0, start:0, duration:300, force:true, stop:true, lock:false, cycle:false, jump:false, exclude:3, onBefore:function( e, elem, $pane, $items, pos ){ if( pos == 0 ) $('.files-house .prev').fadeTo("fast", 0.6); else if( pos == $items.length-4 ) $('.files-house .next').fadeTo("fast", 0.6); else { $('.files-house .prev').fadeTo("fast", 1); $('.files-house .next').fadeTo("fast", 1); } } }); $('.files-murders .file-nav').serialScroll({ items:'li', prev:'.files-murders .prev', next:'.files-murders .next', offset:0, start:0, duration:300, force:true, stop:true, lock:false, cycle:false, jump:false, exclude:3, onBefore:function( e, elem, $pane, $items, pos ){ if( pos == 0 ) $('.files-murders .prev').fadeTo("fast", 0.6); else if( pos == $items.length-4 ) $('.files-murders .next').fadeTo("fast", 0.6); else { $('.files-murders .prev').fadeTo("fast", 1); $('.files-murders .next').fadeTo("fast", 1); } } }); $('.files-fact-fiction .file-nav').serialScroll({ items:'li', prev:'.files-fact-fiction .prev', next:'.files-fact-fiction .next', offset:0, start:0, duration:300, force:true, stop:true, lock:false, cycle:false, jump:false, exclude:3, onBefore:function( e, elem, $pane, $items, pos ){ if( pos == 0 ) $('.files-fact-fiction .prev').fadeTo("fast", 0.6); else if( pos == $items.length-4 ) $('.files-fact-fiction .next').fadeTo("fast", 0.6); else { $('.files-fact-fiction .prev').fadeTo("fast", 1); $('.files-fact-fiction .next').fadeTo("fast", 1); } } }); $('.files-books-film .file-nav').serialScroll({ items:'li', prev:'.files-books-film .prev', next:'.files-books-film .next', offset:0, start:0, duration:300, force:true, stop:true, lock:false, cycle:false, jump:false, exclude:3, onBefore:function( e, elem, $pane, $items, pos ){ if( pos == 0 ) $('.files-books-film .prev').fadeTo("fast", 0.6); else if( pos == $items.length-4 ) $('.files-books-film .next').fadeTo("fast", 0.6); else { $('.files-books-film .prev').fadeTo("fast", 1); $('.files-books-film .next').fadeTo("fast", 1); } } }); $('.gallery-years .container').cycle({ fx: 'scrollHorz', next: '.gallery-years .next', prev: '.gallery-years .prev', timeout: 0, speed: 600 }); $('.gallery-village .container').cycle({ fx: 'scrollHorz', next: '.gallery-village .next', prev: '.gallery-village .prev', timeout: 0, speed: 600 }); $('.gallery-transcripts .container').cycle({ fx: 'scrollHorz', next: '.gallery-transcripts .next', prev: '.gallery-transcripts .prev', timeout: 0, speed: 600 }); $('.gallery-newsdefeo .container').cycle({ fx: 'scrollHorz', next: '.gallery-newsdefeo .next', prev: '.gallery-newsdefeo .prev', timeout: 0, speed: 600 }); $('.gallery-defeo .container').cycle({ fx: 'scrollHorz', next: '.gallery-defeo .next', prev: '.gallery-defeo .prev', timeout: 0, speed: 600 }); $('.gallery-newshaunt .container').cycle({ fx: 'scrollHorz', next: '.gallery-newshaunt .next', prev: '.gallery-newshaunt .prev', timeout: 0, speed: 600 }); var profiles = { video: { width:450, height:325, center:1, createnew:0 } }; $(".popup").popupwindow(profiles); /*$('a').each(function() { var path = $(this).attr('href'); $(this).attr('href',path+'?preview_theme=amity'); });*/ }); $(window).load(function() { $('html').css('background', '#000 url("/wp-content/themes/amity/images/bg-bottom.png") no-repeat center ' + $('#top').height() + 'px'); //newHeight = Math.abs(parseInt($('#sidebar').height()) - parseInt($('.home-welcome').height()) - parseInt($('.home-video').height())) - 72; newHeight = Math.abs(parseInt($('#sidebar').height()) - parseInt($('.home-welcome').height()) - parseInt($('.home-interview').height())) - 114; $('.home-featured').height(newHeight); //$('.home-interview').height(newHeight); if ( $('.contact-content .right').height() > $('.contact-content .left').height() ) { newHeight = $('.contact-authors .section-body').height() + $('.contact-authors-bio .section-body').height() - $('.contact-press .section-body').height(); $('.contact-links .section-body').height(newHeight); } else { newHeight = $('.contact-press .section-body').height() + $('.contact-links .section-body').height() - $('.contact-authors .section-body').height(); $('.contact-authors-bio .section-body').height(newHeight); } }); function equalHeight(group) { tallest = 0; group.each(function() { thisHeight = $(this).height(); if(thisHeight > tallest) { tallest = thisHeight; } }); group.height(tallest); }