advanced)? if($options['jquery_init_query']): header("content-type: application/x-javascript"); header("Expires: Mon, 25 Dec 1989 02:00:00 GMT"); header("Cache-Control: no-cache"); header("Pragma: no-cache"); endif; ?> /*"; $lang['commentadded'] = ""; $lang['sendanother'] = ""; $lang['sending'] = ""; $lang['tryagain'] = ""; var blog_url = ''; // init jQuery(document).ready(function($){ $('ul.menu').superfish(); $("a[rel='lightbox'], a[href$='.jpg'], a[href$='.jpeg'], a[href$='.gif'], a[href$='.png'], a[href$='.JPG'], a[href$='.JPEG'], a[href$='.GIF'], a[href$='.PNG']").fancyboxlite({ 'zoomSpeedIn': 333, 'zoomSpeedOut': 333, 'zoomSpeedChange': 133, 'transitionIn' : 'elastic', 'transitionOut' : 'elastic', 'easingIn' : 'easeOutBack', 'easingOut' : 'easeInBack', 'overlayShow': true, 'overlayOpacity': 0.75 }); $('.clearField').clearField({ blurClass: 'clearFieldBlurred', activeClass: 'clearFieldActive' }); $("form").submit(function(){ $('.clearField', this).each(function(){ if($(this).val() == ($(this).attr('rel') || 'http://')) $(this).val(''); }); return true; }); $('.user-form').submit(function(){ var form = $(this); var submit = $('input.submit', this); var antispam = $('input[name=user-form-nonce]', this); jQuery(this).ajaxSubmit({ beforeSubmit: function(){ $('.error', form).remove(); // remove old error msgs submit.attr('disabled', 'disabled'); submit.val($lang['sending']); }, error: function(request){ // error }, success: function(data){ var obj = eval('('+data+')'); if(typeof(obj.error) != 'undefined'){ submit.after('
'+obj.error+'
'); submit.removeAttr('disabled'); submit.val($lang['tryagain']); } else if(typeof(obj.success) != 'undefined'){ form.after(''+obj.success+'
'); // form.remove(); submit.remove(); $('input,textarea,select', form).attr('disabled', 'disabled'); } } }); return false; }); $('input[name=user-form-nonce]').each(function(){ var e = $(this); var form = $(this).parents('form'); var id = $('.form-id', form).val(); var antispam = function(){ $.ajax({ url: blog_url, type: "GET", data: ({ atom_get_user_form_nonce: id }), beforeSend: function(){ }, error: function(request){ }, success: function(data){ e.val(data); $('input.submit', form).removeAttr('disabled'); } }); } setTimeout(antispam, 10000); // wait 10 seconds }); $('#post-tabs .sections').cycle({ fx: 'fade', before: function(curr, next, opts, fwd) { // little hack to get the slide content height var $ht = $(this).height(); // set the container's height to that of the current slide $(this).parent().animate({height: $ht}, 333, 'easeOutExpo'); }, speed: 500, pause: true, height: $($('#post-tabs ul.tabs li.active').attr('href')).height(), containerResize: 0, easing: 'easeOutExpo', pager: '#post-tabs ul.tabs', pagerAnchorBuilder: function(idx, slide) { // return selector string for existing anchor return '#post-tabs ul.tabs li:eq(' + idx + ') a'; }, activePagerClass: 'active', timeout: 0 }); js() function to init? ?> $('.widget-tabs').each(function(){ var $id = $(this).attr('id'); var $fx = ''; var $ease = ''; var $classes = $(this).attr('class').split(' '); // get the effects/ease options from classes for (var i = 0; i < $classes.length; i++){ $matches = /^fx\-(.+)/.exec($classes[i]); if ($matches != null){ if($fx != '') $fx = $fx + ', '+$matches[1]; else $fx = $matches[1]; } $matches = /^ease\-(.+)/.exec($classes[i]); if ($matches != null) $ease = $matches[1]; } if($fx == '') $fx = 'fade'; if($ease == '') $fx = 'swing'; // get the active nav var $activeNav = '#'+$id+' ul.tabs li.active'; // no active class found, widget might have changed. reset if($($activeNav).attr('class') == undefined){ $activeNav = $('#'+$id+' ul.tabs li:first'); $($activeNav).addClass('active'); $('#'+$id+' '+$($activeNav).find('a').attr('href')).show(); } var $index = $($activeNav).index(); var $activeHeight = $($($activeNav).find('a').attr('href')).height(); $('#'+$id+' .sections').cycle({ fx: $fx, before: function(curr, next, opts, fwd) { // little hack to get the slide content height // we need to make the slide temporarily visible to retrieve it's children height $styles = $(this).attr('style'); $(this).show(); var $ht = $(this).find('.block-content').height(); $(this).attr('style', $styles); //set the container's height to that of the current slide $(this).parent().animate({height: $ht +5}, 333, $ease); }, after:function(curr, next, opts, fwd) { // set the cookie (php will add or not the active/hidden classes based on this) $cookieValue = $($activeNav).attr("class").split(" ")[0]; $.cookie($id , $cookieValue, { path: '/' }); }, speed: (($fx != 'toss') ? 500 : 2000), pause: true, height: $activeHeight, containerResize: 0, startingSlide: $index, easing: $ease, pager: '#'+$id+' ul.tabs', pagerAnchorBuilder: function(idx, slide) { // return selector string for existing anchor return '#'+$id+' ul.tabs li:eq(' + idx + ') a'; }, activePagerClass: 'active', timeout: 0 }); }); $(".nav").attr("role", "navigation"); $("#primary-content").attr("role", "main"); $("#sidebar").attr("role", "complementary"); $(".search-form").attr("role", "search"); $('a.quote').livequery("click", function(){ $('#comment').appendVal( '\n\n' + $('.comment-author', $(this).parents('li div.comment')).html() + ':\n\n ' + $('.comment-content', $(this).parents('li div.comment')).html() + ''); $('#comment').focus(); return false; }) $("a.reply").livequery("click", function(){ linkClass = $(this).attr('id'); var pos = linkClass.lastIndexOf('-'); var targetID = linkClass.substr(++pos); $(".comment.new").hide(); $('#comment_parent').attr('value', targetID); $("#cancel-reply").show(); $(".comment.new").appendTo('#comment-body-'+targetID).show(0, function(){ // move cursor in textarea, at the end of the text $('#comment').each(function(){ if (this.createTextRange) { var r = this.createTextRange(); r.collapse(false); r.select(); } $(this).focus(); }); }); return false; }); $("#cancel-reply").livequery("click", function (event) { $(".comment.new").hide(); $('#comment_parent').attr('value','0'); $("#cancel-reply").hide(); $(".comment.new").appendTo('li.new').show(0,function(){ // move cursor in textarea, at the end of the text $('#comment').each(function(){ if (this.createTextRange) { var r = this.createTextRange(); r.collapse(false); r.select(); } $(this).focus(); }); }); return false; }); setup_comment_ajax(); $(".toggle").livequery("click", function(){ var target = $("."+$(this).attr('rel'), this.parent); $(target).slideFade('toggle', 333, 'easeOutQuart'); return false; }); 0): ?> var highlight_search_query = ""; $(".hentry").each(function(){ $(this).highlight(highlight_search_query, 1, "highlight"); }); $(".block ul.menu a").addClass("fadeThis"); if($.support.opacity && window.XMLHttpRequest) $('.fadeThis').livequery(function(){ $(this).append('').each(function(){ var $span = $('> span.hover', this).css('opacity', 0); $(this).hover(function() { $span.stop().fadeTo(200, 1); }, function() { $span.stop().fadeTo(800, 0); }); }); }); $(".search-form").each(function(){ form = $(this); $('a.submit', this).click(function(){ form.submit(); }); }); $('a.tt').bubble(); $('ul.social-media li a').each(function(){ var classes = $(this).closest('ul').attr('class'); var amount = parseInt(/amount-(\d+)/.exec(classes)[1], 10); var direction = /slide-([^\s]+)/.exec(classes)[1]; $(this).nudge({ property: 'margin' + direction.charAt(0).toUpperCase() + direction.slice(1), amount: -(amount), duration: 166 }); }); $('span.no-img.regen').livequery(function(){ var size = $(this).attr('rel'); var id = $(this).attr('id').split(/-/g).slice(1); var element = $(this); $.ajax({ url: blog_url, type: "GET", data: ({ atom_update_thumb: 1, attachment_size: size, post_id: id[0], thumb_id: id[1] }), beforeSend: function() { element.addClass('loading'); }, error: function(request){ }, success: function(data) { element.replaceWith(data); } }); }); $(".block-featured .cycle").each(function(index, value){ var count = (index + 1) * 150; var $$ = $(this), featured_cycle = function(){ $$.cycle({ fx: '', speed: , pause: true, prev: '.block-featured a.prev', next: '.block-featured a.next', easing: '', timeout: }); }; setTimeout(featured_cycle, count); }); $('a.caption').each(function(){ var title = $(this).attr('title'); $(this).append('
'+title+'