//popup open function... var edicraAdminPopupHref = null; jQuery.fn.edicraAdminPopup = function(href) { if (href == '' || href == null) { href = jQuery(this).attr('href'); } if (typeof(edcLargePanel) != 'undefined') edcLargePanel.close(); if (typeof(edcMediumPanel) != 'undefined') edcMediumPanel.close(); wdth = 1024; hght = 680; lft = screen.width/2 - wdth/2; tp = screen.height/2 - hght/2; edcLargePanel = window.open(href, 'edcLargePanel','width='+wdth+', height='+hght+', left='+lft+', top='+tp+', resizable=yes'); //edcLargePanel.focus(); //openPopupBox(href, wdth, hght, 'edicra pro - panel administracyjny', 'edicraLogo'); } $(document).on('mouseenter', '.edicraLiteral', function(event){ edicraAdminPopupHref = $(this).data('href'); }).on('mouseleave', '.edicraLiteral', function(event){ edicraAdminPopupHref = null; }); $(document).on('keydown', 'body', function(event){ if(event.keyCode == 84 && edicraAdminPopupHref != null) { $(this).edicraAdminPopup(edicraAdminPopupHref); } }); jQuery.fn.edicraMenu = function() { var menu = jQuery('#edicraMenu > ul', this); menu.each(function(){ var clicked = false; //adding arrows... jQuery('li:has(ul)', menu).addClass('expanding'); //fixing position and width... jQuery('> li > ul > li > ul', menu).each(function(){ jQuery(this).css({left: jQuery(this).parent().width() - 5}); }); //hovering lvl 1... jQuery('> li > :first-child', menu).on('mouseenter', function(){ jQuery('li.selected', menu).removeClass('selected'); jQuery('li.hover', menu).removeClass('hover'); if (clicked) { if (jQuery(this).parent().hasClass('expanding')) { jQuery(this).parent().addClass('selected'); } else { jQuery(this).parent().addClass('hover'); } } else { jQuery(this).parent().addClass('hover'); } }).on('mouseleave', function(){ jQuery(this).parent().removeClass('hover'); }).on('mousedown', function(){ clicked = true; jQuery(this).parent().addClass('selected'); return false; }).on('mouseup', function(){ if (!jQuery(this).parent().hasClass('expanding')) { jQuery(this).parent().removeClass('hover selected'); clicked = false; } }); //hovering lvl 2... jQuery('> li > ul > li > :first-child', menu).on('mouseenter', function() { jQuery('> li > ul > li.selected', menu).removeClass('selected'); jQuery('> li > ul > li.hover', menu).removeClass('hover'); jQuery(this).parent().addClass('hover'); jQuery(this).parent().addClass('selected'); }); //hovering lvl 3... jQuery('> li > ul > li > ul > li > :first-child', menu).on('mouseenter', function() { jQuery('> li > ul > li > ul > li.hover', menu).removeClass('hover'); jQuery(this).parent().addClass('hover'); }); //handle click... jQuery('a', menu).on('click', function() { if (jQuery(this).attr('href') != '#') { jQuery('li.selected', menu).removeClass('selected'); jQuery('li.hover', menu).removeClass('hover'); clicked = false; if (!jQuery(this).hasClass('noPopup')) { jQuery(this).edicraAdminPopup(null); return false; } else { window.location = jQuery(this).attr('href'); } } else { return false; } return false; }); //clicking somwhere... jQuery('a', menu).on('mousedown', function(){ clicked = false; return false; }); jQuery('html').on('mousedown', function(){ jQuery('li.selected', menu).removeClass('selected'); jQuery('li.hover', menu).removeClass('hover'); clicked = false; }); jQuery('#edicraMenu').css({visibility: 'visible'}); }); } jQuery(function() { jQuery('html').edicraMenu(); jQuery('#edicraMenuWrapper:not(.raised)').each(function(){ jQuery('#edicraApplicationWrapper').addClass('lowered'); }); jQuery('#edicraMenuLogoutLink').click(function(){ jQuery('#edicraMenu').animate({top: '-31px'}, 'slow', function(){ window.location = jQuery('#edicraMenuLogoutLink').attr('href'); }); jQuery('#edicraMenuWrapper').animate({height: 0}, 'slow'); return false; }); jQuery('#edicraMenuWrapper.raised').each(function(){ jQuery(this).animate({height: '31px'}, 'slow'); jQuery('#edicraMenu').animate({top: 0}, 'slow'); jQuery('#edicraApplicationWrapper').animate({top: '30px'}, 'slow'); }); }); (function($){ $.fn.edicraSlider = function(options) { var handle = new Array(); this.each(function() { var settings = $.extend({ transition: 'slide', //TODO:: more transitions... transitionTime: 500, onSlide: function(slideNumber){ //console.log(slideNumber); }, onNavigate: function(slideNumber){ //console.log(slideNumber); } }, options); var self = this; var plugin = { properties: {}, settings: settings, init: function() { plugin.properties.pluginContainer = $(self); plugin.properties.slidesCount = $(self).find('> *').length; plugin.properties.pluginContainer.wrapInner('
'); plugin.properties.slidesContainer = $('> div', plugin.properties.pluginContainer); plugin.properties.slidesContainer.css({width: 100 * (plugin.properties.slidesCount + 1) + '%'}); plugin.properties.slidesContainer.addClass(plugin.settings.transition); plugin.properties.slidesContainerInnerHeight = plugin.properties.slidesContainer.innerHeight(); plugin.properties.currentSlide = 0; plugin.createNavigation(); $('> div img.autoSize', plugin.properties.slidesContainer).each(function(){ $(this).before(''); }); plugin.resize(); plugin.showSlide(0, true);//comment this line with layers version... }, createNavigation: function() { plugin.properties.navigator = $(''); if (plugin.properties.slidesCount > 1) { for (var i = 0; i < plugin.properties.slidesCount; i++) { bullet = $('
  • ').on('click', function(){ plugin.showSlide($(this).data('id'), false, true); plugin.settings.onNavigate($(this).data('id')); }); plugin.properties.navigator.append(bullet); } } plugin.properties.pluginContainer.append(plugin.properties.navigator); }, showSlide: function(slideNumber, noTransition) { if (typeof(noTransition) == 'undefined') { noTransition = false; } var currentSlide = plugin.properties.currentSlide; plugin.properties.currentSlide = slideNumber; plugin.properties.navigator.find('> li.active').removeClass('active'); $(this).addClass('active'); plugin.properties.navigator.find('>li:eq(' + slideNumber + ')').addClass('active'); var transitionTime = noTransition == false ? plugin.settings.transitionTime : 0; if (plugin.settings.transition == 'fade') { plugin.properties.slidesContainer.find('> div:eq(' + currentSlide + ')').fadeOut(transitionTime); plugin.properties.slidesContainer.find('> div:eq(' + slideNumber + ')') .fadeIn(transitionTime, plugin.settings.onSlide(slideNumber)); } else { plugin.properties.slidesContainer.stop(true, false).animate({ marginLeft: slideNumber * plugin.properties.pluginContainerInnerWidth * -1 }, transitionTime, plugin.settings.onSlide(slideNumber)); } }, showPreviousSlide: function() { var previousSlide = plugin.properties.currentSlide == 0 ? plugin.properties.slidesCount - 1 : plugin.properties.currentSlide - 1; plugin.showSlide(previousSlide, false); }, showNextSlide: function() { var nextSlide = plugin.properties.currentSlide == plugin.properties.slidesCount - 1 ? 0 : plugin.properties.currentSlide + 1; plugin.showSlide(nextSlide, false); }, log: function() { console.log(plugin.settings); }, resize: function() { plugin.properties.pluginContainerInnerWidth = $(self).innerWidth(); plugin.properties.pluginContainerInnerHeight = $(self).innerHeight(); $('> div', plugin.properties.slidesContainer).each(function(){ $(this).width(plugin.properties.pluginContainerInnerWidth); }); plugin.showSlide(plugin.properties.currentSlide, true);//comment this line with layers version... } } plugin.init(); $(window).resize(function(){ plugin.resize(); }); handle.push(plugin); }); return handle; } }(jQuery)); /*! Colorbox 1.6.4 license: MIT http://www.jacklmoore.com/colorbox */ (function(t,e,i){function n(i,n,o){var r=e.createElement(i);return n&&(r.id=Z+n),o&&(r.style.cssText=o),t(r)}function o(){return i.innerHeight?i.innerHeight:t(i).height()}function r(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var n;return void 0===this.cache[e]&&(n=t(this.el).attr("data-cbox-"+e),void 0!==n?this.cache[e]=n:void 0!==i[e]?this.cache[e]=i[e]:void 0!==X[e]&&(this.cache[e]=X[e])),this.cache[e]},this.get=function(e){var i=this.value(e);return t.isFunction(i)?i.call(this.el,this):i}}function h(t){var e=W.length,i=(A+t)%e;return 0>i?e+i:i}function a(t,e){return Math.round((/%/.test(t)?("x"===e?E.width():o())/100:1)*parseInt(t,10))}function s(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function l(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function d(t){"contains"in x[0]&&!x[0].contains(t.target)&&t.target!==v[0]&&(t.stopPropagation(),x.focus())}function c(t){c.str!==t&&(x.add(v).removeClass(c.str).addClass(t),c.str=t)}function g(e){A=0,e&&e!==!1&&"nofollow"!==e?(W=t("."+te).filter(function(){var i=t.data(this,Y),n=new r(this,i);return n.get("rel")===e}),A=W.index(_.el),-1===A&&(W=W.add(_.el),A=W.length-1)):W=t(_.el)}function u(i){t(e).trigger(i),ae.triggerHandler(i)}function f(i){var o;if(!G){if(o=t(i).data(Y),_=new r(i,o),g(_.get("rel")),!U){U=$=!0,c(_.get("className")),x.css({visibility:"hidden",display:"block",opacity:""}),I=n(se,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),b.css({width:"",height:""}).append(I),j=T.height()+k.height()+b.outerHeight(!0)-b.height(),D=C.width()+H.width()+b.outerWidth(!0)-b.width(),N=I.outerHeight(!0),z=I.outerWidth(!0);var h=a(_.get("initialWidth"),"x"),s=a(_.get("initialHeight"),"y"),l=_.get("maxWidth"),f=_.get("maxHeight");_.w=Math.max((l!==!1?Math.min(h,a(l,"x")):h)-z-D,0),_.h=Math.max((f!==!1?Math.min(s,a(f,"y")):s)-N-j,0),I.css({width:"",height:_.h}),J.position(),u(ee),_.get("onOpen"),O.add(F).hide(),x.focus(),_.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",d,!0),ae.one(re,function(){e.removeEventListener("focus",d,!0)})),_.get("returnFocus")&&ae.one(re,function(){t(_.el).focus()})}var p=parseFloat(_.get("opacity"));v.css({opacity:p===p?p:"",cursor:_.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),_.get("closeButton")?B.html(_.get("close")).appendTo(b):B.appendTo("
    "),w()}}function p(){x||(V=!1,E=t(i),x=n(se).attr({id:Y,"class":t.support.opacity===!1?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),v=n(se,"Overlay").hide(),L=t([n(se,"LoadingOverlay")[0],n(se,"LoadingGraphic")[0]]),y=n(se,"Wrapper"),b=n(se,"Content").append(F=n(se,"Title"),R=n(se,"Current"),P=t('