1/*** background image fit to window ****/ 2 3var $ = jQuery.noConflict(); 4 5$(function() { 6 7 var a=0; 8 var theWindow = $(window), 9 $bg = $("#bg_img"), 10 aspectRatio =0; 11 var open = false; 12 13 function resizeBg() { 14 aspectRatio = $bg.width() / $bg.height(); 15 16 if ( (theWindow.width() / (theWindow.height())) < aspectRatio ) { 17 $bg 18 .removeClass() 19 .addClass('bgheight'); 20 } else { 21 $bg 22 .removeClass() 23 .addClass('bgwidth'); 24 } 25 26 } 27 28 29 30 function setupMenuButton() { 31 $("#small_menu").click(function(e) { 32 e.preventDefault(); 33 34 /*if small menu expanded*/ 35 if (open) { 36 /*collapse small menu */ 37 $(".main_menu").fadeOut(); 38 $(".epipeda").fadeOut(); 39 $("#small_menu").toggleClass("selected"); 40 /*$('.menu-wrapper').css('overflow','hidden');*/ 41 $('.menu-wrapper').css('height','auto'); 42 } 43 /*if small menu collapsed*/ 44 else { 45 /*expand small menu */ 46 $(".main_menu").fadeIn(); 47 $('.epipeda_small').hide(); 48 49 $("#small_menu").toggleClass("selected"); 50 if( $('.menu-wrapper').height()>=$(window).height()-50 ){ 51 $('.menu-wrapper').css('height',$(window).height()-50 + 'px'); 52 $('.menu-wrapper').css('overflow','scroll'); 53 }else{ 54 /*$('.menu-wrapper').css('overflow','hidden');*/ 55 $('.menu-wrapper').css('height','auto'); 56 } 57 } 58 open = !open; 59 }); 60 61 62 } 63 64 function checkMenuButton() { 65 66 /*if large menu*/ 67 if( $('#small_menu').is(':hidden')){ 68 $(".main_menu").fadeIn(); 69 $('.epipeda_small').hide(); 70 $('.menu-wrapper').css('height','auto'); 71 $('.menu-wrapper').css('overflow','visible'); 72 } 73 74 /*if small menu collapsed*/ 75 else if($('#small_menu').is(':visible') && !open) { 76 $('.epipeda').hide(); 77 $('#class_menu').removeClass('active_submenu'); 78 $(".main_menu").hide(); 79 $('.menu-wrapper').css('height','auto'); 80 $('.menu-wrapper').css('overflow','visible'); 81 } 82 /*if small menu expanded*/ 83 else if($('#small_menu').is(':visible') && open) { 84 $('.epipeda').hide(); 85 $('#class_menu').removeClass('active_submenu'); 86 if( $('.menu-wrapper').height()>=$(window).height()-$('#header').height() ){ 87 $('.menu-wrapper').css('height',$(window).height()-$('#header').height() + 'px'); 88 $('.menu-wrapper').css('overflow','scroll'); 89 }else{ 90 $('.menu-wrapper').css('height','auto'); 91 $('.menu-wrapper').css('overflow','visible'); 92 } 93 } 94 } 95 96 97 function setFooter() { 98 var minheight=$(window).height()-$('#header').innerHeight()-$('#footer').innerHeight()-10; 99 $('#content_course').css('min-height',minheight); 100 } 101 102 103 $("body").click(function(){ 104 $('.epipeda').fadeOut(200); 105 $('#class_menu').removeClass('active_submenu'); 106 }); 107 108 $('#class_menu').click(function(event){ 109 event.stopPropagation(); 110 }); 111 112 $('.epipeda').click(function(event){ 113 event.stopPropagation(); 114 }); 115 116 117 /**** on click ana taksi menu click *********/ 118 $('#class_menu').click(function() { 119 120 if($('#small_menu').is(':hidden')){ 121 $('.epipeda_small').hide(); 122 $('.epipeda').fadeToggle(200).toggleClass("visible"); 123 }else{ 124 $('.epipeda').hide(); 125 $('.epipeda_small').slideToggle(200).toggleClass("visible"); 126 } 127 $('#class_menu').toggleClass('active_submenu'); 128 }); 129 /****** ******/ 130 131 $('.highlights').click(function(){ 132 var url = $(this).next().attr('href'); 133 var target = $(this).next().attr('target'); 134 if (target=='_blank') { 135 window.open(url,'_blank'); 136 } 137 else { 138 window.location = url; 139 } 140 }); 141 142 143 setupMenuButton(); 144 setFooter(); 145 resizeBg(); 146 147 $('#bg_img').load(resizeBg); 148 149 150 theWindow.resize(function() { 151 resizeBg(); 152 checkMenuButton(); 153 setFooter(); 154 }).trigger("resize"); 155 156 157 158 159 });
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.