﻿/* * Coder: Abdullah Tekin * ============================================ * * Copyright (c) by Abdullah Tekin (tekinonline@hotmail.com) * http://www.phpsistem.com * http://www.abdullahtekin.com * http://www.sanalkurs.net * * Her Hakkı Saklıdır, İzinsiz Kullanılamaz! *//* HATA FONKSİYONU *****************************************************************************************************/function hata(msj,zamanasimi,title) {		/*	if($.blockUI){		 $.blockUI({		  message: msj,		  css: { 		   border:'none', padding:'15px', size:'12.0pt',		   backgroundColor:'#900', color:'#fff',		   opacity:'.8','-webkit-border-radius': '10px','-moz-border-radius': '10px'		  }		 });		 window.setTimeout($.unblockUI, zamanasimi);	} else {		alert(msj);		return false;	}	*/		if(title) {		jAlert(msj, title);	} else {		jAlert(msj, 'Hata');	}}/* NUMBER FORMAT *****************************************************************************************************/function number_format( number, decimals, dec_point, thousands_sep ) {     var n = number, c = isNaN(decimals = Math.abs(decimals)) ? 2 : decimals;    var d = dec_point == undefined ? "," : dec_point;    var t = thousands_sep == undefined ? "." : thousands_sep, s = n < 0 ? "-" : "";    var i = parseInt(n = Math.abs(+n || 0).toFixed(c)) + "", j = (j = i.length) > 3 ? j % 3 : 0;        return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : "");}function kaybet(seciciler,sure) {	setTimeout(function(){ 		$(seciciler).fadeOut();	}, 5000);}/* HABER SAYFASI *****************************************************************************************************/function yorum_sayfa(id, no) {	$('.ref_loading').show(); 				$.ajax({		type: "GET",		url: site_url+"ajax/yorum/"+id+"/"+no,		success: function(msg) {			$('.ref_loading').hide(); 			$(".yorum_liste").html(msg); 		}	});} /* JQUERY *****************************************************************************************************/$(function(){	var ie     = $.browser.msie;	var body  = parseInt($('body').width());	var govde = parseInt($('#govde').width());	var fark  = (body - govde) / 2 + govde +2;	$('.geri_don').css("left",""+fark+"px").show();	if(ie==false) {		$('textarea').autogrow();	}	// Dialog				$('#dialog').dialog({		bgiframe: true,		modal: true,		autoOpen: false,		width: 500	});		// Pencere	$(".win").click(function(){		var url    = $(this).attr('href');		var title  = $(this).attr('title');		var width  = $(this).attr('width');		var height = $(this).attr('height');		$("#dialog").load(url).dialog('option','width',width).dialog('option','height',height).dialog('option','title',title).dialog('open');		return false;			});	// Tab Menüs	$('.tabs').tabs({ spinner: '' }, { ajaxOptions: { async: false } });	$('.tabs2').tabs({ spinner: '' }, { ajaxOptions: { async: false } });	$("#tel, #gsm").mask("9 (999) 999 99 99");	$("#tckimlik").numeric().mask("99999999999");	$('#kartno').numeric();		$("#slide").cycle({		fx: 'fade',		speed: 'slow', 		timeout: 7000 	});	// Other Categories	$("div.categories ul li").mouseover(function() {		//if(timer) clearTimeout(timer); 				$(this).children("ul").show();	}).mouseout(function(){        //timer = setTimeout(function(){ $("div.categories ul li ul").hide(); }, 1000);		$("div.categories ul li ul").hide();	});			// Other Categories});	// Pencere	function ajax_pencere(url, width, height, title) {		$("#dialog").load(url).dialog('option','width',width).dialog('option','height',height).dialog('option','title',title).dialog('open');		return false;			}	// Takvim Göster	function takvim(tarih, width, height) {		var title = "Fazilet Takvimi Arka Sayfa";				var aylar = new Array("","Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık");		var ayir  = tarih.split("-");		if(ayir[1]!=10) {			var ay    = ayir[1].replace('0','');		} else {			var ay    = ayir[1];		}		var gun   = ayir[2];		var yil   = ayir[0];		var tarih2= gun+" "+aylar[ay]+" "+yil;		title     = title+" / "+tarih2;		$("#dialog").load("ajax/takvim_goster/"+tarih+"").dialog('option','width',width).dialog('option','height',height).dialog('option','title',title).dialog('open');		return false;			}
