/*The pack file has been developed by muslum torun
Agency: Mavi Ajans
Developer: Muslum TORUN, info@muslumtorun.com, http://muslumtorun.com
Version: 1.0
*/
$.client = {
		url: {
			full: function() {
				return location.href;
			}
		},
		browser: {
			info: function() {
				return navigator.userAgent;
			},
			isIphone: function() {
				if (navigator.userAgent.indexOf("iPhone") != -1)
					return true;
				else
					return false;
			},
			isIpad: function() {
				if (navigator.userAgent.indexOf("iPad") != -1)
					return true;
				else
					return false;
			}
		}
};

$.fn.ln = function() {
	var $this = $(this);
	return $this.prevAll().length;
};

$.fn.printme = function() {
		var _win = window.open();
		var txt = $(this).text().replace(/\n/g, "<br/>");
		_win.document.write(txt);
		_win.print();
		_win.close();
		return $(this);
};

$.fn.linktarget = function(args) {
		args = args == "" ? "" : args;
		$(this).each(function(){
			if (client.url.full().indexOf($(this).attr("href")) != -1) {
				if (args != "")
					$(this).addClass(args);
			};
		});
	return $(this);
};
