function changeFontSize(value) { var ele1 = jQuery('#content_font_size'); switch (value) { case 'increase': if (umws_font_size + 1 <= 5) { ele1.removeClass('font_size' + umws_font_size); umws_font_size++; ele1.addClass('font_size' + umws_font_size); } break; case 'decrease': if (umws_font_size - 1 >= 1) { ele1.removeClass('font_size' + umws_font_size); umws_font_size--; ele1.addClass('font_size' + umws_font_size); } break; default: ele1.removeClass('font_size' + umws_font_size); umws_font_size = 3; ele1.addClass('font_size' + umws_font_size); } jQuery.cookie('umws_rps_font_size', umws_font_size, { duration: 365, path: '/' }); } function changeContrast() { if (umws_contrast == 1) { // add CSS file with contrast overwrites jQuery('head').append(''); umws_contrast = 2; } else { // remove CSS file with contrast overwrites jQuery('#css_contrast').remove(); umws_contrast = 1; } //jQuery("link[title='contrast']").attr("href", contrast_url + konwent_contrast + '.css'); jQuery.cookie('umws_rps_contrast', umws_contrast, { duration: 365, path: '/' }); } navigator.browserTypeVersion = (function(){ var ua = navigator.userAgent, tem, M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*([\d\.]+)/i) || []; if(/trident/i.test(M[1])){ tem = /\brv[ :]+(\d+(\.\d+)?)/g.exec(ua) || []; return 'IE '+(tem[1] || ''); } M = M[2]? [M[1], M[2]]:[navigator.appName, navigator.appVersion, '-?']; if ((tem = ua.match(/version\/([\.\d]+)/i)) != null) { M[2] = tem[1]; } M[1] = parseInt(M[1]); return M; })(); jQuery(document).ready(function() { // back to top jQuery('#ftr_btt1').on('click', function() { var scroll_top = jQuery(window).scrollTop(); if (scroll_top > 0) { jQuery('html, body').animate({ scrollTop: 0 }, 500, 'easeInOutExpo'); jQuery('html').focus(); } return false; }); // show / hide main menu jQuery('#menu_shb').on('click', function() { var cids = jQuery('#'+ jQuery(this).attr('aria-controls')); var cstate = jQuery(this).attr('aria-expanded'); if (cids.length > 0) { if (cstate == 'true') { cids.stop().slideUp(500); jQuery(this).attr('aria-expanded', 'false'); cids.attr('aria-hidden', 'true'); } else { cids.stop().slideDown(500); jQuery(this).attr('aria-expanded', 'true'); cids.attr('aria-hidden', 'false'); } } }); // font size / contrast jQuery('#tools_enlarge').click(function() { changeFontSize('increase'); }); jQuery('#tools_dislarge').click(function() { changeFontSize('decrease'); }); jQuery('#tools_reset').click(function() { changeFontSize(); }); jQuery('#tool_contrast').click(function() { changeContrast(); }); // ------------------------- pagination select jQuery("#pag_drop").on('change', function() { // get value and add to link then change location var pag_link = jQuery(this).attr('data-clean-link'); var pag_limit = jQuery(this).val(); var pag_symb = '?'; if (pag_link.indexOf('?') >= 0) { pag_symb = '&'; } if (pag_link && pag_limit) { location.href = jQuery(this).attr('data-clean-link') + pag_symb + 'start='+ jQuery(this).val(); } }); // ------------------------- emulate history in photo gallery and attachements if (history.pushState) { jQuery('.pGallery1 a, .atta1 a').on('click', function() { var curr_url = window.location.href; var dest_url = jQuery(this).attr('href'); if (dest_url) { history.replaceState({}, '', dest_url); history.replaceState({}, '', curr_url); } }); } // ------------------------- jquery prettyphoto jQuery("a[data-rel^='prettyPhoto']").prettyPhoto({ deeplinking: false, markup: '
\
 
\
\
\
\
\
\
\
\
\
\
\
\ Expand \
\ next \ previous \
\
\
\
\ Previous \

0/0

\ Next \
\ Close \
\
\
\
\
\
\
\
\
\
\
\
\
', gallery_markup: '', inline_markup: '', social_tools: '' }); });