/* * jQuery :nth-last-child - v0.2 - 2/13/2010 * http://benalman.com/projects/jquery-misc-plugins/ * * Copyright (c) 2010 "Cowboy" Ben Alman * Dual licensed under the MIT and GPL licenses. * http://benalman.com/about/license/ */ (function($){var c=/:(nth)-last-child(?:\((even|odd|[\dn+-]*)\))?/,a=$.expr,b=a.filter.CHILD;a[":"]["nth-last-child"]=function(h,g,e,k){var j=e[0].match(c),f=$(h.parentNode).children(),d;j=a.preFilter.CHILD(j);b(h,j);d=f.eq(f.length-h.nodeIndex)[0];return b(d,j)}})(jQuery); jQuery(document).ready(function($) { ///////////////////////////////////////////////////////////////////////// //Nice Scroll ///////////////////////////////////////////////////////////////////////// //var nice = $("html").niceScroll(); // The document page (body) ///////////////////////////////////////////////////////////////////////// //Blockquote ///////////////////////////////////////////////////////////////////////// // Example One $('#tsc_quotes-rotator-container1 .tsc_quotes-rotator1').quovolver({ transitionSpeed : 700, // transition speed autoPlaySpeed : 8000, // duration before each transition (default 2300 = 2.3 seconds) autoPlay : true, // auto play quotes rotator equalHeight : false // disable auto resizing of panels }); ///////////////////////////////////////////////////////////////////////// //Tooltip ///////////////////////////////////////////////////////////////////////// // placement examples $('.north').powerTip({ placement: 'n' }); $('.east').powerTip({ placement: 'e' }); $('.south').powerTip({ placement: 's' }); $('.west').powerTip({ placement: 'w' }); $('.north-west').powerTip({ placement: 'nw' }); $('.north-east').powerTip({ placement: 'ne' }); $('.south-west').powerTip({ placement: 'sw' }); $('.south-east').powerTip({ placement: 'se' }); $('.north-west-alt').powerTip({ placement: 'nw-alt' }); $('.north-east-alt').powerTip({ placement: 'ne-alt' }); $('.south-west-alt').powerTip({ placement: 'sw-alt' }); $('.south-east-alt').powerTip({ placement: 'se-alt' }); // mouse follow examples $('#mousefollow-examples div').powerTip({ followMouse: true }); // mouse-on examples var mouseOnDiv = $('#mouseon-examples div'); var tipContent = $( '

Here is some content

' + '

Maybe a link

' ); mouseOnDiv.data('powertipjq', tipContent); mouseOnDiv.powerTip({ placement: 'e', mouseOnToPopup: true }); // api examples $('#api-open').on('click', function() { $.powerTip.show($('#mouseon-examples div')); }); $('#api-close').on('click', function() { $.powerTip.hide(); }); $('#api-manual') .powerTip({ manual: true }) .on('click', function() { $(this).powerTip('show'); }) .on('mouseleave', function() { $(this).powerTip('hide', true); }); $('#api-manual-mouse') .on('mouseenter', 'input', function(evt) { if (!$(this).data('powertip')) { $(this) .data('powertip', 'Tooltip added: ' + (new Date())) .powerTip({ manual: true }); } $(this).powerTip('show', evt); }) .on('mouseleave', 'input', function() { $(this).powerTip('hide'); }); ////////////////////////////////////////////////////////////////////////// // ADD ODD CLASS TO ROWS ////////////////////////////////////////////////////////////////////////// $(".zebra-style tr:odd, .toggle-style-faq .tgg-trigger:odd").addClass("odd"); ////////////////////////////////////////////////////////////////////////// // STICKY HEADER ////////////////////////////////////////////////////////////////////////// var sticky_navigation_offset_top = $('#rt-top-surround').offset().top; // our function that decides weather the navigation bar should have "fixed" css position or not. var sticky_navigation = function(){ var scroll_top = $(window).scrollTop(); // our current vertical position from the top // if we've scrolled more than the navigation, change its position to fixed to stick to top, otherwise change it back to relative if (scroll_top > sticky_navigation_offset_top) { $('#rt-top-surround').addClass('top-fixed').css({}); } else { $('#rt-top-surround').removeClass('top-fixed'); } }; $(window).scroll(function() { sticky_navigation(); }); ////////////////////////////////////////////////////////////////////////// // DRAWER ////////////////////////////////////////////////////////////////////////// var expand = $('.hidepaneltop'); $('a.hidetoggle').click(function() { if (expand.is(":visible")) { expand.slideUp(500, 'easeInOutExpo'); $(this).removeClass("close"); $(this).rotate({ bind: { mouseover : function() { $(this).rotate({ easing: $.easing.easeInOutElastic, animateTo:180 }) }, mouseout : function() { $(this).rotate({ easing: $.easing.easeInOutElastic, animateTo:0 }) } } }); } else { expand.slideDown(500, 'easeInOutExpo'); $(this).addClass("close"); $(this).rotate({ bind: { mouseover : function() { $(this).rotate({ easing: $.easing.easeInOutElastic, animateTo:225 }) }, mouseout : function() { $(this).rotate({ easing: $.easing.easeInOutElastic, animateTo:45 }) } } }); }; return false; }); })// end of window load