1(function ($) { 2 3Drupal.behaviors.commentNotify = { 4 attach: function (context) { 5 $('#edit-notify', context) 6 .bind('change', function() { 7 $('#edit-notify-type', context) 8 [this.checked ? 'show' : 'hide']() 9 .find('input[type=checkbox]:checked').attr('checked', 'checked'); 10 }) 11 .trigger('change'); 12 } 13} 14 15})(jQuery); 16; 17function calendar_go(dir) { 18 (function ($) { 19 $("#calendar-body").html("<div class='calendar_loader'><div></div></div>" + $("#calendar-body").html()); 20 $.get(Drupal.settings.basePath + "calendar_get/" + $(".calendar-" + dir).parent().attr("rel"), function(data){ 21 $("#calendar-body").html(" "); 22 $("#calendar-body").append(data); 23 $(".tooltip").tipTip({defaultPosition: "right", maxWidth: "400px", keepAlive:true}); 24 $("#calendar-body .calendar-daynames .calendar-value").each(function(){ 25 $(this).html($(this).html().substr(0,2) + '<span class="third-letter">' + $(this).html().substr(2,1) + '</span>'); 26 }); 27 }); 28 })(jQuery); 29} 30 31 /* 32 * TipTip 33 * Copyright 2010 Drew Wilson 34 * www.drewwilson.com 35 * code.drewwilson.com/entry/tiptip-jquery-plugin 36 * ----- 37 * Modified version for AJAX preloading. 38 */ 39(function($){ 40 $.fn.tipTip = function(options) { 41 var defaults = { activation: "hover", keepAlive: false, maxWidth: "200px", edgeOffset: 3, defaultPosition: "bottom", delay: 400, fadeIn: 200, fadeOut: 200, attribute: "title", content: false, enter: function(){}, exit: function(){} }; 42 var opts = $.extend(defaults, options); 43 if($("#tiptip_holder").length <= 0){ 44 var request = null; 45 var tiptip_holder = $('<div id="tiptip_holder" style="max-width:' + opts.maxWidth + ';"></div>'); 46 var tiptip_content = $('<div id="tiptip_content"></div>'); 47 var tiptip_arrow = $('<div id="tiptip_arrow"></div>'); 48 $("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('<div id="tiptip_arrow_inner"></div>'))); 49 } else { var tiptip_holder = $("#tiptip_holder"); var tiptip_content = $("#tiptip_content"); var tiptip_arrow = $("#tiptip_arrow"); } 50 return this.each(function(){ 51 var org_elem = $(this); 52 var par_elem = $(this); 53 if(opts.content){ var org_title = opts.content; } else { var org_title = org_elem.attr(opts.attribute); } 54 if(org_title != ""){ 55 if(!opts.content){ org_elem.removeAttr(opts.attribute); } 56 var timeout = false; 57 org_elem = $(this).children().children(); 58 if (par_elem.attr('rel') == "" || par_elem.attr('rel') == undefined) { opts.keepAlive = false; } 59 if(opts.activation == "hover"){ 60 org_elem.hover(function(){ active_tiptip(); }, function(){ if(!opts.keepAlive){ deactive_tiptip(); } }); 61 if(opts.keepAlive){ tiptip_holder.hover(function(){}, function(){ deactive_tiptip(); }); } 62 } else if(opts.activation == "focus"){ 63 org_elem.focus(function(){ active_tiptip(); }).blur(function(){ deactive_tiptip(); }); 64 } else if(opts.activation == "click"){ 65 org_elem.click(function(){ active_tiptip(); return false; }).hover(function(){},function(){ if(!opts.keepAlive){ deactive_tiptip(); } }); 66 if(opts.keepAlive){ tiptip_holder.hover(function(){}, function(){ deactive_tiptip(); }); } 67 } 68 function place_tiptip(){ 69 tiptip_arrow.removeAttr("style"); 70 var top = parseInt(org_elem.offset()['top']); var left = parseInt(org_elem.offset()['left']); var org_width = parseInt(org_elem.outerWidth()); var org_height = parseInt(org_elem.outerHeight()); var tip_w = tiptip_holder.outerWidth(); var tip_h = tiptip_holder.outerHeight(); var w_compare = Math.round((org_width - tip_w) / 2); var h_compare = Math.round((org_height - tip_h) / 2); var marg_left = Math.round(left + w_compare); var marg_top = Math.round(top + org_height + opts.edgeOffset); var t_class = ""; var arrow_top = ""; var arrow_left = Math.round(tip_w - 12) / 2; 71 if(opts.defaultPosition == "bottom"){ t_class = "_bottom";} else if(opts.defaultPosition == "top"){ t_class = "_top"; } else if(opts.defaultPosition == "left"){ t_class = "_left"; } else if(opts.defaultPosition == "right"){ t_class = "_right"; } 72 var right_compare = (w_compare + left) < parseInt($(window).scrollLeft()); 73 var left_compare = (tip_w + left) > parseInt($(window).width()); 74 if((right_compare && w_compare < 0) || (t_class == "_right" && !left_compare) || (t_class == "_left" && left < (tip_w + opts.edgeOffset + 5))){ 75 t_class = "_right"; 76 arrow_top = Math.round(tip_h - 13) / 2; 77 arrow_left = -12; 78 marg_left = Math.round(left + org_width + opts.edgeOffset); 79 marg_top = Math.round(top + h_compare); 80 } else if((left_compare && w_compare < 0) || (t_class == "_left" && !right_compare)){ 81 t_class = "_left"; 82 arrow_top = Math.round(tip_h - 13) / 2; 83 arrow_left = Math.round(tip_w); 84 marg_left = Math.round(left - (tip_w + opts.edgeOffset + 5)); 85 marg_top = Math.round(top + h_compare); 86 } 87 var top_compare = (top + org_height + opts.edgeOffset + tip_h + 8) > parseInt($(window).height() + $(window).scrollTop()); 88 var bottom_compare = ((top + org_height) - (opts.edgeOffset + tip_h + 8)) < 0; 89 if(top_compare || (t_class == "_bottom" && top_compare) || (t_class == "_top" && !bottom_compare)){ 90 if(t_class == "_top" || t_class == "_bottom"){ t_class = "_top"; } else { t_class = t_class + "_top"; } 91 arrow_top = tip_h;
92 marg_top = Math.round(top - (tip_h + 5 + opts.edgeOffset)); 93 } else if(bottom_compare | (t_class == "_top" && bottom_compare) || (t_class == "_bottom" && !top_compare)){ 94 if(t_class == "_top" || t_class == "_bottom"){ t_class = "_bottom"; } else { t_class = t_class + "_bottom"; } 95 arrow_top = -12; 96 marg_top = Math.round(top + org_height + opts.edgeOffset); 97 } 98 if(t_class == "_right_top" || t_class == "_left_top"){ marg_top = marg_top + 5; } else if(t_class == "_right_bottom" || t_class == "_left_bottom"){ marg_top = marg_top - 5; } 99 if(t_class == "_left_top" || t_class == "_left_bottom"){ marg_left = marg_left + 5; } 100 tiptip_arrow.css({"margin-left": arrow_left + "px", "margin-top": arrow_top + "px"}); 101 tiptip_holder.css({"margin-left": marg_left + "px", "margin-top": marg_top + "px"}).attr("class","tip" + t_class); 102 } 103 function active_tiptip(){ 104 if (request != null) { request.abort(); } 105 opts.enter.call(this); 106 if (par_elem.attr('rel') != "" && par_elem.attr('rel') != undefined) { 107 tiptip_content.html("<div class='tooltip_loader'><div></div></div>"); 108 request = $.get(Drupal.settings.basePath + "calendar_links/" + par_elem.attr('rel'), function(data){ tiptip_content.html(" "); tiptip_content.append(data); place_tiptip(); }); 109 } else { tiptip_content.html(org_title); } 110 tiptip_holder.hide().removeAttr("class").css("margin","0"); 111 place_tiptip(); 112 if (timeout){ clearTimeout(timeout); } 113 timeout = setTimeout(function(){ tiptip_holder.stop(true,true).fadeIn(opts.fadeIn); }, opts.delay); 114 } 115 function deactive_tiptip(){ opts.exit.call(this); if (timeout){ clearTimeout(timeout); } tiptip_holder.fadeOut(opts.fadeOut); } 116 } 117 }); 118 } 119 Drupal.behaviors.initRussianBeautyCalendar = { 120 attach : function() { 121 $(".tooltip").tipTip({defaultPosition: "right", maxWidth: "400px", keepAlive:true}); 122 $("#calendar-body .calendar-daynames .calendar-value").each(function(){ 123 $(this).html($(this).html().substr(0,2) + '<span class="third-letter">' + $(this).html().substr(2,1) + '</span>'); 124 }); 125 } 126 } 127})(jQuery); 128; 129(function($){ 130 Drupal.behaviors.statist={ 131 attach: function(context) { 132 if (Drupal.settings.statist!=null) { 133 var blocks=Drupal.settings.statist.blocks; 134 for (block_name in blocks) { 135 var tabs=blocks[block_name];
136 tabs.forEach( 137 function (tab_name) { 138 var block_selector_class=block_name+'_selector'; 139 var block_informer_class=block_name+'_informer'; 140 var tab_id=block_name+'_'+tab_name; 141 var tab_selector_id=tab_id+'_selector'; 142 var tab_informer_id=tab_id+'_informer'; 143 $('#'+tab_selector_id, context).click( 144 function() { 145 $('.'+block_informer_class).hide(); 146 $('#'+tab_informer_id).show(); 147 $('.'+block_selector_class).removeClass('active'); 148 $('#'+tab_selector_id).addClass('active'); 149 $('#'+block_selector_class+'_active_id').val(tab_selector_id); 150 }); 151 }); 152 if (Drupal.settings.statist.active_tab != null) 153 var first_tab_id=Drupal.settings.statist.active_tab; 154 else 155 var first_tab_id=block_name+'_'+tabs[0]+'_selector'; 156 $('#'+first_tab_id).click(); 157 } 158 } 159 } 160 } 161 162 $(document).on('change', '#edit-skip-read', function() { 163 console.log('!'); 164 var aT = $("#top_rating_selector_active_id").val(); 165 $.ajax({ 166 url: "?q=rating/"+$('#edit-skip-read').is(":checked")+"/"+aT+"/get", 167 success: function(data) { 168 console.log(data); 169 $('#top_rating_content').replaceWith(data); 170 Drupal.attachBehaviors(document, Drupal.settings); 171 jQuery('#'+aT).trigger('click'); 172 }, 173 }); 174 }); 175 176})(jQuery) 177 178; 179(function ($) { 180 Drupal.behaviors.backtotop = { 181 attach: function(context) { 182 var exist= jQuery('#backtotop').length; 183 if(exist == 0) { 184 $("body", context).once(function() { 185 $(this).append("<button id='backtotop'>"+Drupal.t(Drupal.settings.back_to_top.back_to_top_button_text)+"</button>"); 186 }); 187 } 188 $(window).scroll(function() { 189 if($(this).scrollTop() > Drupal.settings.back_to_top.back_to_top_button_trigger) { 190 $('#backtotop').fadeIn(); 191 } else { 192 $('#backtotop').stop(true).fadeOut(); 193 } 194 }); 195 196 $('#backtotop', context).once(function() { 197 $(this).click(function() { 198 $("html, body").bind("scroll mousedown DOMMouseScroll mousewheel keyup", function() { 199 $('html, body').stop(); 200 }); 201 $('html,body').animate({ scrollTop: 0 }, 1200, 'easeOutQuart', function() { 202 $("html, body").unbind("scroll mousedown DOMMouseScroll mousewheel keyup"); 203 }); 204 return false; 205 }); 206 }); 207 } 208 }; 209})(jQuery); 210;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.