1(function ($) { 2 "use strict"; 3 4 var App = function () { 5 var o = this; 6 $(document).ready(function () { 7 o.initialize(); 8 }); 9 $(window).load(function () { 10 o.menu(); 11 }); 12 13 }; 14 var p = App.prototype; 15 16 App.SCREEN_XS = 480; 17 App.SCREEN_SM = 768; 18 App.SCREEN_MD = 992; 19 App.SCREEN_LG = 1200; 20 21 p._callFunctions = null; 22 p._resizeTimer = null; 23 p._scrollTimer = null; 24 25 p.initialize = function () { 26 this._enableEvents(); 27 this._initBreakpoints(); 28 }; 29 30 p._enableEvents = function () { 31 var o = this; 32 33 // Window events 34 $(window).on('resize', function (e) { 35 clearTimeout(o._resizeTimer); 36 o._resizeTimer = setTimeout(function () { 37 //o.pictureFill(); 38 o.menu(); 39 }, 300); 40 }); 41 o.menu(); 42 /*$(window).on('scroll', function (e) { 43 clearTimeout(o._scrollTimer); 44 o._scrollTimer = setTimeout(function () { 45 //o.scrollButton(); 46 }, 200); 47 });*/ 48 49 /*$('img').each(function(){ 50 if($(this).closest('strong').length>=1){ 51 var k = $(this).closest('strong'); 52 k.parent().html($('<div>').append($(this).clone()).html()); 53 } 54 if($(this).closest('span').length>=1){ 55 var k = $(this).closest('span'); 56 k.parent().html($('<div>').append($(this).clone()).html()); 57 } 58 if($(this).closest('em').length>=1){ 59 var k = $(this).closest('em'); 60 k.parent().html($('<div>').append($(this).clone()).html()); 61 } 62 if($(this).closest('pre').length>=1){ 63 var k = $(this).closest('pre'); 64 k.parent().html($('<div>').append($(this).clone()).html()); 65 } 66 if($(this).closest('i').length>=1){ 67 var k = $(this).closest('i'); 68 k.parent().html($('<div>').append($(this).clone()).html()); 69 } 70 if($(this).closest('u').length>=1){ 71 var k = $(this).closest('u'); 72 k.parent().html($('<div>').append($(this).clone()).html()); 73 } 74 if($(this).closest('sup').length>=1){ 75 var k = $(this).closest('sup'); 76 k.parent().html($('<div>').append($(this).clone()).html()); 77 } 78 if($(this).closest('sub').length>=1){ 79 var k = $(this).closest('sub'); 80 k.parent().html($('<div>').append($(this).clone()).html()); 81 } 82 if($(this).closest('del').length>=1){ 83 var k = $(this).closest('del'); 84 k.parent().html($('<div>').append($(this).clone()).html()); 85 } 86 if($(this).closest('ins').length>=1){ 87 var k = $(this).closest('ins'); 88 k.parent().html($('<div>').append($(this).clone()).html()); 89 } 90 });*/ 91 92 if($('.alert[role=alert]').length>=1){ 93 var n = $('.alert[role=alert]').offset(); 94 $('html,body').animate({scrollTop:(n.top - 80)},500); 95 } 96 97 $('[data-toggle="scrollTo"]').click(function(e){ 98 var n = $(this); 99 e.preventDefault(); 100 $('html,body').animate({scrollTop:($(''+n.prop('href').replace(SITEURL,'')).offset().top - 100)},500); 101 }); 102 103 if($('.slides .slide').length==1){ 104 $('.slides .slide').first().addClass('active'); 105 $('.slider .arrow_l, .slider .arrow_r').remove(); 106 }else if($('.slides .slide').length>1){ 107 $('.slides .slide').first().addClass('active'); 108 o.slider(); 109 }else{ 110 $('.slider').remove(); 111 } 112 113 $('.hasMenu .menuHead i').click(function(){ 114 $(this).closest('.hasMenu').toggleClass('menuOpen'); 115 }); 116 117 /*$('.menuSolHead .fa-arrow-right').click(function(){ 118 $(this).closest('.menuSol').find('.menuSolSub').toggleClass('active'); 119 }); 120 121 $('.headerMobile2').click(function(){ 122 $('.solMenu:not(.solMenuTop)').find('.solMenuInner').toggleClass('active'); 123 $('html,body').animate({scrollTop:($('.solMenu:not(.solMenuTop)').offset().top - 55)},300); 124 }); 125 126 $('.solMenuTrigger1').click(function(){ 127 $('.solMenuTop').find('.solMenuInner').toggleClass('active'); 128 $('html,body').animate({scrollTop:($('.solMenuTop').offset().top - 100)},300); 129 });*/ 130 131 /*$(window).scroll(function(){ 132 if($(window).scrollTop()>=50){ 133 $('.topMenuFixed').removeClass('hidden'); 134 }else{ 135 $('.topMenuFixed').addClass('hidden'); 136 } 137 });*/ 138 139 $('a').click(function(e){ 140 if($(this).attr('href')=="#"){ 141 e.preventDefault(); 142 } 143 }); 144 145 if($('a[target="_light"]').length>=1){ 146 $('a[target="_light"]').fancybox({padding:0}); 147 } 148 149 }; 150 151 p.menu = function(){ 152 var o = this; 153
154 var w = $(window).width(); 155 var wt=0; 156 $('.topMenuFixed').removeClass('hidden'); 157 wt = wt + $('.leftMenu a').width(); 158 $('.leftMenu .menus').each(function(){ 159 wt = wt + $(this).width(); 160 }); 161 wt = wt + 50; 162 if(wt>w){ 163 $('.headerMobile').removeClass('hidden'); 164 $('.headerMobile2').removeClass('hidden'); 165 $('.menuMobile').removeClass('hidden'); 166 $('.logoBlock').css('padding-top','110px'); 167 $('.content').css('padding-top','10px'); 168 $('.ortaMenu').addClass('hidden'); 169 }else{ 170 $('.headerMobile').addClass('hidden'); 171 $('.headerMobile2').addClass('hidden'); 172 $('.menuMobile').addClass('hidden'); 173 $('.logoBlock').css('padding-top','50px'); 174 $('.content').css('padding-top','50px'); 175 $('.ortaMenu').removeClass('hidden'); 176 } 177 178 if($('.mansetResim').length>=1){ 179 if(w<768){ 180 $('.mansetResim').css('height','auto'); 181 }else{ 182 var h = $('.reklamCol').height(); 183 $('.mansetResim').css('height',(h-55)+'px'); 184 } 185 } 186 187 if($('.pages').length>=1){ 188 $('.pages').each(function(){ 189 var n = $(this); 190 var again=1; 191 while(true){ 192 switch(again){ 193 case 1: 194 var wp = 0; 195 n.find('.btn').each(function(){ 196 var b = $(this); 197 wp = wp + b.width() + 30; 198 }); 199 console.log(wp+" "+n.width()); 200 if(wp>n.width() - 20){ 201 if(n.find('.btn').length>5){ 202 n.find('.btn:nth-child(2)').remove(); 203 n.find('.btn:nth-last-child(2)').remove(); 204 }else{ 205 n.find('.btn').addClass('btn-sm'); 206 again=0; 207 } 208 }else{ 209 again=0; 210 } 211 break; 212 case 0: 213 return; 214 break; 215 } 216 } 217 }); 218 } 219 220 }; 221 222 p.slider = function(){ 223 var o = this; 224 var timeOut; 225 timeOut = setTimeout(function(){ 226 var n = $('.slide.active'); 227 var nn = (n.next().length==1) ? n.next() : $('.slider .slide').first(); 228 n.removeClass('active'); 229 nn.addClass('active'); 230 o.slider(); 231 },5000); 232 $('.slider .arrow_r').unbind('click'); 233 $('.slider .arrow_r').click(function(){ 234 clearTimeout(timeOut); 235 var n = $('.slide.active'); 236 var nn = (n.next().length==1) ? n.next() : $('.slider .slide').first(); 237 n.removeClass('active'); 238 nn.addClass('active'); 239 o.slider(); 240 }); 241 $('.slider .arrow_l').unbind('click'); 242 $('.slider .arrow_l').click(function(){ 243 clearTimeout(timeOut); 244 var n = $('.slide.active'); 245 var nn = (n.prev('.slide').length==1) ? n.prev() : $('.slider .slide').last(); 246 n.removeClass('active'); 247 nn.addClass('active'); 248 o.slider(); 249 }); 250 } 251 252 p._initBreakpoints = function (alias) { 253 var html = ''; 254 html += '<div id="device-breakpoints">'; 255 html += '<div class="device-xs visible-xs" data-breakpoint="xs"></div>'; 256 html += '<div class="device-sm visible-sm" data-breakpoint="sm"></div>'; 257 html += '<div class="device-md visible-md" data-breakpoint="md"></div>'; 258 html += '<div class="device-lg visible-lg" data-breakpoint="lg"></div>'; 259 html += '</div>'; 260 $('body').append(html); 261 }; 262 263 p.isBreakpoint = function (alias) { 264 return $('.device-' + alias).is(':visible'); 265 }; 266 p.minBreakpoint = function (alias) { 267 var breakpoints = ['xs', 'sm', 'md', 'lg']; 268 var breakpoint = $('#device-breakpoints div:visible').data('breakpoint'); 269 return $.inArray(alias, breakpoints) < $.inArray(breakpoint, breakpoints); 270 }; 271 272 // ========================================================================= 273 // UTILS 274 // ========================================================================= 275 276 p.callOnResize = function (func) { 277 if (this._callFunctions === null) { 278 this._callFunctions = []; 279 } 280 this._callFunctions.push(func); 281 func.call(); 282 }; 283 284 p._handleFunctionCalls = function (e) { 285 if (this._callFunctions === null) { 286 return; 287 } 288 for (var i = 0; i < this._callFunctions.length; i++) { 289 this._callFunctions[i].call(); 290 } 291 }; 292 293 // ========================================================================= 294 // DEFINE NAMESPACE 295 // ========================================================================= 296 297 window.ypenerji = window.ypenerji || {}; 298 window.ypenerji.App = new App; 299 300}(jQuery)); // pass in (jQuery): 301function git(n){ 302 window.location.href=n; 303}
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.