1$(window).load(function() { 2 jQuery('#style-switcher').animate({opacity:1},400); 3}); 4 5$.cookie = function(name, value, options) { 6 if (typeof value != 'undefined') { 7 options = options || {}; 8 if (value === null) { 9 value = ''; 10 options.expires = -1; 11 } 12 var expires = ''; 13 if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { 14 var date; 15 if (typeof options.expires == 'number') { 16 date = new Date(); 17 date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); 18 } else { 19 date = options.expires; 20 } 21 expires = '; expires=' + date.toUTCString(); 22 } 23 var path = options.path ? '; path=' + (options.path) : ''; 24 var domain = options.domain ? '; domain=' + (options.domain) : ''; 25 var secure = options.secure ? '; secure' : ''; 26 document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); 27 } else { 28 var cookieValue = null; 29 if (document.cookie && document.cookie != '') { 30 var cookies = document.cookie.split(';'); 31 for (var i = 0; i < cookies.length; i++) { 32 var cookie = jQuery.trim(cookies[i]); 33 if (cookie.substring(0, name.length + 1) == (name + '=')) { 34 cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); 35 break; 36 } 37 } 38 } 39 return cookieValue; 40 } 41}; 42 43 44jQuery(function(){ 45 46 47 48 /* Show or hide themes panel 49 ----------------------------------------------------------*/ 50 themes_panel_width = jQuery('#style-switcher-menu').outerWidth(); 51 52 jQuery('#style-switcher').css('right', 0); 53 jQuery('#style-switcher').animate({right: -themes_panel_width}, 400); 54 55 jQuery('#toggle_button').click(function() { 56 57 var themes_panel = jQuery(this).parent(); 58 themes_panel.animate({ 59 right: parseInt(themes_panel.css('right'),0) == 0 ? -themes_panel_width : 0 60 }, 400); 61 62 return false; 63 }); 64 65 66 67 /* If cookie exists, apply classes from cookie 68 69 70 ----------------------------------------------------------*/ 71 72 73 /* layout style */ 74 jQuery('#style-switcher ul.theme.cookie_layout_style li a').click(function(){ 75 var c_style = jQuery(this).attr('title'); 76 $.cookie('cookie_style', c_style, { expires: 0, path: '/'}); 77 jQuery('#layoutstyle').attr('href', 'css/' + c_style + '.css'); 78 var color = jQuery(this).css('background-color'); 79 return false; 80 }); 81 82 /* wide or boxed */ 83 jQuery('#style-switcher').on('click', '.layouts li', function() 84 { 85 $(this).addClass('btn-active').siblings().removeClass('btn-active'); 86 if( $(this).data('layout') == 'boxed' ) 87 jQuery('body').addClass('pgl-fixed'); 88 else 89 jQuery('body').removeClass('pgl-fixed'); 90 }); 91 92 /* Reset to Default 93 ----------------------------------------------------------*/ 94 jQuery('.reset').click(function(){ 95 $.cookie('layout_color', null, { expires: 0, path: '/'}); 96 $.cookie('skin', null, { expires: 0, path: '/'}); 97 location.reload(); 98 }); 99 100 101 102 103 104});
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.