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 '
'+row[0]+''+row[1]+''; }, multiple: false, //multipleSeparator: " " }); $('.post-content .more-link').click(function(event){ event.preventDefault(); $.ajax({ url: blog_url, type: "GET", context: this, data: ({ atom: 'read_more', post_id: $(this).attr('rel') }), beforeSend: function(){ }, error: function(){ }, success: function(data){ $(this).closest('.post-content').html(data); } }); }); $('.clearField').clearField({ blurClass: 'clearFieldBlurred', activeClass: 'clearFieldActive' }); $('a.screenshot').each(function(i){ $("body").append("
<?php _ae("Preview");?>
"); var tooltip = $("#webshot-"+i); $(this).mouseover(function () { tooltip.css({ opacity: 1, display: "none" }).fadeIn(333); }).mousemove(function(kmouse) { tooltip.css({ left: kmouse.pageX + 15, top: kmouse.pageY + 15 }); }).mouseout(function () { tooltip.fadeOut(333); }); }); $("form").submit(function(){ $('.clearField', this).each(function(){ if($(this).val() == ($(this).attr('alt') || 'http://')) $(this).val(''); }); return true; }); $('#meta .sections').cycle({ fx: 'fade', before: function(curr, next, opts, fwd) { // little hack to get the slide content height var $ht = $(this).height()+20; // set the container's height to that of the current slide $(this).parent().animate({height: $ht}, 333, 'easeOutExpo'); }, speed: 500, pause: true, height: $($('#meta ul.tabs li.active').attr('href')).height(), containerResize: 0, easing: 'easeOutExpo', pager: '#meta ul.tabs', pagerAnchorBuilder: function(idx, slide) { // return selector string for existing anchor return '#meta 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("id"); $.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, #sidebar2").attr("role", "complementary"); $(".search-form").attr("role", "search"); $("#comments").delegate("a.vote", "click", function(event){ event.preventDefault(); $.ajax({ url: blog_url, type: "GET", context: this, data: ({ atom: 'comment_karma', karma: $(this).attr('rel') }), beforeSend: function(){ }, error: function(){ }, success: function(data){ var status = $(this).parent().find('.karma'); status.html(data); if(parseInt(data) > 0){ status.removeClass("negative"); status.addClass("positive"); } else if(parseInt(data) < 0){ status.removeClass("positive"); status.addClass("negative"); } $(this).parent().find('a').remove(); } }); }); $("#comments").delegate("a.show", "click", function(event){ event.preventDefault(); $.ajax({ url: blog_url, type: "GET", context: this, data: ({ atom: 'get_comment', comment_id: $(this).attr('rel') }), beforeSend: function(){ }, error: function(){ }, success: function(data){ var comment = $('