function cuSel(params){jQuery(document).ready(function(){jQuery(params.changedEl).each(function(num) {var chEl=jQuery(this),chElWid=chEl.outerWidth(),chElClass=chEl.prop("class"),chElId=chEl.prop("id"),chElName=chEl.prop("name"),defaultVal=chEl.val(),activeOpt=chEl.find("option[value='"+defaultVal+"']").eq(0),defaultText=activeOpt.text(),disabledSel=chEl.prop("disabled"),scrollArrows=params.scrollArrows,chElOnChange=chEl.prop("onchange"),chElTab=chEl.prop("tabindex"),chElMultiple=chEl.prop("multiple");if(!chElId||chElMultiple)return false;if(!disabledSel) {classDisCuselText="",classDisCusel="";} else {classDisCuselText="classDisCuselLabel";classDisCusel="classDisCusel";} if(scrollArrows) {classDisCusel+=" cuselScrollArrows";} activeOpt.addClass("cuselActive");var optionStr=chEl.html(),spanStr=optionStr.replace(/option/ig,"span");spanStr=spanStr.replace(/value=/ig,"val=");if(params.checkZIndex) {num=jQuery(".cusel").length;} var cuselFrame='
'+'
'+'
'+defaultText+'
'+'
'+ spanStr+'
'+''+'
';chEl.replaceWith(cuselFrame);if(chElOnChange)jQuery("#"+chElId).bind('change',chElOnChange);var newSel=jQuery("#cuselFrame-"+chElId),arrSpan=newSel.find("span"),defaultHeight;if(!arrSpan.eq(0).text()) {defaultHeight=arrSpan.eq(1).outerHeight();arrSpan.eq(0).css("height",arrSpan.eq(1).height());} else {defaultHeight=arrSpan.eq(0).outerHeight();} if(arrSpan.length>params.visRows) {newSel.find(".cusel-scroll-wrap").eq(0).css({height:defaultHeight*params.visRows+"px",display:"none",visibility:"visible"}).children(".cusel-scroll-pane").css("height",defaultHeight*params.visRows+"px");} else {newSel.find(".cusel-scroll-wrap").eq(0).css({display:"none",visibility:"visible"});} var arrAddTags=jQuery("#cusel-scroll-"+chElId).find("span[addTags]"),lenAddTags=arrAddTags.length;for(i=0;iparams.visRows) {refreshScroll.css({height:defaultHeight*params.visRows+"px",display:"none",visibility:"visible"}).children(".cusel-scroll-pane").css("height",defaultHeight*params.visRows+"px");} else {refreshScroll.css({display:"none",visibility:"visible"});}}} (function($){$.jScrollPaneCusel={active:[]};$.fn.jScrollPaneCusel=function(settings) {settings=$.extend({},$.fn.jScrollPaneCusel.defaults,settings);var rf=function(){return false;};return this.each(function() {var $this=$(this);var cuselWid=this.parentNode.offsetWidth;$this.css('overflow','hidden');var paneEle=this;if($(this).parent().is('.jScrollPaneContainer')){var currentScrollPosition=settings.maintainPosition?$this.position().top:0;var $c=$(this).parent();var paneWidth=cuselWid;var paneHeight=$c.outerHeight();var trackHeight=paneHeight;$('>.jScrollPaneTrack, >.jScrollArrowUp, >.jScrollArrowDown',$c).remove();$this.css({'top':0});}else{var currentScrollPosition=0;this.originalPadding=$this.css('paddingTop')+' '+$this.css('paddingRight')+' '+$this.css('paddingBottom')+' '+$this.css('paddingLeft');this.originalSidePaddingTotal=(parseInt($this.css('paddingLeft'))||0)+(parseInt($this.css('paddingRight'))||0);var paneWidth=cuselWid;var paneHeight=$this.innerHeight();var trackHeight=paneHeight;$this.wrap("
").parent().css({'height':paneHeight+'px','width':paneWidth+'px'});if(!window.navigator.userProfile) {var borderWid=parseInt($(this).parent().css("border-left-width"))+parseInt($(this).parent().css("border-right-width"));paneWidth-=borderWid;$(this).css("width",paneWidth+"px").parent().css("width",paneWidth+"px");} $(document).bind('emchange',function(e,cur,prev) {$this.jScrollPaneCusel(settings);});} if(settings.reinitialiseOnImageLoad){var $imagesToLoad=$.data(paneEle,'jScrollPaneImagesToLoad')||$('img',$this);var loadedImages=[];if($imagesToLoad.length){$imagesToLoad.each(function(i,val){$(this).bind('load',function(){if($.inArray(i,loadedImages)==-1){loadedImages.push(val);$imagesToLoad=$.grep($imagesToLoad,function(n,i){return n!=val;});$.data(paneEle,'jScrollPaneImagesToLoad',$imagesToLoad);settings.reinitialiseOnImageLoad=false;$this.jScrollPaneCusel(settings);}}).each(function(i,val){if(this.complete||this.complete===undefined){this.src=this.src;}});});};} var p=this.originalSidePaddingTotal;var cssToApply={'height':'auto','width':paneWidth-settings.scrollbarWidth-settings.scrollbarMargin-p+'px'} if(settings.scrollbarOnLeft){cssToApply.paddingLeft=settings.scrollbarMargin+settings.scrollbarWidth+'px';}else{cssToApply.paddingRight=settings.scrollbarMargin+'px';} $this.css(cssToApply);var contentHeight=$this.outerHeight();var percentInView=paneHeight/contentHeight;if(percentInView<.99){var $container=$this.parent();$container.append($('
').css({'width':settings.scrollbarWidth+'px'}).append($('
').css({'width':settings.scrollbarWidth+'px'}).append($('
').css({'width':settings.scrollbarWidth+'px'}),$('
').css({'width':settings.scrollbarWidth+'px'}))));var $track=$('>.jScrollPaneTrack',$container);var $drag=$('>.jScrollPaneTrack .jScrollPaneDrag',$container);if(settings.showArrows){var currentArrowButton;var currentArrowDirection;var currentArrowInterval;var currentArrowInc;var whileArrowButtonDown=function() {if(currentArrowInc>4||currentArrowInc%4==0){positionDrag(dragPosition+currentArrowDirection*mouseWheelMultiplier);} currentArrowInc++;};var onArrowMouseUp=function(event) {$('html').unbind('mouseup',onArrowMouseUp);currentArrowButton.removeClass('jScrollActiveArrowButton');clearInterval(currentArrowInterval);};var onArrowMouseDown=function(){$('html').bind('mouseup',onArrowMouseUp);currentArrowButton.addClass('jScrollActiveArrowButton');currentArrowInc=0;whileArrowButtonDown();currentArrowInterval=setInterval(whileArrowButtonDown,100);};$container.append($('
').attr({'class':'jScrollArrowUp'}).css({'width':settings.scrollbarWidth+'px'}).bind('mousedown',function() {currentArrowButton=$(this);currentArrowDirection=-1;onArrowMouseDown();this.blur();return false;}).bind('click',rf),$('
').attr({'class':'jScrollArrowDown'}).css({'width':settings.scrollbarWidth+'px'}).bind('mousedown',function() {currentArrowButton=$(this);currentArrowDirection=1;onArrowMouseDown();this.blur();return false;}).bind('click',rf));var $upArrow=$('>.jScrollArrowUp',$container);var $downArrow=$('>.jScrollArrowDown',$container);if(settings.arrowSize){trackHeight=paneHeight-settings.arrowSize-settings.arrowSize;$track.css({'height':trackHeight+'px',top:settings.arrowSize+'px'})}else{var topArrowHeight=$upArrow.height();settings.arrowSize=topArrowHeight;trackHeight=paneHeight-topArrowHeight-$downArrow.height();$track.css({'height':trackHeight+'px',top:topArrowHeight+'px'})}} var $pane=$(this).css({'position':'absolute','overflow':'visible'});var currentOffset;var maxY;var mouseWheelMultiplier;var dragPosition=0;var dragMiddle=percentInView*paneHeight/2;var getPos=function(event,c){var p=c=='X'?'Left':'Top';return event['page'+c]||(event['client'+c]+(document.documentElement['scroll'+p]||document.body['scroll'+p]))||0;};var ignoreNativeDrag=function(){return false;};var initDrag=function() {ceaseAnimation();currentOffset=$drag.offset(false);currentOffset.top-=dragPosition;maxY=trackHeight-$drag[0].offsetHeight;mouseWheelMultiplier=2*settings.wheelSpeed*maxY/contentHeight;};var onStartDrag=function(event) {initDrag();dragMiddle=getPos(event,'Y')-dragPosition-currentOffset.top;$('html').bind('mouseup',onStopDrag).bind('mousemove',updateScroll);if($.browser.msie){$('html').bind('dragstart',ignoreNativeDrag).bind('selectstart',ignoreNativeDrag);} return false;};var onStopDrag=function() {$('html').unbind('mouseup',onStopDrag).unbind('mousemove',updateScroll);dragMiddle=percentInView*paneHeight/2;if($.browser.msie){$('html').unbind('dragstart',ignoreNativeDrag).unbind('selectstart',ignoreNativeDrag);}};var positionDrag=function(destY) {destY=destY<0?0:(destY>maxY?maxY:destY);dragPosition=destY;$drag.css({'top':destY+'px'});var p=destY/maxY;$pane.css({'top':((paneHeight-contentHeight)*p)+'px'});$this.trigger('scroll');if(settings.showArrows){$upArrow[destY==0?'addClass':'removeClass']('disabled');$downArrow[destY==maxY?'addClass':'removeClass']('disabled');}};var updateScroll=function(e) {positionDrag(getPos(e,'Y')-currentOffset.top-dragMiddle);};var dragH=Math.max(Math.min(percentInView*(paneHeight-settings.arrowSize*2),settings.dragMaxHeight),settings.dragMinHeight);$drag.css({'height':dragH+'px'}).bind('mousedown',onStartDrag);var trackScrollInterval;var trackScrollInc;var trackScrollMousePos;var doTrackScroll=function() {if(trackScrollInc>8||trackScrollInc%4==0){positionDrag((dragPosition-((dragPosition-trackScrollMousePos)/2)));} trackScrollInc++;};var onStopTrackClick=function() {clearInterval(trackScrollInterval);$('html').unbind('mouseup',onStopTrackClick).unbind('mousemove',onTrackMouseMove);};var onTrackMouseMove=function(event) {trackScrollMousePos=getPos(event,'Y')-currentOffset.top-dragMiddle;};var onTrackClick=function(event) {initDrag();onTrackMouseMove(event);trackScrollInc=0;$('html').bind('mouseup',onStopTrackClick).bind('mousemove',onTrackMouseMove);trackScrollInterval=setInterval(doTrackScroll,100);doTrackScroll();};$track.bind('mousedown',onTrackClick);$container.bind('mousewheel',function(event,delta){initDrag();ceaseAnimation();var d=dragPosition;positionDrag(dragPosition-delta*mouseWheelMultiplier);var dragOccured=d!=dragPosition;return false;});var _animateToPosition;var _animateToInterval;function animateToPosition() {var diff=(_animateToPosition-dragPosition)/settings.animateStep;if(diff>1||diff<-1){positionDrag(dragPosition+diff);}else{positionDrag(_animateToPosition);ceaseAnimation();}} var ceaseAnimation=function() {if(_animateToInterval){clearInterval(_animateToInterval);delete _animateToPosition;}};var scrollTo=function(pos,preventAni) {if(typeof pos=="string"){$e=$(pos,$this);if(!$e.length)return;pos=$e.offset().top-$this.offset().top;} $container.scrollTop(0);ceaseAnimation();var destDragPosition=-pos/(paneHeight-contentHeight)*maxY;if(preventAni||!settings.animateTo){positionDrag(destDragPosition);}else{_animateToPosition=destDragPosition;_animateToInterval=setInterval(animateToPosition,settings.animateInterval);}};$this[0].scrollTo=scrollTo;$this[0].scrollBy=function(delta) {var currentPos=-parseInt($pane.css('top'))||0;scrollTo(currentPos+delta);};initDrag();scrollTo(-currentScrollPosition,true);$('*',this).bind('focus',function(event) {var $e=$(this);var eleTop=0;while($e[0]!=$this[0]){eleTop+=$e.position().top;$e=$e.offsetParent();} var viewportTop=-parseInt($pane.css('top'))||0;var maxVisibleEleTop=viewportTop+paneHeight;var eleInView=eleTop>viewportTop&&eleTopviewportTop){destPos+=$(this).height()+15+settings.scrollbarMargin-paneHeight;} scrollTo(destPos);}}) if(location.hash){scrollTo(location.hash);} $(document).bind('click',function(e) {$target=$(e.target);if($target.is('a')){var h=$target.attr('href');if(h.substr(0,1)=='#'){scrollTo(h);}}});$.jScrollPaneCusel.active.push($this[0]);}else{$this.css({'height':paneHeight+'px','width':paneWidth-this.originalSidePaddingTotal+'px','padding':this.originalPadding});$this.parent().unbind('mousewheel');}})};$.fn.jScrollPaneRemoveCusel=function() {$(this).each(function() {$this=$(this);var $c=$this.parent();if($c.is('.jScrollPaneContainer')){$this.css({'top':'','height':'','width':'','padding':'','overflow':'','position':''});$this.attr('style',$this.data('originalStyleTag'));$c.after($this).remove();}});} $.fn.jScrollPaneCusel.defaults={scrollbarWidth:10,scrollbarMargin:5,wheelSpeed:18,showArrows:false,arrowSize:0,animateTo:false,dragMinHeight:1,dragMaxHeight:99999,animateInterval:100,animateStep:3,maintainPosition:true,scrollbarOnLeft:false,reinitialiseOnImageLoad:false};$(window).bind('unload',function(){var els=$.jScrollPaneCusel.active;for(var i=0;i span").toggleClass('ts_active');$(".categories_in").animate({"margin-right":"-=306px"},"normal");$("#board_index").toggleClass('no_sidebar');});$.cookie('cook_side',"1",{expires:365});cookcheck="1";} else {$(".board_side").animate({opacity:"show"},"normal");$("#tog_sidebar > span").toggleClass('ts_active');$(".categories_in").animate({"margin-right":"+=306px"},"fast");$("#board_index").toggleClass('no_sidebar');$.cookie('cook_side',"0",{expires:365});cookcheck="0";} return false;});$(".cat_list>ol>li:odd").addClass("cl_row");$(".bb_cont>ol>li:odd").addClass("bb_row_2");$(".forum_table table tr:nth-child(even) > td").addClass("ft_row");$(".ft_topic_name").hover(function(){$(this).children(".ft_topic_prev").children("a").toggle();return false;});$(".rl_info").click(function(){var coord=$(this).offset();var po=$(this).parents(".rl_head").prev(".fp_up").clone().prependTo("body");if(po) {$(po).css("top",coord.top-88).css("left",coord.left+25);$(po).animate({opacity:"show"},"fastl");$(".upp_close").click(function(){$(po).fadeOut('normal',function(){$(po).remove();});return false;});$(this).click(function(){$(po).remove();return false;});$(document).click(function(){$(po).fadeOut('normal',function(){$(po).remove();});});} return false;});$(".butt_options").click(function(){$(this).next(".alo_list").slideToggle('fast');return false;});$('input[type="checkbox"].counter').live('click',function(){if($(this).is(':checked')) {che++;$("#moder_but").removeClass("butt_disable");$("#moder_but input").attr("disabled","");$("#moder_but span span").html('� ����������� ('+che+')');} else {che--;$("#moder_but span span").html('� ����������� ('+che+')');if(che==0) {$("#moder_but").addClass("butt_disable");$("#moder_but input").attr("disabled","disabled");}}});$(".c_toggle").click(function(){var c_id=$(this).parent().attr('id');c_id=c_id.substr(2);if($.cookie("c_ids")) {mas=$.cookie("c_ids").split(",");} if(($(this).parent().attr('class'))=="collapsed") {if(mas[0]) {for(var i=0;i span").toggleClass('ts_active');$(".categories_in").animate({"margin-right":"-=306px"},1);$("#board_index").toggleClass('no_sidebar');}});;function inputPlaceholder(input,color){if(!input)return null;if(input.placeholder&&'placeholder'in document.createElement(input.tagName))return input;var placeholder_color=color||'#AAA';var default_color=input.style.color;var placeholder=input.getAttribute('placeholder');if(input.value===''||input.value==placeholder){input.value=placeholder;input.style.color=placeholder_color;} var add_event=/*@cc_on'attachEvent'||@*/'addEventListener';input[add_event](/*@cc_on'on'+@*/'focus',function(){input.style.color=default_color;if(input.value==placeholder){input.value='';}},false);input[add_event](/*@cc_on'on'+@*/'blur',function(){if(input.value===''){input.value=placeholder;input.style.color=placeholder_color;}else{input.style.color=default_color;}},false);input.form&&input.form[add_event](/*@cc_on'on'+@*/'submit',function(){if(input.value==placeholder){input.value='';}},false);return input;};;(function($){var helper={},current,title,tID,IE=$.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),track=false;$.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){$.tooltip.blocked=!$.tooltip.blocked;}};$.fn.extend({tooltip:function(settings){settings=$.extend({},$.tooltip.defaults,settings);createHelper(settings);return this.each(function(){$.data(this,"tooltip",settings);this.tOpacity=helper.parent.css("opacity");this.tooltipText=this.title;$(this).removeAttr("title");this.alt="";}).mouseover(save).mouseout(hide).click(hide);},fixPNG:IE?function(){return this.each(function(){var image=$(this).css('backgroundImage');if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({'backgroundImage':'none','filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"}).each(function(){var position=$(this).css('position');if(position!='absolute'&&position!='relative')$(this).css('position','relative');});}});}:function(){return this;},unfixPNG:IE?function(){return this.each(function(){$(this).css({'filter':'',backgroundImage:''});});}:function(){return this;},hideWhenEmpty:function(){return this.each(function(){$(this)[$(this).html()?"show":"hide"]();});},url:function(){return this.attr('href')||this.attr('src');}});function createHelper(settings){if(helper.parent)return;helper.parent=$('

').appendTo(document.body).hide();if($.fn.bgiframe)helper.parent.bgiframe();helper.title=$('h3',helper.parent);helper.body=$('div.body',helper.parent);helper.url=$('div.url',helper.parent);}function settings(element){return $.data(element,"tooltip");}function handle(event){if(settings(this).delay)tID=setTimeout(show,settings(this).delay);else show();track=!!settings(this).track;$(document.body).bind('mousemove',update);update(event);}function save(){if($.tooltip.blocked||this==current||(!this.tooltipText&&!settings(this).bodyHandler))return;current=this;title=this.tooltipText;if(settings(this).bodyHandler){helper.title.hide();var bodyContent=settings(this).bodyHandler.call(this);if(bodyContent.nodeType||bodyContent.jquery){helper.body.empty().append(bodyContent)}else{helper.body.html(bodyContent);}helper.body.show();}else if(settings(this).showBody){var parts=title.split(settings(this).showBody);helper.title.html(parts.shift()).show();helper.body.empty();for(var i=0,part;(part=parts[i]);i++){if(i>0)helper.body.append("
");helper.body.append(part);}helper.body.hideWhenEmpty();}else{helper.title.html(title).show();helper.body.hide();}if(settings(this).showURL&&$(this).url())helper.url.html($(this).url().replace('http://','')).show();else helper.url.hide();helper.parent.addClass(settings(this).extraClass);if(settings(this).fixPNG)helper.parent.fixPNG();handle.apply(this,arguments);}function show(){tID=null;if((!IE||!$.fn.bgiframe)&&settings(current).fade){if(helper.parent.is(":animated"))helper.parent.stop().show().fadeTo(settings(current).fade,current.tOpacity);else helper.parent.is(':visible')?helper.parent.fadeTo(settings(current).fade,current.tOpacity):helper.parent.fadeIn(settings(current).fade);}else{helper.parent.show();}update();}function update(event){if($.tooltip.blocked)return;if(event&&event.target.tagName=="OPTION"){return;}if(!track&&helper.parent.is(":visible")){$(document.body).unbind('mousemove',update)}if(current==null){$(document.body).unbind('mousemove',update);return;}helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");var left=helper.parent[0].offsetLeft;var top=helper.parent[0].offsetTop;if(event){left=event.pageX+settings(current).left;top=event.pageY+settings(current).top;var right='auto';if(settings(current).positionLeft){right=$(window).width()-left;left='auto';}helper.parent.css({left:left,right:right,top:top});}var v=viewport(),h=helper.parent[0];if(v.x+v.cx0){$(focusableElement[focusableElement.length-1]).focus();} thisPopup.afterClose();hideScreenLocker(name);});break;}}}else{if(openedPopups.length>0){$.closePopupLayer(openedPopups[openedPopups.length-1].name);}} return this;} $.reloadPopupLayer=function(name,callback){if(name){for(var i=0;i0){$.reloadPopupLayer(openedPopups[openedPopups.length-1].name);}} return this;} function setScreenLockerSize(){if(popupLayerScreenLocker){$('#popupLayerScreenLocker').height($(document).height()+"px");$('#popupLayerScreenLocker').width($(document.body).outerWidth(true)+"px");}} function checkIfItExists(name){if(name){for(var i=0;i");$("#popupLayerScreenLocker").css({position:"absolute",background:setupJqueryMPopups.screenLockerBackground,left:"0",top:"0",opacity:setupJqueryMPopups.screenLockerOpacity,display:"none"});showScreenLocker();$("#popupLayerScreenLocker").click(function(){$.closePopupLayer();});}} function hideScreenLocker(popupName){if(openedPopups.length==0){screenlocker=false;$('#popupLayerScreenLocker').fadeOut();}else{$('#popupLayerScreenLocker').css("z-index",parseInt($("#popupLayer_"+openedPopups[openedPopups.length-1].name).css("z-index"))-1);} if($.browser.msie&&$.browser.version<7){$("select.hidden-by-"+popupName).removeClass("hidden-by-jmp hidden-by-"+popupName).css("visibility","visible");}} function setPopupLayersPosition(popupElement,animate){if(popupElement){if(popupElement.width()<$(window).width()){var leftPosition=(document.documentElement.offsetWidth-popupElement.width())/2;}else{var leftPosition=document.documentElement.scrollLeft+5;} if(popupElement.height()<$(window).height()){var topPosition=document.documentElement.scrollTop+($(window).height()-popupElement.height())/2;}else{var topPosition=document.documentElement.scrollTop+5;} var positions={left:leftPosition+"px",top:topPosition+"px"};if(!animate){popupElement.css(positions);}else{popupElement.animate(positions,"slow");} setScreenLockerSize();}else{for(var i=0;i");var zIndex=parseInt(openedPopups.length==1?1000:$("#popupLayer_"+openedPopups[openedPopups.length-2].name).css("z-index"))+2;}else{var zIndex=$("#"+idElement).css("z-index");} var popupElement=$("#"+idElement);popupElement.css({visibility:"hidden",width:popupObject.width=="auto"?"":popupObject.width+"px",height:popupObject.height=="auto"?"":popupObject.height+"px",position:"absolute","z-index":zIndex});var linkAtTop=" ";var linkAtBottom=" ";popupElement.html(linkAtTop+data+linkAtBottom);setPopupLayersPosition(popupElement);popupElement.css("display","none");popupElement.css("visibility","visible");if(newElement){popupElement.fadeIn();}else{popupElement.show();} $("#"+idElement+" .jmp-link-at-top, "+"#"+idElement+" .jmp-link-at-bottom").focus(function(){$(focusableElement[focusableElement.length-1]).focus();});var jFocusableElements=$("#"+idElement+" a:visible:not(.jmp-link-at-top, .jmp-link-at-bottom), "+"#"+idElement+" *:input:visible:not(.jmp-link-at-top, .jmp-link-at-bottom)");if(jFocusableElements.length==0){var linkInsidePopup=" ";popupElement.find(".jmp-link-at-top").after(linkInsidePopup);focusableElement.push($(popupElement).find(".jmp-link-inside-popup")[0]);}else{jFocusableElements.each(function(){if(!$(this).hasClass("jmp-link-at-top")&&!$(this).hasClass("jmp-link-at-bottom")){focusableElement.push(this);return false;}});} $(focusableElement[focusableElement.length-1]).focus();popupObject.success();if(popupObject.reloadSuccess){popupObject.reloadSuccess();popupObject.reloadSuccess=null;}} function loadPopupLayerContent(popupObject,newElement){if(newElement){openedPopups.push(popupObject);} if(popupObject.target!=""){showPopupLayerContent(popupObject,newElement,$("#"+popupObject.target).html());}else{$.ajax({url:popupObject.url,data:popupObject.parameters,cache:popupObject.cache,dataType:"html",method:"GET",success:function(data){showPopupLayerContent(popupObject,newElement,data);},error:popupObject.error});}} $(window).resize(function(){setScreenLockerSize();setPopupLayersPosition();});$(document).keydown(function(e){if(e.keyCode==27){$.closePopupLayer();}});})(jQuery);