/*Plugin: jquery.mavi.js Autor: Mavi Ajans | Müslüm TORUN E-Mail: by_muslum@hotmail.comDate: 14.09.2009 Last Update: 06.10.2009 Version: v2.1 */(function($){		/*#settings=ct|cm|lt|rt|lm|rm|lb|cb|rb (c:center,m:middle,t:top,l:left,r:right,b:bottom)*/		$.fn.jVAlign = function(settings) {		var _ww = $(window).width();		var _wh = $(window).height();		var _objW = $(this).width();		var _objH = $(this).height();				var _newW = (_ww-_objW)/2;		var _newH = (_wh -_objH)/2;	settings = String(settings);		switch (settings) {			case "ct": { 				$(this).css({"position":"absolute","left":_newW+"px","top":"0px"});				break;			}					case "cm": { 				$(this).css({"position":"absolute","left":_newW+"px","top":_newH+"px"});				break;			}			case "lt": {				$(this).css({"position":"absolute","left":"0px","top":"0px"});				break;			}			case "rt": {				$(this).css({"position":"absolute","right":"0px","top":"0px"});				break;			}				case "lm": {				$(this).css({"position":"absolute","left":"0px","top":_newH+"px"});				break;			}			case "rm": {				$(this).css({"position":"absolute","right":"0px","top":_newH+"px"});				break;			}				case "lb": {				$(this).css({"position":"absolute","left":"0px","bottom":"0px"});				break;			}				case "cb": {				$(this).css({"position":"absolute","left":_newW+"px","bottom":"0px"});				break;			}						case "rb": {				$(this).css({"position":"absolute","right":"0px","bottom":"0px"});				break;			}															}			};		/*bookmark ie+mozilla, (title, url)*/	$.fn.jSetBookmark = function(_bset){		$(this).click(function(){			_bset = $.extend({title: "",url: ""}, _bset);			if (document.all) {				window.external.AddFavorite(_bset.url, _bset.title);} 				else if (window.sidebar) {window.sidebar.addPanel(_bset.title, _bset.url,"");}				});};			/*loadFrame*/	$.fn.jLoadFrame = function(_frameset) {		$.extend({src: "", border: "",width:"", height:"", scrolling:"auto"}, _frameset);			var _src = "<iframe src="+_frameset.src+" scrolling="+_frameset.scrolling+" style=width:"+_frameset.width+";height:"+_frameset.height+";border:"+_frameset.border+"></iframe>";		$(this).html(_src);};			/*blurFocus*/	$.fn.jBlurFocus=function(settings){		$(this).val(settings);		$(this).focus(function(){			if ($(this).val()==settings){				$(this).val("");}});		$(this).blur(function(){			if (($(this).val()==null)||($(this).val()=="")){				$(this).val(settings);}});};			/*date (dataType: day|dayOfweek|month|year|fulldate*/	$.jDate = function(dateType){		var shrDate = new Date();		var resultday;		switch(dateType) { 		case "day":resultday = shrDate.getDate();break;		case "dayOfweek":resultday = shrDate.getDay();break;		case "month":resultday = shrDate.getMonth();break;		case "year":resultday = shrDate.getYear()<1900 ? shrDate.getYear()+1900 : shrDate.getYear();break;		case "fulldate":resultday = shrDate.getDate() + "." +shrDate.getMonth()+"."+shrDate.getYear()<1900 ? shrDate.getYear()+1900 : shrDate.getYear();break;		case "minutes":resultday = shrDate.getMinutes();break;		case "hours":resultday = shrDate.getHours();break;		case "seconds":resultday = shrDate.getSeconds();break;		case "fulltime":resultday = shrDate.getHours() + ":" +shrDate.getMinutes() + ":" +shrDate.getSeconds();		}					return resultday;};			/*linkInform: link üzerinde açıklama settings: (title) eğer title boş ise içeriği okur*/	$.fn.jLinkInform = function(settings) {		settings = $.extend({title:""},settings);		  if (settings.title=="" || settings.title==null) {			$(this).each(function(){				$(this).attr("title", $(this).text());			});		  }		  else {		  	$(this).attr("title", settings.title);		  }	};		/*footer ayarları settings:referans element*/	$.fn.jFooter = function(settings) {		var element = this;			SetResize();			$(window).bind("resize", function() {				SetResize();			});	function SetResize() {		var _footerHeight = $(element).height();		var _refHeight = $(settings).height();		var _winHeight = $(window).height();		if (_footerHeight+_refHeight < _winHeight) {			$(element).css({"margin-top":parseFloat((_winHeight)-(_footerHeight+_refHeight))+"px"});		}		else {			$(element).css({"margin-top":"15px"});		}	  };	};		/*isIphone:tarayıcı iphhone mi*/	$.isIphone = function() {		var _agent = navigator.userAgent.toLowerCase();		var _iphone = (_agent.indexOf("iphone")!=-1);		return _iphone;	};		/*jMarquee settings: direction:top,left,up,down|scrollamount:integer*/	$.fn.jMarquee = function(settings) {		settings = $.extend({direction:"up",scrollamount:"3", height:"120"},settings);		var _html = "<marquee direction="+settings.direction+" scrollamount="+settings.scrollamount+" onmouseover=this.stop() onmouseout=this.start() height="+settings.height+">";		$(this).html()+"</marquee>";		$(this).wrapInner(_html);	};		/*jTool --> Developing...*/	jQuery.fn.jTool = function(_settool) {		_settool=jQuery.extend({speed:"",bgColor:"#333333",fontColor:"#ffffff",text:"",border:"none"},_settool);		jQuery(this).mouseover(function(e){			jQuery(this).before("<span id=titleTool></span>");			var ttX = e.pageX+12;			var ttY = e.pageY-10;			jQuery("#titleTool").fadeIn(_settool.speed);			jQuery("#titleTool").css({"position":"absolute","left":""+ttX+"px","top":""+ttY+"px","z-index":"100"});			jQuery("#titleTool").css({"background-color":""+_settool.bgColor+"","color":""+_settool.fontColor+"","padding":"5px","font-size":"10px","font-family":"tahoma","border":""+_settool.border+""});			jQuery("#titleTool").html(_settool.text);			if (jQuery("#titleTool").width()>200){				jQuery("#titleTool").css({"width":"200px"});}});		jQuery(this).mouseout(function(){jQuery("#titleTool").fadeOut(_settool.speed);});		};				/*jEmbed-->referance: jembed.swf and jquery.flash*/		$.fn.jEmbed = function(settings) {			settings = $.extend({src: "jEmbed.swf", width: "", height: ""}, settings);			/*var _id = $(this).attr("class");*/			var _txt = $(this).text();			$(this).empty();			$(this).flash({				src: settings.src+"?txt="+_txt,				wmode: "transparent", width: settings.width,				height: settings.height, menu:0			});	};		/*kullanılan ie nin versionunu getirir.*/	$.jIECheck = function() {			var _msie=false;			var _version=0;			$.each($.browser, function(i, val){				if (i=="version") { _version = val};				if (i=="msie") {					_msie = val;				}			});					if (_msie) {			return _version;		}	};		/*jInfo: küçük bilgi*/	$.jInfo = function(settings) {		settings = $.extend({text:""}, settings);			CreateInfoBar();				$(window).bind("resize", function(){					CreateInfoBar();				});					function CreateInfoBar() {			var _div = "<div class='jInform-class' style='position:absolute;width:100%;top:-28px;left:0px;background-color:#fbeb91;";			_div += "padding:5px 10px 5px 10px;font-family:arial;font-size:10px;border-bottom:1px solid #dac552'>"+settings.text+"</div>";			$("body").append(_div);			$(".jInform-class").animate({top:0},"slow");			$(".jInform-class").mouseover(function(){				$(this).css({"cursor":"pointer"});					$(this).click(function(){						$(this).animate({top:-28},"slow");					});			});		}	};})(jQuery);