advanced)? if(atom_get_options('jquery_init_query')): header("content-type: application/x-javascript"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Pragma: no-cache"); endif; ?> /*"; AtomLocalize['commentadded'] = ""; AtomLocalize['sendanother'] = ""; AtomLocalize['sending'] = ""; AtomLocalize['tryagain'] = ""; var blog_url = ''; // init jQuery(document).ready(function($){ // $("#footer").css({ // "position": "absolute", // "bottom": "0px", // "width": "100%" // }); // $("#main").css({ // "padding-bottom": $("#footer").height()+10, // "min-height": 0 // }); $('.nav ul.menu').superfish(); $('.accordion, .collapsible').AccordionMenu(); $("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 }); $('.suggestTerms').attr('autocomplete', 'off').autocomplete("", { width: 260, max: 100, matchContains: true, minChars: 2, selectFirst: false, cache: true, formatItem: function(row, i, max) { return '
\n\n' + $('.comment-author', $(this).parents('li div.comment')).html() + ':\n\n ' + $('.comment-content', $(this).parents('li div.comment')).html() + ''); $('#comment').focus(); }) $("#comments").delegate("a.reply", "click", function(event){ event.preventDefault(); 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(); }); }); }); $("#comments").delegate("#cancel-reply", "click", function(event){ event.preventDefault(); $(".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(); }); }); }); $(".toggle").live("click", function(){ event.preventDefault(); var target = $("."+$(this).attr('rel'), this.parent); $(target).slideFade('toggle', 333, 'easeOutQuart'); }); $(".hentry").each(function(){ $(this).highlight('', 1, "highlight"); }); $("#comments .comment-text").each(function(){ $(this).highlight('', 1, "highlight"); }); $('ul.menu li a').addClass("fadeThis"); if($.support.opacity && window.XMLHttpRequest) $('a.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[class*="nudge-"] a').each(function(){ var classes = $(this).closest('ul').attr('class'); var amount = parseInt(/amount-(\d+)/.exec(classes)[1], 10); var direction = /nudge-([^\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 id = $(this).attr('id').split(/-/g).slice(1); $(this).removeClass("regen"); $.ajax({ url: blog_url, type: "GET", context: this, data: ({ atom: 'update_thumb', attachment_size: $(this).attr('rel'), post_id: id[0], thumb_id: id[1] }), beforeSend: function() { $(this).addClass('loading'); }, success: function(data) { if(data != '') $(this).replaceWith(data); else $(this).removeClass('loading'); } }); }); $('a.go-top').each(function(){ var link = $(this); // link click event link.click(function () { $('html').animate({ scrollTop: 0 }, 'slow'); return true; }); // window scroll event $(window).scroll(function(){ //stupid IE hack if(!$.support.hrefNormalized){ link.css({'position': 'absolute', 'top': $(window).scrollTop() + $(window).height() - 50}); } if($(window).scrollTop() >= 500) link.fadeIn(200); else link.fadeOut(200); }); }); $('body').addGrid(12, {img_path: '/core/admin/i/'}); pm.bind("background-color", function(data){ if(data != '#000000') $("").css("background-color", data); else $("").css("background-color", ""); }); pm.bind("color-scheme", function(data){ $('link#-core-css, link#-style-css').attr('disabled', 'disabled'); // we need this so the style unloads from browser memory $('link#-core-css, link#-style-css').remove(); if(data != '') $('head').append(''); $('head').append(''); }); pm.bind("layout", function(data) { $('body').attr('class', function(i, c){ return c.replace(/\bcol-\S+/g, ''); }); $("body").addClass(data); }); pm.bind("page_width", function(data){ $('body').removeClass("fluid fixed"); $("body").addClass(data); }); pm.bind("page_width_max", function(data){ data = parseInt(data); if(data > 400) $(".page-content").css("max-width", data+'px'); }); pm.bind("dimensions", function(data){ var s = data.sizes.split(';'); s[0] = parseInt(s[0]); s[1] = parseInt(s[1]); var unit = data.unit; var gs = data.gs; switch(data['layout']){ case 'col-1': $('#primary-content').css({'width': gs+unit, 'left': '0'}); $('#mask-1').css({'right': 0}); $('#mask-2').css({'right': 0}); break; case 'col-2-left': $('#primary-content').css({'width': gs-s[0]+unit, 'left': gs+unit}); $('#sidebar').css({'width': s[0]+unit, 'left': '0'}); $('#mask-1').css({'right': gs-s[0]+unit}); $('#mask-2').css({'right': 0}); break; case 'col-2-right': $('#primary-content').css({'width': gs-(gs-s[0])+unit, 'left': gs-s[0]+unit}); $('#sidebar').css({'width': gs-s[0]+unit, 'left': gs-s[0]+unit}); $('#mask-1').css({'right': gs-s[0]+unit}); $('#mask-2').css({'right': 0}); break; case 'col-3': $('#primary-content').css({'width': (gs-s[0]-(gs-s[1]))+unit, 'left': gs+unit}); $('#sidebar').css({'width': s[0]+unit, 'left': gs-s[1]+unit}); $('#sidebar2').css({'width': gs-s[1]+unit, 'left': (gs-s[0])+unit}); $('#mask-2').css({'right': gs-s[1]+unit}); $('#mask-1').css({'right': ((gs-s[0])-(gs-s[1]))+unit}); break; case 'col-3-left': $('#primary-content').css({'width': (gs-s[1])+unit, 'left': (gs+(s[1]-s[0]))+unit}); $('#sidebar').css({'width': s[0]+unit, 'left': (s[1]-s[0])+unit}); $('#sidebar2').css({'width': (s[1]-s[0])+unit, 'left': (s[1]-s[0])+unit}); $('#mask-2').css({'right': (gs-s[1])+unit}); $('#mask-1').css({'right': (s[1]-s[0])+unit}); break; case 'col-3-right': $('#primary-content').css({'width': s[0]+unit, 'left': ((gs-s[0]-(gs-s[1]))+(gs-s[1]))+unit}); $('#sidebar').css({'width': (gs-s[0]-(gs-s[1]))+unit, 'left': (gs-s[0])+unit}); $('#sidebar2').css({'width': (gs-s[1])+unit, 'left': (gs-s[0])+unit}); $('#mask-2').css({'right': (gs-s[1])+unit}); $('#mask-1').css({'right': (s[1]-s[0])+unit}); break; } }); pm.bind("logo", function(data) { $("#logo a img").remove(); if (data != 'remove') $("#logo a").html('