1// ColorBox v1.3.20.1 - jQuery lightbox plugin 2// (c) 2012 Jack Moore - jacklmoore.com 3// License: http://www.opensource.org/licenses/mit-license.php 4(function(e,t,n){function G(n,r,i){var o=t.createElement(n);return r&&(o.id=s+r),i&&(o.style.cssText=i),e(o)}function Y(e){var t=T.length,n=(U+e)%t;return n<0?t+n:n}function Z(e,t){return Math.round((/%/.test(e)?(t==="x"?tt():nt())/100:1)*parseInt(e,10))}function et(e){return B.photo||/\.(gif|png|jp(e|g|eg)|bmp|ico)((#|\?).*)?$/i.test(e)}function tt(){return n.innerWidth||N.width()}function nt(){return n.innerHeight||N.height()}function rt(){var t,n=e.data(R,i);n==null?(B=e.extend({},r),console&&console.log&&console.log("Error: cboxElement missing settings object")):B=e.extend({},n);for(t in B)e.isFunction(B[t])&&t.slice(0,2)!=="on"&&(B[t]=B[t].call(R));B.rel=B.rel||R.rel||"nofollow",B.href=B.href||e(R).attr("href"),B.title=B.title||R.title,typeof B.href=="string"&&(B.href=e.trim(B.href))}function it(t,n){e.event.trigger(t),n&&n.call(R)}function st(){var e,t=s+"Slideshow_",n="click."+s,r,i,o;B.slideshow&&T[1]?(r=function(){M.text(B.slideshowStop).unbind(n).bind(f,function(){if(B.loop||T[U+1])e=setTimeout(J.next,B.slideshowSpeed)}).bind(a,function(){clearTimeout(e)}).one(n+" "+l,i),g.removeClass(t+"off").addClass(t+"on"),e=setTimeout(J.next,B.slideshowSpeed)},i=function(){clearTimeout(e),M.text(B.slideshowStart).unbind([f,a,l,n].join(" ")).one(n,function(){J.next(),r()}),g.removeClass(t+"on").addClass(t+"off")},B.slideshowAuto?r():i()):g.removeClass(t+"off "+t+"on")}function ot(t){V||(R=t,rt(),T=e(R),U=0,B.rel!=="nofollow"&&(T=e("."+o).filter(function(){var t=e.data(this,i),n;return t&&(n=t.rel||this.rel),n===B.rel}),U=T.index(R),U===-1&&(T=T.add(R),U=T.length-1)),W||(W=X=!0,g.show(),B.returnFocus&&e(R).blur().one(c,function(){e(this).focus()}),m.css({opacity:+B.opacity,cursor:B.overlayClose?"pointer":"auto"}).show(),B.w=Z(B.initialWidth,"x"),B.h=Z(B.initialHeight,"y"),J.position(),d&&N.bind("resize."+v+" scroll."+v,function(){m.css({width:tt(),height:nt(),top:N.scrollTop(),left:N.scrollLeft()})}).trigger("resize."+v),it(u,B.onOpen),H.add(A).hide(),P.html(B.close).show()),J.load(!0))}function ut(){!g&&t.body&&(Q=!1,N=e(n),g=G(K).attr({id:i,"class":p?s+(d?"IE6":"IE"):""}).hide(),m=G(K,"Overlay",d?"position:absolute":"").hide(),L=G(K,"LoadingOverlay").add(G(K,"LoadingGraphic")),y=G(K,"Wrapper"),b=G(K,"Content").append(C=G(K,"LoadedContent","width:0; height:0; overflow:hidden"),A=G(K,"Title"),O=G(K,"Current"),_=G(K,"Next"),D=G(K,"Previous"),M=G(K,"Slideshow").bind(u,st),P=G(K,"Close")),y.append(G(K).append(G(K,"TopLeft"),w=G(K,"TopCenter"),G(K,"TopRight")),G(K,!1,"clear:left").append(E=G(K,"MiddleLeft"),b,S=G(K,"MiddleRight")),G(K,!1,"clear:left").append(G(K,"BottomLeft"),x=G(K,"BottomCenter"),G(K,"BottomRight"))).find("div div").css({"float":"left"}),k=G(K,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),H=_.add(D).add(O).add(M),e(t.body).append(m,g.append(y,k)))}function at(){return g?(Q||(Q=!0,j=w.height()+x.height()+b.outerHeight(!0)-b.height(),F=E.width()+S.width()+b.outerWidth(!0)-b.width(),I=C.outerHeight(!0),q=C.outerWidth(!0),g.css({"padding-bottom":j,"padding-right":F}),_.click(function(){J.next()}),D.click(function(){J.prev()}),P.click(function(){J.close()}),m.click(function(){B.overlayClose&&J.close()}),e(t).bind("keydown."+s,function(e){var t=e.keyCode;W&&B.escKey&&t===27&&(e.preventDefault(),J.close()),W&&B.arrowKey&&T[1]&&(t===37?(e.preventDefault(),D.click()):t===39&&(e.preventDefault(),_.click()))}),e("."+o,t).live("click",function(e){e.which>1||e.shiftKey||e.altKey||e.metaKey||(e.preventDefault(),ot(this))})),!0):!1}var r={transition:"elastic",speed:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",open:!1,returnFocus:!0,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:undefined},i="colorbox",s="cbox",o=s+"Element",u=s+"_open",a=s+"_load",f=s+"_complete",l=s+"_cleanup",c=s+"_closed",h=s+"_purge",p=!e.support.opacity&&!e.support.style,d=p&&!n.XMLHttpRequest,v=s+"_IE6",m,g,y,b,w,E,S,x,T,N,C,k,L,A,O,M,_,D,P,H,B,j,F,I,q,R,U,z,W,X,V,$,J,K="div",Q;if(e.colorbox)return;e(ut),J=e.fn[i]=e[i]=function(t,n){var s=this;t=t||{},ut();if(at()){if(!s[0]){if(s.selector)return s;s=e("<a/>"),t.open=!0}n&&(t.onComplete=n),s.each(function(){e.data(this,i,e.extend({},e.data(this,i)||r,t))}).addClass(o),(e.isFunction(t.open)&&t.open.call(s)||t.open)&&ot(s[0])}return s},J.position=function(e,t){function f(e){w[0].style.width=x[0].style.width=b[0].style.width=e.style.width,b[0].style.height=E[0].style.height=S[0].style.height=e.style.height}var n,r=0,i=0,o=g.offset(),u,a;N.unbind("resize."+s),g.css({top:-9e4,left:-9e4}),u=N.scrollTop(),a=N.scrollLeft(),B.fixed&&!d?(o.top-=u,o.left-=a,g.css({position:"fixed"})):(r=u,i=a,g.css({position:"absolute"}
4)),B.right!==!1?i+=Math.max(tt()-B.w-q-F-Z(B.right,"x"),0):B.left!==!1?i+=Z(B.left,"x"):i+=Math.round(Math.max(tt()-B.w-q-F,0)/2),B.bottom!==!1?r+=Math.max(nt()-B.h-I-j-Z(B.bottom,"y"),0):B.top!==!1?r+=Z(B.top,"y"):r+=Math.round(Math.max(nt()-B.h-I-j,0)/2),g.css({top:o.top,left:o.left}),e=g.width()===B.w+q&&g.height()===B.h+I?0:e||0,y[0].style.width=y[0].style.height="9999px",n={width:B.w+q,height:B.h+I,top:r,left:i},e===0&&g.css(n),g.dequeue().animate(n,{duration:e,complete:function(){f(this),X=!1,y[0].style.width=B.w+q+F+"px",y[0].style.height=B.h+I+j+"px",B.reposition&&setTimeout(function(){N.bind("resize."+s,J.position)},1),t&&t()},step:function(){f(this)}})},J.resize=function(e){W&&(e=e||{},e.width&&(B.w=Z(e.width,"x")-q-F),e.innerWidth&&(B.w=Z(e.innerWidth,"x")),C.css({width:B.w}),e.height&&(B.h=Z(e.height,"y")-I-j),e.innerHeight&&(B.h=Z(e.innerHeight,"y")),!e.innerHeight&&!e.height&&(C.css({height:"auto"}),B.h=C.height()),C.css({height:B.h}),J.position(B.transition==="none"?0:B.speed))},J.prep=function(t){function o(){return B.w=B.w||C.width(),B.w=B.mw&&B.mw<B.w?B.mw:B.w,B.w}function u(){return B.h=B.h||C.height(),B.h=B.mh&&B.mh<B.h?B.mh:B.h,B.h}if(!W)return;var n,r=B.transition==="none"?0:B.speed;C.remove(),C=G(K,"LoadedContent").append(t),C.hide().appendTo(k.show()).css({width:o(),overflow:B.scrolling?"auto":"hidden"}).css({height:u()}).prependTo(b),k.hide(),e(z).css({"float":"none"}),d&&e("select").not(g.find("select")).filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(l,function(){this.style.visibility="inherit"}),n=function(){function y(){p&&g[0].style.removeAttribute("filter")}var t,n,o=T.length,u,a="frameBorder",l="allowTransparency",c,d,v,m;if(!W)return;c=function(){clearTimeout($),L.detach().hide(),it(f,B.onComplete)},p&&z&&C.fadeIn(100),A.html(B.title).add(C).show();if(o>1){typeof B.current=="string"&&O.html(B.current.replace("{current}",U+1).replace("{total}",o)).show(),_[B.loop||U<o-1?"show":"hide"]().html(B.next),D[B.loop||U?"show":"hide"]().html(B.previous),B.slideshow&&M.show();if(B.preloading){t=[Y(-1),Y(1)];while(n=T[t.pop()])m=e.data(n,i),m&&m.href?(d=m.href,e.isFunction(d)&&(d=d.call(n))):d=n.href,et(d)&&(v=new Image,v.src=d)}}else H.hide();B.iframe?(u=G("iframe")[0],a in u&&(u[a]=0),l in u&&(u[l]="true"),u.name=s+ +(new Date),B.fastIframe?c():e(u).one("load",c),u.src=B.href,B.scrolling||(u.scrolling="no"),e(u).addClass(s+"Iframe").appendTo(C).one(h,function(){u.src="//about:blank"})):c(),B.transition==="fade"?g.fadeTo(r,1,y):y()},B.transition==="fade"?g.fadeTo(r,0,function(){J.position(0,n)}):J.position(r,n)},J.load=function(t){var n,r,i=J.prep;X=!0,z=!1,R=T[U],t||rt(),it(h),it(a,B.onLoad),B.h=B.height?Z(B.height,"y")-I-j:B.innerHeight&&Z(B.innerHeight,"y"),B.w=B.width?Z(B.width,"x")-q-F:B.innerWidth&&Z(B.innerWidth,"x"),B.mw=B.w,B.mh=B.h,B.maxWidth&&(B.mw=Z(B.maxWidth,"x")-q-F,B.mw=B.w&&B.w<B.mw?B.w:B.mw),B.maxHeight&&(B.mh=Z(B.maxHeight,"y")-I-j,B.mh=B.h&&B.h<B.mh?B.h:B.mh),n=B.href,$=setTimeout(function(){L.show().appendTo(b)},100),B.inline?(G(K).hide().insertBefore(e(n)[0]).one(h,function(){e(this).replaceWith(C.children())}),i(e(n))):B.iframe?i(" "):B.html?i(B.html):et(n)?(e(z=new Image).addClass(s+"Photo").error(function(){B.title=!1,i(G(K,"Error").html(B.imgError))}).load(function(){var e;z.onload=null,B.scalePhotos&&(r=function(){z.height-=z.height*e,z.width-=z.width*e},B.mw&&z.width>B.mw&&(e=(z.width-B.mw)/z.width,r()),B.mh&&z.height>B.mh&&(e=(z.height-B.mh)/z.height,r())),B.h&&(z.style.marginTop=Math.max(B.h-z.height,0)/2+"px"),T[1]&&(B.loop||T[U+1])&&(z.style.cursor="pointer",z.onclick=function(){J.next()}),p&&(z.style.msInterpolationMode="bicubic"),setTimeout(function(){i(z)},1)}),setTimeout(function(){z.src=n},1)):n&&k.load(n,B.data,function(t,n,r){i(n==="error"?G(K,"Error").html(B.xhrError):e(this).contents())})},J.next=function(){!X&&T[1]&&(B.loop||T[U+1])&&(U=Y(1),J.load())},J.prev=function(){!X&&T[1]&&(B.loop||U)&&(U=Y(-1),J.load())},J.close=function(){W&&!V&&(V=!0,W=!1,it(l,B.onCleanup),N.unbind("."+s+" ."+v),m.fadeTo(200,0),g.stop().fadeTo(300,0,function(){g.add(m).css({opacity:1,cursor:"auto"}).hide(),it(h),C.remove(),setTimeout(function(){V=!1,it(c,B.onClosed)},1)}))},J.remove=function(){e([]).add(g).add(m).remove(),g=null,e("."+o).removeData(i).removeClass(o).die()},J.element=function(){return e(R)},J.settings=r})(jQuery,document,this); 5;/*})'"*/ 6;/*})'"*/ 7(function ($) { 8 9Drupal.behaviors.initColorbox = { 10 attach: function (context, settings) { 11 if (!$.isFunction($.colorbox)) { 12 return; 13 } 14 $('a, area, input', context) 15 .filter('.colorbox') 16 .once('init-colorbox-processed') 17 .colorbox(settings.colorbox); 18 } 19}; 20 21{ 22 $(document).bind('cbox_complete', function () { 23 Drupal.attachBehaviors('#cboxLoadedContent'); 24 }); 25} 26 27})(jQuery); 28 29;/*})'"*/ 30;/*})'"*/ 31(function ($) { 32 33Drupal.behaviors.initColorboxDefaultStyle = { 34 attach: function (context, settings) { 35 $(document).bind('cbox_complete', function () { 36 // Only run if there is a title. 37 if ($('#cboxTitle:empty', context).length == false) {
38 setTimeout(function () { $('#cboxTitle', context).slideUp() }, 1500); 39 $('#cboxLoadedContent img', context).bind('mouseover', function () { 40 $('#cboxTitle', context).slideDown(); 41 }); 42 $('#cboxOverlay', context).bind('mouseover', function () { 43 $('#cboxTitle', context).slideUp(); 44 }); 45 } 46 else { 47 $('#cboxTitle', context).hide(); 48 } 49 }); 50 } 51}; 52 53})(jQuery); 54 55;/*})'"*/ 56;/*})'"*/ 57(function ($) { 58 59Drupal.behaviors.initColorboxInline = { 60 attach: function (context, settings) { 61 if (!$.isFunction($.colorbox)) { 62 return; 63 } 64 $.urlParam = function(name, url){ 65 if (name == 'fragment') { 66 var results = new RegExp('(#[^&#]*)').exec(url); 67 } 68 else { 69 var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(url); 70 } 71 if (!results) { return ''; } 72 return results[1] || ''; 73 }; 74 $('a, area, input', context).filter('.colorbox-inline').once('init-colorbox-inline-processed').colorbox({ 75 transition:settings.colorbox.transition, 76 speed:settings.colorbox.speed, 77 opacity:settings.colorbox.opacity, 78 slideshow:settings.colorbox.slideshow, 79 slideshowAuto:settings.colorbox.slideshowAuto, 80 slideshowSpeed:settings.colorbox.slideshowSpeed, 81 slideshowStart:settings.colorbox.slideshowStart, 82 slideshowStop:settings.colorbox.slideshowStop, 83 current:settings.colorbox.current, 84 previous:settings.colorbox.previous, 85 next:settings.colorbox.next, 86 close:settings.colorbox.close, 87 overlayClose:settings.colorbox.overlayClose, 88 maxWidth:settings.colorbox.maxWidth, 89 maxHeight:settings.colorbox.maxHeight, 90 innerWidth:function(){ 91 return $.urlParam('width', $(this).attr('href')); 92 }, 93 innerHeight:function(){ 94 return $.urlParam('height', $(this).attr('href')); 95 }, 96 title:function(){ 97 return decodeURIComponent($.urlParam('title', $(this).attr('href'))); 98 }, 99 iframe:function(){ 100 return $.urlParam('iframe', $(this).attr('href')); 101 }, 102 inline:function(){ 103 return $.urlParam('inline', $(this).attr('href')); 104 }, 105 href:function(){ 106 return $.urlParam('fragment', $(this).attr('href')); 107 } 108 }); 109 } 110}; 111 112})(jQuery); 113 114;/*})'"*/ 115;/*})'"*/ 116(function ($) { 117 118Drupal.behaviors.quote = { 119 attach: function() { 120 var level = Drupal.settings.quote_nest - 1; 121 if (level >= 0) { 122 var top = $('blockquote.quote-nest-1'); 123 $('blockquote.quote-msg:eq(' + level + ')', top) 124 .hide() 125 .after('<div class="quote-snip">' + Drupal.t('<a href="#">[snip]</a>') + '</div>') 126 .next('.quote-snip') 127 .children('a') 128 .click(function(e) { 129 $(this).parent().siblings('.quote-msg').toggle(); 130 e.preventDefault(); 131 }); 132 } 133 } 134}; 135 136}(jQuery)); 137 138;/*})'"*/ 139;/*})'"*/ 140(function($){ 141 $(document).ready(function(){ 142 if (Drupal.jsAC) { 143 Drupal.jsAC.prototype.hidePopup = function (keycode) { 144 if (this.selected && ((keycode && keycode != 46 && keycode != 8 && keycode != 27) || !keycode)) { 145 // select_city(this.selected.autocompleteValue); 146 select_city($(this.selected).data('autocompleteValue')); 147 } 148 // Hide popup 149 var popup = this.popup; 150 if (popup) { 151 this.popup = null; 152 $(popup).fadeOut('fast', function() { 153 $(popup).remove(); 154 }); 155 } 156 this.selected = false; 157 $(this.ariaLive).empty(); 158 }; 159 } 160 161 function select_city(v){ 162 $("#edit-pw-form-list-city-1").attr('value', v); 163 $("#edit-block-default-city").attr('value', v); 164 var url = "/pw_json_city/" + encodeURIComponent(v); 165 var informer = []; 166 jQuery.getJSON(url, function(json){ 167 if (typeof(json[0]) != 'undefined'){ 168 for(var i=1; i<=4;i++){ 169 informer[i] = '<a href="http://clck.yandex.ru/redir/dtype=stred/pid=7/cid=1228/*http://pogoda.yandex.ru/'+ json[0].id +'"><img src="http://info.weather.yandex.net/'+ json[0].id +'/'+i+'.png" border="0"/></a>'; 170 } 171 } 172 else 173 informer = 'Error!'; 174 for(var i=1; i<=4;i++){ 175 $("div.weather_widget_yandex"+i).html(informer[i]); 176 } 177 });
178 } 179 $("div.widget-size li").click(function(){ 180 $('#select-size-weather-informer li').removeClass('activ_size'); 181 var id_t = ($('#select-size-weather-informer li').index(this)) + 1; 182 $("#edit-block-size-informer-"+id_t).attr('checked', true); 183 $(this).addClass('activ_size'); 184 return false; 185 }); 186 }); 187})(jQuery); 188;/*})'"*/ 189;/*})'"*/ 190/** 191 * @file 192 * Simple responsification of menus. 193 */ 194(function ($) { 195 /** 196 * Handle clicks & toggling the menu. 197 */ 198 var toggler_click = function() { 199 $(this).parent().toggleClass('responsive-toggled'); 200 }; 201 /** 202 * Unbind other mouse events on the menu items. 203 * 204 * @todo 205 * Not sure if it works 100%. 206 * Doesn't restore binds when out-of-responsive (if window dragging). 207 */ 208 function remove_mouse_events(menuElement) { 209 // Determine jQuery version and what disable options we have. 210 var jqVersion = $.fn.jquery; 211 if (jqVersion < 1.7) { 212 $(menuElement).die('mouseover mouseout mouseenter mouseleave'); 213 $(menuElement + ' li').die('mouseover mouseout mouseenter mouseleave'); 214 $(menuElement + ' li a').die('mouseover mouseout mouseenter mouseleave'); 215 } 216 else { 217 $(menuElement).off('hover'); 218 $(menuElement + ' li').off('hover'); 219 $(menuElement + ' li a').off('hover'); 220 } 221 $(menuElement).unbind('mouseover mouseout mouseenter mouseleave'); 222 $(menuElement + ' li').unbind('mouseover mouseout mouseenter mouseleave'); 223 $(menuElement + ' li a').unbind('mouseover mouseout mouseenter mouseleave'); 224 } 225 226 /** 227 * Store classes & IDs for restoring later (if window dragging). 228 */ 229 function store_classes_ids(menuElement) { 230 if (!$(menuElement).attr('id')) { 231 $(menuElement).attr('id', 'rm-no-id-main'); 232 } 233 if (!$(menuElement).attr('class')) { 234 $(menuElement).attr('class', 'rm-no-class'); 235 } 236 $(menuElement).data('removeattr', true) 237 .data('rmids', $(menuElement).attr('id')) 238 .data('rmclasses', $(menuElement).attr('class')); 239 // Handle ULs if selector is parent div. 240 var incr = 0; 241 $(menuElement).find('ul').each(function() { 242 incr++; 243 // Prevent error if there is no id. 244 if (!$(this).attr('id')) { 245 $(this).attr('id', 'rm-no-id-' + incr); 246 } 247 // Prevent error if there is no class. 248 if (!$(this).attr('class')) { 249 $(this).attr('class', 'rm-no-class'); 250 } 251 $(this).data('removeattr', true) 252 .data('rmids', $(this).attr('id')) 253 .data('rmclasses', $(this).attr('class')); 254 }); 255 // Finally, add our class to the parent. 256 $(menuElement).addClass('responsive-menus-simple'); 257 } 258 259 /** 260 * Remove classes & IDs from original menu for easier theming. 261 */ 262 function remove_classes_ids(menuElement) { 263 // Handle ULs if selector is parent div. 264 $(menuElement).find('ul').each(function() { 265 $(this).attr('class', 'rm-removed').attr('id', 'rm-removed'); 266 }); 267 // Remove classes/IDs. 268 $(menuElement).attr('class', 'responsive-menus-simple').attr('id', 'rm-removed'); 269 } 270 271 // Iterate through selectors, check window sizes, add some classes. 272 Drupal.behaviors.responsive_menus = { 273 attach: function (context, settings) { 274 settings.responsive_menus = settings.responsive_menus || {}; 275 $('body').once('responsive-menus-load', function() { 276 // Only doing this themes that don't include a viewport attribute. 277 // e.g. Bartik for testing out-of-the-box... yeah, stupid. 278 if (!$('meta[name=viewport]').length > 0) { 279 $('head').append('<meta name="viewport" content="width=device-width, initial-scale=1.0">'); 280 } 281 // Window width with legacy browsers. 282 var windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; 283 $.each(settings.responsive_menus, function(ind, iteration) { 284 if (iteration.responsive_menus_style != 'responsive_menus_simple') { 285 return true; 286 } 287 if (!iteration.selectors.length) { 288 return true; 289 } 290 var $media_unit = iteration.media_unit || 'px'; 291 if ($media_unit === 'em') { 292 var $base_font_size = parseFloat($('body').css('font-size')); 293 var $media_size = iteration.media_size * $base_font_size || 768; 294 } 295 else { 296 var $media_size = iteration.media_size || 768; 297 } 298 299 // Handle clicks & toggling. 300 var toggler_class = ''; 301 var toggler_text = iteration.toggler_text; 302 // Iterate through our selectors. 303 $.each(iteration.selectors, function(index, value) { 304 // Stop if there is no menu element. 305 if ($(value).length < 1) { 306 return true; 307 } 308 // Handle nested menus. Make sure we get the first, but not children. 309 if ($(value).length > 1) { 310 $(value).each(function(val_index) { 311 if (!$(this).parents('ul').length) { 312 if (!$(this).hasClass('responsive-menus-simple')) { 313 toggler_class = 'responsive-menus-' + ind + '-' + index + '-' + val_index; 314 // Store classes & IDs before removing. 315 if (iteration.remove_attributes) { 316 store_classes_ids(this); 317 } 318 $(this).wrap('<div data-mediasize="' + $media_size + '" class="responsive-menus ' + toggler_class + '" />'); 319 $('.' + toggler_class).prepend('<span class="toggler">' + toggler_text + '</span>'); 320 $('.' + toggler_class + ' .toggler').bind('click', toggler_click);
321 // Unbind other mouse events. 322 if (iteration.disable_mouse_events) { 323 //$(this).data('disablemouse', true); 324 remove_mouse_events(this); 325 } 326 // Use absolute positioning. 327 if (iteration.absolute) { 328 $('.' + toggler_class).addClass('absolute'); 329 } 330 // Handle first size check. 331 if (windowWidth <= $media_size) { 332 // Remove attributes setting. 333 if (iteration.remove_attributes) { 334 remove_classes_ids(this); 335 } 336 $('.' + toggler_class).addClass('responsified'); 337 } 338 } 339 } 340 }); 341 } 342 else { 343 // Single level menus. 344 if (!$(value).hasClass('responsive-menus-simple')) { 345 toggler_class = 'responsive-menus-' + ind + '-' + index; 346 // Store classes & IDs before removing. 347 if (iteration.remove_attributes) { 348 store_classes_ids(value); 349 } 350 $(value).wrap('<div data-mediasize="' + $media_size + '" class="responsive-menus ' + toggler_class + '" />'); 351 $('.' + toggler_class).prepend('<span class="toggler">' + toggler_text + '</span>'); 352 $('.' + toggler_class + ' .toggler').bind('click', toggler_click); 353 // Unbind other mouse events. 354 if (iteration.disable_mouse_events) { 355 // @todo For rebinding mouse events. 356 /*if ($(value + ' li a').data('events')) { 357 $(value).data('tmpevents', $(value + ' li a').data('events')); 358 }*/ 359 remove_mouse_events(value); 360 } 361 // Use absolute positioning. 362 if (iteration.absolute) { 363 $('.' + toggler_class).addClass('absolute'); 364 } 365 // Handle first size check. 366 if (windowWidth <= $media_size) { 367 // Remove attributes setting. 368 if (iteration.remove_attributes) { 369 remove_classes_ids(value); 370 } 371 $('.' + toggler_class).addClass('responsified'); 372 } 373 } 374 } 375 }); 376 }); 377 // Handle window resizing. 378 $(window).resize(function() {
379 // Window width with legacy browsers. 380 windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; 381 $('.responsive-menus').each(function(menuIndex, menuValue) { 382 var mediasize = $(this).data('mediasize') || 768; 383 // Prevent menu from going off the screen. This only happens in 384 // non-responsive themes (like Bartik default), but it looks bad. 385 if ($(this).width() > windowWidth) { 386 $(this).data('nonresponsive', true); 387 $(this).width(windowWidth); 388 } 389 var menuElement = $(this).find('.responsive-menus-simple'); 390 if (windowWidth >= mediasize) { 391 if (menuElement.data('removeattr')) { 392 menuElement.addClass(menuElement.data('rmclasses')); 393 menuElement.attr('id', menuElement.data('rmids')); 394 menuElement.find('ul').each(function() { 395 $(this).addClass($(this).data('rmclasses')); 396 $(this).attr('id', $(this).data('rmids')); 397 }); 398 } 399 $(this).removeClass('responsified'); 400 } 401 if (windowWidth <= mediasize) { 402 // Now fix repercussions for handling non-responsive themes above. 403 // Stretch width back out w/ the screen. 404 if ($(this).data('nonresponsive') && $(this).width() < windowWidth) { 405 $(this).width(windowWidth); 406 } 407 if (menuElement.data('removeattr')) { 408 remove_classes_ids(menuElement); 409 } 410 $(this).addClass('responsified'); 411 } 412 }); 413 }); 414 }); 415 } 416 }; 417 418}(jQuery)); 419 420;/*})'"*/ 421;/*})'"*/ 422(function ($) { 423 424/** 425 * Toggle the visibility of a fieldset using smooth animations. 426 */ 427Drupal.toggleFieldset = function (fieldset) { 428 var $fieldset = $(fieldset); 429 if ($fieldset.is('.collapsed')) { 430 var $content = $('> .fieldset-wrapper', fieldset).hide(); 431 $fieldset 432 .removeClass('collapsed') 433 .trigger({ type: 'collapsed', value: false }) 434 .find('> legend span.fieldset-legend-prefix').html(Drupal.t('Hide')); 435 $content.slideDown({ 436 duration: 'fast', 437 easing: 'linear', 438 complete: function () { 439 Drupal.collapseScrollIntoView(fieldset); 440 fieldset.animating = false; 441 }, 442 step: function () { 443 // Scroll the fieldset into view. 444 Drupal.collapseScrollIntoView(fieldset); 445 } 446 }); 447 } 448 else { 449 $fieldset.trigger({ type: 'collapsed', value: true }); 450 $('> .fieldset-wrapper', fieldset).slideUp('fast', function () { 451 $fieldset 452 .addClass('collapsed') 453 .find('> legend span.fieldset-legend-prefix').html(Drupal.t('Show')); 454 fieldset.animating = false; 455 }); 456 } 457}; 458 459/** 460 * Scroll a given fieldset into view as much as possible. 461 */ 462Drupal.collapseScrollIntoView = function (node) { 463 var h = document.documentElement.clientHeight || document.body.clientHeight || 0; 464 var offset = document.documentElement.scrollTop || document.body.scrollTop || 0; 465 var posY = $(node).offset().top; 466 var fudge = 55; 467 if (posY + node.offsetHeight + fudge > h + offset) { 468 if (node.offsetHeight > h) { 469 window.scrollTo(0, posY); 470 } 471 else { 472 window.scrollTo(0, posY + node.offsetHeight - h + fudge); 473 } 474 } 475}; 476 477Drupal.behaviors.collapse = { 478 attach: function (context, settings) { 479 $('fieldset.collapsible', context).once('collapse', function () { 480 var $fieldset = $(this); 481 // Expand fieldset if there are errors inside, or if it contains an 482 // element that is targeted by the URI fragment identifier. 483 var anchor = location.hash && location.hash != '#' ? ', ' + location.hash : ''; 484 if ($fieldset.find('.error' + anchor).length) { 485 $fieldset.removeClass('collapsed'); 486 } 487 488 var summary = $('<span class="summary"></span>'); 489 $fieldset. 490 bind('summaryUpdated', function () { 491 var text = $.trim($fieldset.drupalGetSummary());
492 summary.html(text ? ' (' + text + ')' : ''); 493 }) 494 .trigger('summaryUpdated'); 495 496 // Turn the legend into a clickable link, but retain span.fieldset-legend 497 // for CSS positioning. 498 var $legend = $('> legend .fieldset-legend', this); 499 500 $('<span class="fieldset-legend-prefix element-invisible"></span>') 501 .append($fieldset.hasClass('collapsed') ? Drupal.t('Show') : Drupal.t('Hide')) 502 .prependTo($legend) 503 .after(' '); 504 505 // .wrapInner() does not retain bound events. 506 var $link = $('<a class="fieldset-title" href="#"></a>') 507 .prepend($legend.contents()) 508 .appendTo($legend) 509 .click(function () { 510 var fieldset = $fieldset.get(0); 511 // Don't animate multiple times. 512 if (!fieldset.animating) { 513 fieldset.animating = true; 514 Drupal.toggleFieldset(fieldset); 515 } 516 return false; 517 }); 518 519 $legend.append(summary); 520 }); 521 } 522}; 523 524})(jQuery); 525 526;/*})'"*/ 527;/*})'"*/ 528/** 529 * @file 530 * Unlock protected forms by resetting the form action to the path that 531 * it should be, only if the current user is verified to be human. 532 */ 533(function ($) { 534 Drupal.antibot = {}; 535 536 Drupal.behaviors.antibot = { 537 attach: function (context) { 538 // Assume the user is not human, despite JS being enabled. 539 Drupal.settings.antibot.human = false; 540 541 // Wait for a mouse to move, indicating they are human. 542 $('body').mousemove(function() { 543 // Unlock the forms. 544 Drupal.antibot.unlockForms(); 545 }); 546 547 // Wait for a touch move event, indicating that they are human. 548 $('body').bind('touchmove', function() { 549 // Unlock the forms. 550 Drupal.antibot.unlockForms(); 551 }); 552 553 // A tab or enter key pressed can also indicate they are human. 554 $('body').keydown(function(e) { 555 if ((e.keyCode == 9) || (e.keyCode == 13)) { 556 // Unlock the forms. 557 Drupal.antibot.unlockForms(); 558 } 559 }); 560 } 561 }; 562 563 /** 564 * Revert the action on the protected forms to what it was originally 565 * set to. 566 */ 567 Drupal.antibot.unlockForms = function() { 568 // Act only if we haven't yet verified this user as being human. 569 if (!Drupal.settings.antibot.human) { 570 // Iterate all antibot forms that we need to unlock. 571 for (var id in Drupal.settings.antibot.forms) { 572 // Switch the action to the original value. 573 $('form#' + id).attr('action', Drupal.settings.antibot.forms[id].action); 574 575 // Check if a key is required. 576 if (Drupal.settings.antibot.forms[id].key) { 577 // Inject the key value. 578 $('form#' + id).find('input[name="antibot_key"]').val(Drupal.settings.antibot.forms[id].key); 579 } 580 } 581 // Mark this user as being human. 582 Drupal.settings.antibot.human = true; 583 } 584 }; 585 586})(jQuery); 587 588;/*})'"*/ 589;/*})'"*/ 590(function ($) { 591 592Drupal.behaviors.agrobook = { 593 attach: function (context, settings) { 594 595 /* banners width */ 596 const bannerSelector = '.block-marketing'; 597 const bannerWidth = function (elem, container) { 598 599 function setWidth() { 600 let widthBanner = ($(window).width() - $(container).outerWidth()) / 2; 601 $(elem).css('width', widthBanner + 'px'); 602 }; 603 604 setWidth(); 605 $(window).on('resize', setWidth); 606 }; 607 608 bannerWidth(bannerSelector, '.zone-content'); 609 610 /* banner fixed by scroll */ 611 const bannerFixed = function (elem, offseTop, elemFooter) { 612 let elemTop = offseTop; 613 let elemHeight = $(elem).height(); 614 let footerTop = $(elemFooter).offset().top; 615 616 function scrollBy() { 617 let scrollTop = $(window).scrollTop(); 618 619 if (scrollTop + elemHeight > footerTop) { 620 $(elem).css({ 621 'position': 'absolute', 622 'top': 'auto', 623 'bottom': '0', 624 }); 625 } else if (scrollTop > elemTop) { 626 $(elem).css({ 627 'position': 'fixed', 628 'top': '0', 629 'bottom': 'auto', 630 }); 631 } else { 632 $(elem).css({ 633 'position': 'absolute', 634 'top': '114px', 635 'bottom': 'auto', 636 }); 637 } 638 }; 639 640 scrollBy(); 641 $(window).on('scroll', scrollBy); 642 }; 643 644 setTimeout(function() { 645 if ($(bannerSelector).length) { 646 const offsetTop = $(bannerSelector).offset().top; 647 bannerFixed(bannerSelector, offsetTop, '.section-footer'); 648 } 649 }, 2000); 650}}; 651 652}(jQuery)); 653 654 655;/*})'"*/ 656;/*})'"*/ 657/* 658 Formalize - version 1.1 659 660 Note: This file depends on the jQuery library. 661*/ 662 663// Module pattern: 664// http://yuiblog.com/blog/2007/06/12/module-pattern 665var FORMALIZE = (function($, window, document, undefined) { 666 // Private constants. 667 var PLACEHOLDER_SUPPORTED = 'placeholder' in document.createElement('input'); 668 var AUTOFOCUS_SUPPORTED = 'autofocus' in document.createElement('input'); 669 var IE6 = !!($.browser.msie && parseInt($.browser.version, 10) === 6); 670 var IE7 = !!($.browser.msie && parseInt($.browser.version, 10) === 7); 671 672 // Expose innards of FORMALIZE. 673 return { 674 // FORMALIZE.go 675 go: function() { 676 for (var i in FORMALIZE.init) { 677 FORMALIZE.init[i](); 678 } 679 }, 680 // FORMALIZE.init 681 init: { 682 // FORMALIZE.init.ie6_skin_inputs 683 ie6_skin_inputs: function() { 684 // Test for Internet Explorer 6. 685 if (!IE6 || !$('input, select, textarea').length) { 686 // Exit if the browser is not IE6, 687 // or if no form elements exist. 688 return; 689 } 690 691 // For <input type="submit" />, etc. 692 var button_regex = /button|submit|reset/; 693 694 // For <input type="text" />, etc. 695 var type_regex = /date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/; 696 697 $('input').each(function() { 698 var el = $(this); 699 700 // Is it a button? 701 if (this.getAttribute('type').match(button_regex)) { 702 el.addClass('ie6-button'); 703 704 /* Is it disabled? */ 705 if (this.disabled) { 706 el.addClass('ie6-button-disabled'); 707 } 708 } 709 // Or is it a textual input? 710 else if (this.getAttribute('type').match(type_regex)) { 711 el.addClass('ie6-input'); 712 713 /* Is it disabled? */ 714 if (this.disabled) { 715 el.addClass('ie6-input-disabled'); 716 } 717 } 718 }); 719 720 $('textarea, select').each(function() { 721 /* Is it disabled? */ 722 if (this.disabled) { 723 $(this).addClass('ie6-input-disabled'); 724 } 725 }); 726 }, 727 // FORMALIZE.init.autofocus 728 autofocus: function() { 729 if (AUTOFOCUS_SUPPORTED || !$(':input[autofocus]').length) { 730 return; 731 } 732 733 $(':input[autofocus]:visible:first').focus(); 734 }, 735 // FORMALIZE.init.placeholder 736 placeholder: function() { 737 if (PLACEHOLDER_SUPPORTED || !$(':input[placeholder]').length) { 738 // Exit if placeholder is supported natively, 739 // or if page does not have any placeholder. 740 return; 741 } 742 743 FORMALIZE.misc.add_placeholder(); 744 745 $(':input[placeholder]').each(function() { 746 var el = $(this); 747 var text = el.attr('placeholder'); 748 749 el.focus(function() { 750 if (el.val() === text) { 751 el.val('').removeClass('placeholder-text'); 752 } 753 }).blur(function() { 754 FORMALIZE.misc.add_placeholder(); 755 }); 756 757 // Prevent <form> from accidentally 758 // submitting the placeholder text. 759 el.closest('form').submit(function() { 760 if (el.val() === text) { 761 el.val('').removeClass('placeholder-text'); 762 } 763 }).bind('reset', function() { 764 setTimeout(FORMALIZE.misc.add_placeholder, 50); 765 }); 766 }); 767 } 768 }, 769 // FORMALIZE.misc 770 misc: { 771 // FORMALIZE.misc.add_placeholder 772 add_placeholder: function() { 773 if (PLACEHOLDER_SUPPORTED || !$(':input[placeholder]').length) { 774 // Exit if placeholder is supported natively, 775 // or if page does not have any placeholder. 776 return; 777 } 778 779 $(':input[placeholder]').each(function() { 780 var el = $(this); 781 var text = el.attr('placeholder'); 782 783 if (!el.val() || el.val() === text) { 784 el.val(text).addClass('placeholder-text'); 785 } 786 }); 787 } 788 } 789 }; 790// Alias jQuery, window, document. 791})(jQuery, this, this.document); 792 793// Automatically calls all functions in FORMALIZE.init 794jQuery(document).ready(function() { 795 FORMALIZE.go(); 796}); 797;/*})'"*/ 798;/*})'"*/ 799jQuery(document).ready(function() { 800 equalheight = function(container){ 801 802 var currentTallest = 0, 803 currentRowStart = 0, 804 rowDivs = new Array(), 805 el, 806 topPosition = 0; 807 jQuery(container).each(function() { 808 809 el = jQuery(this); 810 jQuery(el).height('auto') 811 topPostion = el.position().top; 812 813 if (currentRowStart != topPostion) { 814 for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) { 815 rowDivs[currentDiv].height(currentTallest); 816 } 817 rowDivs.length = 0; // empty the array 818 currentRowStart = topPostion; 819 currentTallest = el.height(); 820 rowDivs.push(el); 821 } else { 822 rowDivs.push(el); 823 currentTallest = (currentTallest < el.height()) ? (el.height()) : (currentTallest); 824 } 825 for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) { 826 rowDivs[currentDiv].height(currentTallest); 827 } 828 }); 829 } 830 831 jQuery(window).load(function() { 832 equalheight('.equalheight'); 833 }); 834 835 836 jQuery(window).resize(function(){ 837 equalheight('.equalheight'); 838 }); 839 840 jQuery(window).resize(); 841 842 // sticky footer plugin 843 var footer; 844 845 jQuery.fn.extend({ 846 stickyFooter: function(options) { 847 footer = this; 848 849 positionFooter(); 850 851 jQuery(window) 852 .scroll(positionFooter) 853 .resize(positionFooter); 854 855 function positionFooter() { 856 var docHeight = jQuery(document.body).height() - jQuery("#sticky-footer-push").height(); 857 if(docHeight < jQuery(window).height()){ 858 var diff = jQuery(window).height() - docHeight; 859 if (!jQuery("#sticky-footer-push").length > 0) { 860 jQuery(footer).before('<div id="sticky-footer-push"></div>'); 861 } 862 jQuery("#sticky-footer-push").height(diff); 863 } 864 } 865 } 866 }); 867 868 jQuery("#page > footer").stickyFooter(); 869 jQuery('#forum-table-2 .forum-icon, #forum-table-2 .forum-image').remove(); 870 jQuery('.node-type-gallery .tabs.primary li:nth-child(2) a').text('РедакÑиÑоваÑÑ / ÐобавиÑÑ ÑоÑо'); 871 //tabs primary 872 /* 873 jQuery('a[rel="nofollow"]').click(function(){ 874 window.open(this.href, ""); 875 return false;
876 }); 877 */ 878 jQuery('a[rel="nofollow"]').each(function(){ 879 if(this.host!="agrobook.ru" || this.host!="www.agrobook.ru") jQuery(this).attr("target","_blank") 880 }) 881 /* 882 jQuery('a[href^="http://"], a[href^="https://"]').bind('click', function() { 883 this.target = '_blank'; 884 });*/ 885}); 886;/*})'"*/ 887;/*})'"*/ 888/** 889 * @todo 890 */ 891 892Drupal.omega = Drupal.omega || {}; 893 894(function($) { 895 /** 896 * @todo 897 */ 898 var current; 899 var previous; 900 901 /** 902 * @todo 903 */ 904 var setCurrentLayout = function (index) { 905 index = parseInt(index); 906 previous = current; 907 current = Drupal.settings.omega.layouts.order.hasOwnProperty(index) ? Drupal.settings.omega.layouts.order[index] : 'mobile'; 908 909 if (previous != current) { 910 $('body').removeClass('responsive-layout-' + previous).addClass('responsive-layout-' + current); 911 $.event.trigger('responsivelayout', {from: previous, to: current}); 912 } 913 }; 914 915 /** 916 * @todo 917 */ 918 Drupal.omega.getCurrentLayout = function () { 919 return current; 920 }; 921 922 /** 923 * @todo 924 */ 925 Drupal.omega.getPreviousLayout = function () { 926 return previous; 927 }; 928 929 /** 930 * @todo 931 */ 932 Drupal.omega.crappyBrowser = function () { 933 return $.browser.msie && parseInt($.browser.version, 10) < 9; 934 }; 935 936 /** 937 * @todo 938 */ 939 Drupal.omega.checkLayout = function (layout) { 940 if (Drupal.settings.omega.layouts.queries.hasOwnProperty(layout) && Drupal.settings.omega.layouts.queries[layout]) { 941 var output = Drupal.omega.checkQuery(Drupal.settings.omega.layouts.queries[layout]); 942 943 if (!output && layout == Drupal.settings.omega.layouts.primary) { 944 var dummy = $('<div id="omega-check-query"></div>').prependTo('body'); 945 946 dummy.append('<style media="all">#omega-check-query { position: relative; z-index: -1; }</style>'); 947 dummy.append('<!--[if (lt IE 9)&(!IEMobile)]><style media="all">#omega-check-query { z-index: 100; }</style><![endif]-->'); 948 949 output = parseInt(dummy.css('z-index')) == 100; 950 951 dummy.remove(); 952 } 953 954 return output; 955 } 956 957 return false; 958 }; 959 960 /** 961 * @todo 962 */ 963 Drupal.omega.checkQuery = function (query) { 964 var dummy = $('<div id="omega-check-query"></div>').prependTo('body'); 965 966 dummy.append('<style media="all">#omega-check-query { position: relative; z-index: -1; }</style>'); 967 dummy.append('<style media="' + query + '">#omega-check-query { z-index: 100; }</style>'); 968 969 var output = parseInt(dummy.css('z-index')) == 100; 970 971 dummy.remove(); 972 973 return output; 974 }; 975 976 /** 977 * @todo 978 */ 979 Drupal.behaviors.omegaMediaQueries = { 980 attach: function (context) { 981 $('body', context).once('omega-mediaqueries', function () { 982 var primary = $.inArray(Drupal.settings.omega.layouts.primary, Drupal.settings.omega.layouts.order); 983 var dummy = $('<div id="omega-media-query-dummy"></div>').prependTo('body'); 984 985 dummy.append('<style media="all">#omega-media-query-dummy { position: relative; z-index: -1; }</style>'); 986 dummy.append('<!--[if (lt IE 9)&(!IEMobile)]><style media="all">#omega-media-query-dummy { z-index: ' + primary + '; }</style><![endif]-->'); 987 988 for (var i in Drupal.settings.omega.layouts.order) { 989 dummy.append('<style media="' + Drupal.settings.omega.layouts.queries[Drupal.settings.omega.layouts.order[i]] + '">#omega-media-query-dummy { z-index: ' + i + '; }</style>'); 990 } 991 992 $(window).bind('resize.omegamediaqueries', function () { 993 setCurrentLayout(dummy.css('z-index')); 994 }).load(function () { 995 $(this).trigger('resize.omegamediaqueries'); 996 }); 997 }); 998 } 999 }; 1000})(jQuery); 1001;/*})'"*/ 1002;/*})'"*/ 1003(function ($) { 1004 1005$(document).ready(function(){ 1006// resizeBanner(); 1007}); 1008 1009$(window).resize(function() { 1010 //resizeBanner(); 1011}); 1012 1013 1014function resizeBanner() { 1015 var block_width = (window.innerWidth - 1280)/2; 1016 $('#block-block-45, #block-block-46').css('width', block_width); 1017} 1018 1019}(jQuery)); 1020 1021 1022;/*})'"*/ 1023;/*})'"*/
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.