﻿// ----------------------
// EGEBILSIS PLUGINS
// ----------------------

(function($) {
    $.fn.extend({
	
        EtiketTemizleme: function() {
		// ETİKET TEMİZLEME EKLENTISI
		// WWF6YW461m1lckfWS1NFTCAtIFRhcmloOjA4LjA2LjIwMTE=
		$(this).each(function(){
				var $this 	= $(this);
				var element = "";
					$(this).find('span').each(function(i){
					element += $(this).html();
					$(this).remove();
					});
				$(this).append(element);
			});
        },
		AramaSonucTemizleme: function() {
		// ARAMA SONUC TEMİZLEME EKLENTISI
		// WWF6YW461m1lckfWS1NFTCAtIFRhcmloOjA4LjA2LjIwMTE=
		$(this).find('div').each(function(){
				var $this 	= $(this);
				//alert($this.html());
				
				var aranan = $this.find('p');
				if(aranan.html() !== null)
				{
					
					aranan.closest('div').prev('br').prev('h3').remove();
					aranan.closest('div').prev('br').remove();
					aranan.closest('div').next('hr').remove();
					aranan.closest('div').remove();
					// CLOSEST() denemeleri
					//aranan.closest('div').css('background-color', 'red');
					//aranan.closest('div').prev('br').prev('h3').css('background-color', 'red');
					//aranan.closest().css('background-color', 'red');
					//alert(aranan.html());
					
				}
			});
        }
		
    });
})(jQuery);


$(document).ready(function(){
	
	$('a.fancybox').fancybox();
	$("#videoarsivi").fancybox({
				'width'				: 693,
				'height'			: 519,
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
			});
	$('#foo2').carouFredSel({
		scroll: 1,
		prev: '#prev2',
		next: '#next2',
		auto: true
	});
	
	$('#jMenu').each(function(){
	
		$(this).find('ul').prepend('<li class="arrow"></li>');
	
	});
	
	




});
