/*Plugin: jquery.mavi.js Autor: Mavi Ajans | Müslüm TORUN Date: 14.09.2009 Version: v1.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;break;case "fulldate":resultday = shrDate.getDate() + "." +shrDate.getMonth()+"."+parseFloat(shrDate.getYear()+1900);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"});}};};})(jQuery);
