Drupal.locale = { 'pluralFormula': function ($n) { return Number((((($n%10)==1)&&(($n%100)!=11))?(0):((((($n%10)>=2)&&(($n%10)<=4))&&((($n%100)<10)||(($n%100)>=20)))?(1):2))); }, 'strings': {"":{"An AJAX HTTP error occurred.":"\u0412\u043e\u0437\u043d\u0438\u043a\u043b\u0430 AJAX HTTP \u043e\u0448\u0438\u0431\u043a\u0430.","HTTP Result Code: !status":"\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 HTTP: !status","An AJAX HTTP request terminated abnormally.":"HTTP \u0437\u0430\u043f\u0440\u043e\u0441 AJAX \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e.","Debugging information follows.":"\u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f.","Path: !uri":"\u041f\u0443\u0442\u044c: !uri","StatusText: !statusText":"\u0422\u0435\u043a\u0441\u0442 \u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f: !statusText","ResponseText: !responseText":"\u0422\u0435\u043a\u0441\u0442 \u041e\u0442\u0432\u0435\u0442\u0430: !responseText","ReadyState: !readyState":"ReadyState: !readyState","Hide":"\u0421\u043a\u0440\u044b\u0442\u044c","Show":"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c","Show shortcuts":"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0432\u0438\u0448","Hide shortcuts":"\u0421\u043a\u0440\u044b\u0442\u044c \u044f\u0440\u043b\u044b\u043a\u0438","Edit":"\u041f\u0440\u0430\u0432\u043a\u0430","(active tab)":"(\u0430\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0432\u043a\u043b\u0430\u0434\u043a\u0430)","Requires a title":"\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","Not published":"\u041d\u0435 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043e","Don\u0027t display post information":"\u041d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430","Re-order rows by numerical weight instead of dragging.":"\u0423\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u043e \u0432\u0435\u0441\u0443 \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u043d\u0438\u044f.","Show row weights":"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0435\u0441 \u0441\u0442\u0440\u043e\u043a","Hide row weights":"\u0421\u043a\u0440\u044b\u0442\u044c \u0432\u0435\u0441 \u0441\u0442\u0440\u043e\u043a","Drag to re-order":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043c\u043e\u0436\u043d\u043e, \u043f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0432 \u043f\u0443\u043d\u043a\u0442 \u043c\u044b\u0448\u043a\u043e\u0439.","Changes made in this table will not be saved until the form is submitted.":"\u0421\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0435 \u0432\u0441\u0442\u0443\u043f\u044f\u0442 \u0432 \u0441\u0438\u043b\u0443, \u043f\u043e\u043a\u0430 \u0432\u044b \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0438\u0445.","Loading token browser...":"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u043c\u0435\u0442\u043e\u043a...","Available tokens":"\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0442\u043e\u043a\u0435\u043d\u044b","Insert this token into your form":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0442\u043e\u043a\u0435\u043d \u0432 \u0432\u0430\u0448\u0443 \u0444\u043e\u0440\u043c\u0443","First click a text field to insert your tokens into.":"\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043b\u0438\u043a\u043d\u0438\u0442\u0435 \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c\u0442\u043e\u043a\u0435\u043d\u044b.","Hide summary":"\u0421\u043a\u0440\u044b\u0442\u044c \u0430\u043d\u043e\u043d\u0441","Edit summary":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u043d\u043e\u043d\u0441","New revision":"\u041d\u043e\u0432\u0430\u044f \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f","No revision":"\u041d\u0435\u0442 \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u0438","By @name on @date":"@name, @date","By @name":"@name","Automatic alias":"\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0438\u043d\u043e\u043d\u0438\u043c","Alias: @alias":"\u0421\u0438\u043d\u043e\u043d\u0438\u043c: @alias","No alias":"\u0421\u0438\u043d\u043e\u043d\u0438\u043c \u043d\u0435 \u0437\u0430\u0434\u0430\u043d","Autocomplete popup":"\u0412\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0435\u0435 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435","Searching for matches...":"\u041f\u043e\u0438\u0441\u043a \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439...","Configure":"\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c","Please wait...":"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u043e\u0436\u0434\u0438\u0442\u0435...","Enabled":"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e","Select all rows in this table":"\u041e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b","Deselect all rows in this table":"\u0421\u043d\u044f\u0442\u044c \u043e\u0442\u043c\u0435\u0442\u043a\u0443 \u0441\u043e \u0432\u0441\u0435\u0445 \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u044b","Add":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c","Cancel":"\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c","Other":"\u041f\u0440\u043e\u0447\u0438\u0435","Disabled":"\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e","Not restricted":"\u0411\u0435\u0437 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439","Restricted to certain pages":"\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446","Not customizable":"\u041d\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0439","The changes to these blocks will not be saved until the \u003Cem\u003ESave blocks\u003C\/em\u003E button is clicked.":"\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0435 \u0432 \u0431\u043b\u043e\u043a\u0430\u0445 \u043d\u0435 \u0432\u0441\u0442\u0443\u043f\u044f\u0442 \u0432 \u0441\u0438\u043b\u0443 \u043f\u043e\u043a\u0430 \u0432\u044b \u043d\u0435 \u043d\u0430\u0436\u043c\u0435\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 \u003Cem\u003E\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0431\u043b\u043e\u043a\u0438\u003C\/em\u003E.","The block cannot be placed in this region.":"\u0411\u043b\u043e\u043a \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0449\u0451\u043d \u0432 \u044d\u0442\u043e\u043c \u0440\u0435\u0433\u0438\u043e\u043d\u0435.","@count min":"@count \u043c\u0438\u043d\u0443\u0442\u044b","@count sec":"@count \u0441\u0435\u043a\u0443\u043d\u0434\u044b","Thursday":"\u0447\u0435\u0442\u0432\u0435\u0440\u0433","@count years":"@count \u0433\u043e\u0434\u0430","@count months":"@count \u043c\u0435\u0441\u044f\u0446\u0430","Remove group":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u0435","Apply (all displays)":"\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c (\u0432\u0441\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f)","Revert to default":"\u0412\u0435\u0440\u043d\u0443\u0442\u044c \u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e","Apply (this display)":"\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c (\u044d\u0442\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435)","Saturday":"\u0441\u0443\u0431\u0431\u043e\u0442\u0430","1 hour":"@count \u0447\u0430\u0441","Upload":"\u0417\u0430\u043a\u0430\u0447\u0430\u0442\u044c","The selected file %filename cannot be uploaded. Only files with the following extensions are allowed: %extensions.":"\u0412\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b %filename \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f\u043c\u0438: %extensions.","1 sec":"@count \u0441\u0435\u043a\u0443\u043d\u0434\u0430","0 sec":"0 \u0441\u0435\u043a","Friday":"\u043f\u044f\u0442\u043d\u0438\u0446\u0430","Sunday":"\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435","Monday":"\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a","Tuesday":"\u0432\u0442\u043e\u0440\u043d\u0438\u043a","Wednesday":"\u0441\u0440\u0435\u0434\u0430","OK":"\u041e\u041a","1 min":"@count \u043c\u0438\u043d\u0443\u0442\u0430","Not in menu":"\u041d\u0435 \u0432 \u043c\u0435\u043d\u044e","@count days":"@count \u0434\u043d\u044f","@count hours":"@count \u0447\u0430\u0441\u0430","This permission is inherited from the authenticated user role.":"\u042d\u0442\u043e \u043f\u0440\u0430\u0432\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 \u0440\u043e\u043b\u0438 \u00ab\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u00bb.","Done":"\u0413\u043e\u0442\u043e\u0432\u043e","Prev":"\u041d\u0430\u0437\u0430\u0434","Next":"\u0414\u0430\u043b\u0435\u0435","Today":"\u0421\u0435\u0433\u043e\u0434\u043d\u044f","January":"\u044f\u043d\u0432\u0430\u0440\u044f","February":"\u0444\u0435\u0432\u0440\u0430\u043b\u044f","March":"\u043c\u0430\u0440\u0442\u0430","April":"\u0430\u043f\u0440\u0435\u043b\u044f","June":"\u0438\u044e\u043d\u044c","July":"\u0438\u044e\u043b\u044f","August":"\u0430\u0432\u0433\u0443\u0441\u0442\u0430","September":"\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f","October":"\u043e\u043a\u0442\u044f\u0431\u0440\u044f","November":"\u043d\u043e\u044f\u0431\u0440\u044f","December":"\u0434\u0435\u043a\u0430\u0431\u0440\u044f","Nov":"Nov","Su":"\u0412\u0441","Mo":"\u041f\u043d","Tu":"\u0412\u0442","We":"\u0421\u0440","Th":"\u0427\u0442","Fr":"\u041f\u0442","Sa":"\u0421\u0431","mm\/dd\/yy":"mm\/dd\/yy","@number comments per page":"@number \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443","1 day":"@count \u0434\u0435\u043d\u044c","1 week":"@count \u043d\u0435\u0434\u0435\u043b\u044f","@count weeks":"@count \u043d\u0435\u0434\u0435\u043b\u0438","1 month":"@count \u043c\u0435\u0441\u044f\u0446","none":"\u043d\u0435\u0442","Submit":"\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c","1 year":"@count \u0433\u043e\u0434","An error occurred":"\u0412\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430","Select all children":"\u0412\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0441\u0435\u0445 \u043f\u043e\u0442\u043e\u043c\u043a\u043e\u0432","Close":"\u0417\u0430\u043a\u0440\u044b\u0442\u044c","all":"\u0432\u0441\u0435","Select":"\u0412\u044b\u0431\u0440\u0430\u0442\u044c","@count year from now":"@count \u0433\u043e\u0434 \u043e\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430","@count years from now":"@count \u0433\u043e\u0434\u0430 \u043e\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430","Only files with the following extensions are allowed: %files-allowed.":"\u041f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u044f\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u044b \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f\u043c\u0438: %files-allowed.","No nodes in this queue.":"\u041d\u0435\u0442 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u0432 \u044d\u0442\u043e\u043c \u0441\u043f\u0438\u0441\u043a\u0435","Not scheduled":"\u041d\u0435 \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043e","Publishing enabled":"\u041f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430","Unpublishing enabled":"\u0421\u043d\u044f\u0442\u0438\u0435 \u0441 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e","Using defaults":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e","Inclusion: @value":"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435: @value","Priority: @value":"\u041f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442: @value","Log messages":"\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u043b\u043e\u0433","Please select a file.":"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043b.","You are not allowed to operate on more than %num files.":"\u0412\u0430\u043c \u043d\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u043c \u0441 %num \u0444\u0430\u0439\u043b\u0430\u043c\u0438.","Please specify dimensions within the allowed range that is from 1x1 to @dimensions.":"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u043d\u0443\u0442\u0440\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0451\u043d\u043d\u043e\u0433\u043e \u0434\u0438\u0430\u043f\u043e\u0437\u043e\u043d\u0430 \u043e\u0442 1x1 \u0434\u043e @dimensions.","%filename is not an image.":"\u0424\u0430\u0439\u043b %filename \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c.","Do you want to refresh the current directory?":"\u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u043f\u0430\u043f\u043a\u0443?","Delete selected files?":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b?","Please select a thumbnail.":"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043c\u0438\u043d\u0438\u0430\u0442\u044e\u0440\u0443.","You must select at least %num files.":"\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 %num \u0444\u0430\u0439\u043b\u043e\u0432.","You can not perform this operation.":"\u0412\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u044d\u0442\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e.","Insert file":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0444\u0430\u0439\u043b","Change view":"\u0421\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0438\u0434"}} };; /** * Provides the ability to fix a html block to a position on the page when the * browser is scroled. * * This code is based on tableheader.js */ (function ($) { Drupal.blockFloatStack = function() { if( typeof Drupal.blockFloatStack.blocks == 'undefined' ) { Drupal.blockFloatStack.blocks = []; } return Drupal.blockFloatStack.blocks; } /** * Attaches the floating_block behavior. */ Drupal.behaviors.blockFloat = { attach: function (context) { var settings = Drupal.settings.floating_block; // This breaks in anything less than IE 7. Prevent it from running. if ($.browser.msie && parseInt($.browser.version, 10) < 7) { return; } // If this behaviour is being called as part of processing an ajax callback. if (jQuery.isFunction(context.parent)) { context = context.parent(); } // Cycle through all of the blocks we want to float. $.each(settings, function (selector, setting) { // The format of a select is [float]|[container] where: // [float] is the jQuery selector of thing you want to stay on screen // [container] is the jQuery selector of container that defines a boundary // not to float outside of. $(selector.toString() + ':not(.blockFloat-processed)', context).each(function (j, block) { // Store information about the block to float. var blockInfo = []; blockInfo.original_css = []; blockInfo.original_css.left = Drupal.blockFloatCleanCSSValue($(block).css('left')); blockInfo.original_css.top = Drupal.blockFloatCleanCSSValue($(block).css('top')); blockInfo.original_css.position = $(block).css("position"); blockInfo.floating = false; blockInfo.reset = true; blockInfo.original_identifier = 'blockFloat-' + Drupal.blockFloatStack().length; // Store the selector for the container if it exists. if (setting.container && $(setting.container.toString()).length > 0) { blockInfo.container = setting.container; } if (setting.padding_top) { blockInfo.padding_top = setting.padding_top; } else { blockInfo.padding_top = 0; } if (setting.padding_bottom) { blockInfo.padding_bottom = setting.padding_bottom; } else { blockInfo.padding_bottom = 0; } // Fix the width of the block as often a block will be 100% of it's // container. This ensures that when it's floated it will keep it's // original width. There is no point using .css('width') as this will // return the computed value so we might as well just set it. $(block).width($(block).width()); // Add class to block to indicate that we're done and give // Drupal.blockFloatTracker a certain way to identify the block. $(block).addClass('blockFloat-processed ' + blockInfo.original_identifier); // If the page loaded has already been scrolled calling // Drupal.blockFloatTracker will float the block if necessary. Drupal.blockFloatTracker(blockInfo); // Store the block in the floating_blocks array. Drupal.blockFloatStack().push(blockInfo); }); }); } } /** * Function that calculates whether or not the block should be floated. */ Drupal.blockFloatTracker = function (blockInfo) { // Save positioning data. var scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight; var block = $('.' + blockInfo.original_identifier); if (block.length == 0) { // The floated block must have been removed from the page - do nothing. return; } // (Re)calculate some values if necessary. if (blockInfo.scrollHeight != scrollHeight || blockInfo.reset) { if (blockInfo.reset) { // Reset block so we can calculate new offset. Drupal.blockFloatResetPosition(block, blockInfo); blockInfo.original_offset = $(block).offset(); // Reset completed - set value so we don't do unnecessary resets. blockInfo.reset = false; } // Save the scrollHeight - if this changes we will need to recalculate. blockInfo.scrollHeight = scrollHeight; // The minimum offset is always defined by the blocks starting position. blockInfo.minOffset = blockInfo.original_offset.top - blockInfo.padding_top; // Calulate the maxOffset which depends on whether or not a container is // defined. Otherwise use the scrollHeight. if (blockInfo.container) { blockInfo.maxOffset = $(blockInfo.container).height() + $(blockInfo.container).offset().top - blockInfo.padding_bottom; } else { blockInfo.maxOffset = scrollHeight; } } // Track positioning relative to the viewport and set position. var vScroll = (document.documentElement.scrollTop || document.body.scrollTop); if (vScroll > blockInfo.minOffset) { var topPosition = blockInfo.padding_top; // Block height can change if there a collapsible fields etc... inside the // block so recalculate everytime we are floating the block. var blockHeight = block.height(); // Don't let the bottom of the block go beneath maxOffset. if ((vScroll + blockHeight) > blockInfo.maxOffset) { // At this point topPosition will become a negative number to keep the // block from going out of the defined container. topPosition = blockInfo.maxOffset - vScroll - blockHeight; } block.css({ left: blockInfo.original_offset.left + 'px', position: 'fixed', top: topPosition + 'px' }).addClass('floating-block-active'); blockInfo.floating = true; } else { // Put the block back in it's original postion Drupal.blockFloatResetPosition(block, blockInfo); } } /** * Resets the position of a floated block back to non floated position. */ Drupal.blockFloatResetPosition = function (block, blockInfo) { if (blockInfo.floating) { block.css({ left: blockInfo.original_css.left, position: blockInfo.original_css.position, top: blockInfo.original_css.top }).removeClass('floating-block-active'); blockInfo.floating = false; } } /** * If the css value is 0px for top and left then it is not actually set using * CSS - this will be the computed value. Setting to a blank string will ensure * that when Drupal.blockFloatResetPosition is called these css value will be * unset. */ Drupal.blockFloatCleanCSSValue = function (cssvalue) { if (cssvalue == '0px') { cssvalue = ''; } return cssvalue; } /** * Callback to be added to the scroll event. Each time the user scrolls this * function will be called. */ Drupal.blockFloatOnScroll = function() { $(Drupal.blockFloatStack()).each(function () { Drupal.blockFloatTracker(this); }); }; /** * Callback to be added to the resize event. Each time the user resizes the * this window this function will be called. A timeout is used to prevent * this function from causing a slow down during resizing. */ Drupal.blockFloatWindowResize = function() { if( typeof Drupal.blockFloatWindowResize.timer == 'undefined' ) { Drupal.blockFloatWindowResize.timer = false; } // Ensure minimum time between adjustments. if (Drupal.blockFloatWindowResize.timer) { return; } Drupal.blockFloatWindowResize.timer = setTimeout(function () { $(Drupal.blockFloatStack()).each(function () { this.reset = true; Drupal.blockFloatTracker(this); }); // Reset timer Drupal.blockFloatWindowResize.timer = false; }, 250); }; /** * Attach callbacks to resize and scroll events. Add a class to the body to * prevent doing this multiple times. */ if (!$('body').hasClass('blockFloat-processed')) { $('body').addClass('blockFloat-processed'); $(window).scroll(Drupal.blockFloatOnScroll); $(document.documentElement).scroll(Drupal.blockFloatOnScroll); $(window).resize(Drupal.blockFloatWindowResize); } })(jQuery); ;