/**
 * Script set pathname which is required for ajax request
 * if application is on localhost or addres to applicaton is full hostaname tehn pathname is null
 *
 */

function getPathName()
{
	/*
	 * This function getPathName which is requiered for javascript request post or get
	 * pathName id depending on application mode development or production
	 * 	development: null
	 * 	production: Fronda
	 *
	 * @return var sPathName
	 */
	var $ia = jQuery.noConflict();
	//the trick is to get this script path and trim its own name - this way we get full path to base url 
	
	var scriptpath = $ia('script[src$="wp-includes/js/custom/pathname.js"]').attr('src');
	var pathname = scriptpath.replace(/wp-includes\/js\/custom\/pathname.js/,'');
	
	return pathname;
	
	
	
	
}
