(function($){'use strict';(function($){$.fn.appear=function(fn,options){var settings=$.extend({data:undefined,one:true,accX:0,accY:0},options);return this.each(function(){var t=$(this);t.appeared=false;if(!fn){t.trigger('appear',settings.data);return;}var w=$(window);var check=function(){if(!t.is(':visible')){t.appeared=false;return;}var a=w.scrollLeft();var b=w.scrollTop();var o=t.offset();var x=o.left;var y=o.top;var ax=settings.accX;var ay=settings.accY;var th=t.height();var wh=w.height();var tw=t.width();var ww=w.width();if(y+th+ay>=b&&y<=b+wh+ay&&x+tw+ax>=a&&x<=a+ww+ax){if(!t.appeared)t.trigger('appear',settings.data);}else{t.appeared=false;}};var modifiedFn=function(){t.appeared=true;if(settings.one){w.unbind('scroll',check);var i=$.inArray(check,$.fn.appear.checks);if(i>=0)$.fn.appear.checks.splice(i,1);}fn.apply(this,arguments);};if(settings.one)t.one('appear',settings.data,modifiedFn);else t.bind('appear',settings.data,modifiedFn);w.scroll(check);$.fn.appear.checks.push(check);(check)();});};$.extend($.fn.appear,{checks:[],timeout:null,checkAll:function(){var length=$.fn.appear.checks.length;if(length>0)while(length--)($.fn.appear.checks[length])();},run:function(){if($.fn.appear.timeout)clearTimeout($.fn.appear.timeout);$.fn.appear.timeout=setTimeout($.fn.appear.checkAll,20);}});$.each(['append','prepend','after','before','attr','removeAttr','addClass','removeClass','toggleClass','remove','css','show','hide'],function(i,n){var old=$.fn[n];if(old){$.fn[n]=function(){var r=old.apply(this,arguments);$.fn.appear.run();return r;}}});})(jQuery);})(jQuery); var ptotal=0; var topy=0; var topid=''; var menutop=0; $(document).ready(function() { var counter = $('[data-count]'); if (counter.length) { counter.appear(function() { counter.each(function() { var e = $(this), a = e.attr("data-count"); //console.log(a); $({ countNum : e.text() }).animate({ countNum : a }, { duration : 8e3, easing : "linear", step : function() { e.text(Math.floor(this.countNum)); //console.log(this.countNum); }, complete : function() { e.text(this.countNum); //console.log("eeeeeee"); } }); }); }); } mobil=1; if(!$('#myViewport').attr('id'))mobil=""; w=$( window ).width(); if($('#altkisim').length) { h=$( window ).height(); alth=$('#ualtkisim').offset().top+$('#ualtkisim').outerHeight(); bh=h-alth; //console.log($('.mainbag').length+" bh="+bh+" h="+h+" "+alth); if(bh>0 && $('.mainbag').length==0) $('#wbody').css('height',parseInt($('#wbody').css('height'))+bh); } bw=$('body').width(); //console.log("w="+w); if(w>480 && w<1200) { //console.log("w="+w); $('.container').css('width','100%'); $('#ustkisim,#ana,#altkisim').removeClass("container"); $('#uustkisim,#wbody,#ualtkisim,.mustek').css('width','1170px'); $('#uustkisim,#wbody,#ualtkisim,.mustek').css('min-width','1170px'); $('.container').removeClass("container"); } //wdebug("\nwindow.width="+w+" screen.width="+screen.width+" body.width="+bw); //console.log($('#ana').offset().left); vv=0; if(w>360 && w<=480) { ww=parseInt((w-360)/2); //console.log("ww="+ww); $('#ustkisim,#ana,#altkisim').css("margin-left",ww); //$('[data-wtype=menu]').css("margin-left",-ww); } if(w<360) { vv=w/360; vv=precisionRound(vv, 2); //console.log("vievport="+vv); $('#myViewport').attr('content','width=device-width, initial-scale='+vv); } if(w>480 && w<1200) { vv=w/1170; vv=precisionRound(vv, 2); console.log("vievport="+w+" "+vv); $('#myViewport').attr('content','width=device-width,user-scalable=0,initial-scale='+vv); var ssupportsTouch = 'ontouchstart' in window || navigator.msMaxTouchPoints; //console.log("ssupportsTouch="+ssupportsTouch); if(!ssupportsTouch) { html=''; $(html).appendTo('body'); } //$('#myViewport').remove(); } $( window ).on( "orientationchange", function( e ) { w=$( window ).width(); bw=$('body').width(); orientation=e.orientation; window.location.reload(); //wdebug("orientation="+orientation+" window.width="+w+" screen.width="+screen.width+" body.width="+bw); //if(w>480 && w<1200 && orientation=="90") //{ //vv=w/1280; //vv=precisionRound(vv, 2); //wdebug("vievport="+w+" "+vv); //wdebug("orientation="+orientation+" window.width="+w+" stcreen.width="+screen.width+" body.width="+bw+" scale="+vv); //$('#myViewport').attr('content','width=device-width,initial-scale='+vv); //window.location.reload(); //} //if(orientation=="0") //{ //window.location.reload(); //wdebug("orientation="+orientation+" window.width="+w+" screen.width="+screen.width+" body.width="+bw+" scale=1"); //$('#myViewport').attr('content','width=device-width, initial-scale=1'); //} }); }); function precisionRound(number, precision) { var factor = Math.pow(10, precision); return Math.round(number * factor) / factor; } function wdebug(gelen) { $.ajax({type: "POST",url: "https://site.webservis.com.tr/sayfam/b/php/log.php",data: { data:gelen}}); } function listecounter() { var counter = $('[data-count]'); if (counter.length) { counter.appear(function() { counter.each(function() { var e = $(this), a = e.attr("data-count"); aa= e.attr("data-count-ek"); if(!aa)aa=""; //console.log(aa); $({ countNum : e.text() }).animate({ countNum : a }, { duration : 8e3, easing : "linear", step : function() { //addCommas(this.countNum); e.text(Math.floor(this.countNum)+aa); //console.log(this.countNum); }, complete : function() { this.countNum=addCommas(this.countNum); e.text(this.countNum+aa); //console.log("eeeeeee"); } }); }); }); } } /* ======================================================================== * Tutorial specific Javascript * * ======================================================================== * Copyright 2015 Bootbites.com (unless otherwise stated) * For license information see: http://bootbites.com/license * ======================================================================== */ $(document).ready(function() { var dropdownSelectors = $('.dropdown'); // Custom function to read dropdown data // ========================= function dropdownEffectData(target) { // @todo - page level global? var effectInDefault = null, effectOutDefault = null; var dropdown = $(target), dropdownMenu = $('.dropdown-menu', target); var parentUl = dropdown.parents('ul.nav'); // If parent is ul.nav allow global effect settings if (parentUl.size() > 0) { effectInDefault = parentUl.data('dropdown-in') || null; effectOutDefault = parentUl.data('dropdown-out') || null; } return { target: target, dropdown: dropdown, dropdownMenu: dropdownMenu, effectIn: dropdownMenu.data('dropdown-in') || effectInDefault, effectOut: dropdownMenu.data('dropdown-out') || effectOutDefault, }; } // Custom function to start effect (in or out) // ========================= function dropdownEffectStart(data, effectToStart) { if (effectToStart) { data.dropdown.addClass('dropdown-animating'); data.dropdownMenu.addClass('animated'); data.dropdownMenu.addClass(effectToStart); } } // Custom function to read when animation is over // ========================= function dropdownEffectEnd(data, callbackFunc) { var animationEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend'; data.dropdown.one(animationEnd, function() { data.dropdown.removeClass('dropdown-animating'); data.dropdownMenu.removeClass('animated'); data.dropdownMenu.removeClass(data.effectIn); data.dropdownMenu.removeClass(data.effectOut); // Custom callback option, used to remove open class in out effect if(typeof callbackFunc == 'function'){ callbackFunc(); } }); } // Bootstrap API hooks // ========================= dropdownSelectors.mouseover(function() { var dropdown = dropdownEffectData(this); if(dropdown.effectIn!="slide") dropdownEffectStart(dropdown, dropdown.effectIn); }); $(".menuslide").hover( function() { $('.dropdown-menu', this).not('.in .dropdown-menu').stop(true,true).slideDown("200"); $(this).toggleClass('open'); }, function() { $('.dropdown-menu', this).not('.in .dropdown-menu').stop(true,true).slideUp("50"); $(this).toggleClass('open'); } ); //$(".mobilsag").click(function(e) { $(".mobilsag").on('touchstart click', function(e) { //wdebug("mobil sag click 1"); e.preventDefault(); e.stopPropagation(); alt_id1=""; if($(this).parent().parent().hasClass("dropdown-submenu")) alt_id1=1; //if(!alt_id1) //$('.dropdown-menu').hide(); //$(this).parent().parent().find('.dropdown-menu').eq(0).hide(); if($(this).find('i').hasClass('fa-window-minimize')) { $(this).find('i').removeClass('fa-window-minimize'); $(this).find('i').addClass('fa-plus'); $(this).parent().parent().find('.dropdown-menu').eq(0).css('display','none'); } else if($(this).find('i').hasClass('fa-plus')) { /* if(!alt_id1) { $('.dropdown-menu').hide(); $('.dropdown .mobilsag i').removeClass('fa-window-minimize').addClass('fa-plus'); } */ $(this).find('i').removeClass('fa-plus'); $(this).find('i').addClass('fa-window-minimize'); //$(this).parent().parent().find('.dropdown-menu').eq(0).show(); $(this).parent().parent().find('.dropdown-menu').eq(0).css('display','grid'); } }); var supportsTouch = 'ontouchstart' in window || navigator.msMaxTouchPoints; if(w<481) { $('.dropdown .fa-caret-right').each(function () { $(this).removeClass('fa-caret-right'); $(this).addClass('fa-caret-down'); if($(this).parent().parent().find('.dropdown-menu').eq(0).css('left')=="100%") $(this).parent().parent().find('.dropdown-menu').eq(0).css('left',0); }); } //$(".dropdown>a").click(function(e) { $(document).on('click', '.dropdown>a,.dropdown-submenu>a' , function(e) { noclick=$(this).attr('noclick'); if(noclick=="1") { e.preventDefault(); e.stopPropagation(); } return; if(w>=481 && supportsTouch) e.preventDefault(); if(w<481) { //wdebug("drop a click"); e.preventDefault(); e.stopPropagation(); //$('.dropdown-menu').hide(); mobilsag=$(this).parent().find('.mobilsag').eq(0).find('i'); if(mobilsag.hasClass('fa-plus')) { $('.dropdown .mobilsag i').removeClass('fa-window-minimize').addClass('fa-plus'); mobilsag.removeClass('fa-plus'); mobilsag.addClass('fa-window-minimize'); $(this).parent().find('.dropdown-menu').eq(0).show(); } else if(mobilsag.hasClass('fa-window-minimize')) { mobilsag.removeClass('fa-window-minimize'); mobilsag.addClass('fa-plus'); $(this).parent().find('.dropdown-menu').eq(0).hide(); } } }); }); function gototab(id,i) { $('#'+id+'tab a[aria-controls="'+id+'tab'+i+'"]').tab('show'); $('#'+id+'tabc .tab-pane').removeClass('active'); $('#'+id+'tab'+i).addClass('active'); $('#'+id+'tab'+i).addClass('animated fadeIn'); } function param(name) { return (location.search.split(name + '=')[1] || '').split('&')[0]; } function ngetcss(gcss,value) { var css=gcss; value=";"+value; var deger=""; if(css.search(";")>=0)css=css+":"; else css=";"+css+":"; if(!value) return deger; res = value.split(css); if(res[1]) { res1 = res[1].split(";"); deger=res1[0]; } return deger; } //end css function doAnimations( elems ) { var animEndEv = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend'; elems.each(function () { var $this = $(this), $animationType = $this.data('animation'); $this.addClass($animationType).one(animEndEv, function () { $this.removeClass($animationType); }); }); } function geth() { var $parent = $("#ana,#wbody"), maxheight = 0, currentheight = 0, currentposition; $parent.children().each(function(index, element) { currentposition = $(element).position(); if( $(element).attr("data-wtype") ) { currentheight = currentposition.top + $(element).height() ; if(currentheight > maxheight) maxheight = currentheight; } }); $("#ana").height(maxheight+50); return maxheight; } //end geth function popup(t,uyari,width) { $('#popup').remove(); if(uyari) t="
"+t+"
"; h=''; if(!width)width=300; $(h).appendTo('body'); $( "#popup" ).dialog({width:width,modal: false,autoOpen: true,draggable: false}).parent().draggable({handle: ".hust"}); } $(window).load(function () { $('[isotope]').each(function(){ idd='#'+$(this).attr('id'); per="25"; var multiabc = { }; ogesayisi=$(this).attr('ogesayisi'); isotopekat=$(this).attr('isotopekat'); mitemsayisi=$(this).find('.mitem').length; if(mitemsayisi"); $(idd+' .listeiso').children().each(function(){ iddd_offset_top=parseInt($(this).offset().top); maxh=$(this).outerHeight(); if(!multiabc[iddd_offset_top+'h']) multiabc[iddd_offset_top+'h']=maxh; else if(maxh>multiabc[iddd_offset_top+'h'])multiabc[iddd_offset_top+'h']=maxh; }); $(idd+' .listeiso').children().each(function(){ iddd_offset_top=parseInt($(this).offset().top); maxh=multiabc[iddd_offset_top+'h']; $(this).css('height',multiabc[iddd_offset_top+'h']); }); isotopefilter="*"; if(isotopekat) { isotopefilter=isotopekat; console.log(isotopefilter); $(this).find('[data-filter="'+isotopekat+'"]').addClass(idd.replace("#","")+"listekategori"); } else $(this).find('[data-filter="*"]').addClass(idd.replace("#","")+"listekategori"); $(idd+' .listeiso').isotope({itemSelector: '.mitem',layoutMode: 'masonry', filter:isotopefilter, masonry: { /*columnWidth: '.grid-sizer'*/ }}); $(idd+' .kategori div').on('click',function(){ $(idd+' .kategori div').removeClass(idd.replace("#","")+"listekategori"); $(this).addClass(idd.replace("#","")+"listekategori"); var selector = $(this).attr('data-filter'); $(idd+' .listeiso').isotope({ layoutMode: 'masonry', filter: selector, animationOptions: { duration: 450, easing: 'linear', queue: false, } }); }); $(idd+' .kategori select').on('change',function(){ selector=""; $(idd+' .kategori select').each(function(i) { if($(this).val() && selector) selector = selector+$(this).val(); if($(this).val() && !selector) selector = $(this).val(); }); console.log("selector="+selector); $(idd+' .listeiso').isotope({ layoutMode: 'masonry', filter: selector, animationOptions: { duration: 450, easing: 'linear', queue: false, } }); }); }); $(".se-pre-con1").fadeOut("slow"); new WOW().init(); }); $.fn.isolatedScroll = function() { this.bind('mousewheel DOMMouseScroll', function (e) { var delta = e.wheelDelta || (e.originalEvent && e.originalEvent.wheelDelta) || -e.detail, bottomOverflow = this.scrollTop + $(this).outerHeight() - this.scrollHeight >= 0, topOverflow = this.scrollTop <= 0; if ((delta < 0 && bottomOverflow) || (delta > 0 && topOverflow)) { e.preventDefault(); } }); return this; }; function addCommas(nStr) { nStr += ''; x = nStr.split('.'); x1 = x[0]; x2 = x.length > 1 ? '.' + x[1] : ''; var rgx = /(\d+)(\d{3})/; while (rgx.test(x1)) { x1 = x1.replace(rgx, '$1' + ',' + '$2'); } return x1 + x2; } function funcbeceri(bid,wsl) { bid='#'+bid; if($(bid).attr('beceristop'))return; $(bid).attr('beceristop','1'); $(bid).removeAttr('beceri'); $(bid+' .mitem *[wsl='+wsl+']').each(function(e){ yuzde=''; text=$(this).text(); te=text.trim(); te=text.split(' '); for (i = 0; i < te.length; i++) { if(te[i].search('%')>=0) { tee=te[i].split('%'); yuzde=tee[0]; } } if(yuzde) { yuzde=yuzde+'%'; yuzdehtml=' '+yuzde+''; text=text.replace(new RegExp(yuzde, 'g'), ''); $(this).html(text+yuzdehtml); $(this).parent().parent().animate({width: yuzde},2500); //$(this).parent().parent().css('width',yuzde); } }); } $.fn.parallax = function (resistance, mouse) { $el = $(this); TweenLite.to($el, 0.2, { x: -((mouse.clientX - (window.innerWidth / 2)) / resistance), y: -((mouse.clientY - (window.innerHeight / 2)) / resistance) }); }; (function ($) { "use strict"; $(document).mousemove(function (e) { $('.efektmousemove5').parallax(-5, e); $('.efektmousemove1').parallax(-20, e); $('.efektmousemove2').parallax(100, e); $('.efektmousemove3').parallax(30, e); $('.efektmousemove4').parallax(40, e); }); }(jQuery));