iv_site = 'iVillage';

var mtfullUrl = String(window.location);
var mtpath = mtfullUrl.split("?");
var mtpaths = mtpath[0].split("/");
// to compensate for variable iv_contenttype  set to Slideshow in individual slideshows to meet Omniture criteria
if(iv_contenttype == 'Slideshow')
{
 iv_contenttype = 'Slideshows';
}

//.........set the content-type
if ( mtpaths[2].indexOf('photos') != -1 ) {
	iv_contenttype = 'Photos';
} else if (mtpaths[2].indexOf('slideshows.momtourage.com') != -1 || mtfullUrl.indexOf('slideshow.ivillage.com/momtourage') != -1 ) {
	iv_contenttype = 'Slideshows';
	var mtmom =  'true';
} else if (mtpaths[2].indexOf('slideshow') != -1 && (mtpaths[3] == "diet" || mtpaths[3] == "health") ) {
	iv_contenttype = 'Slideshows';
	var mtdiet =  'true';
} else if (mtpaths[4].indexOf('slideshow') != -1 && mtpaths[3] == "green" ) {
	iv_contenttype = 'Slideshows';
	var mtgreen =  'true';
	
} else if (mtpaths[2].indexOf('stuffwelove') != -1 || mtpaths[2].indexOf('slideshow') != -1 ) {
	iv_contenttype = 'Slideshows';
	var mtstuff =  'true';
}  else if (mtpaths[3] == "slideshow") {
	iv_contenttype = 'Slideshows';	
} else {
	iv_contenttype = 'Blogs';
}

//domn.....site
//subdomn.....section/channel

if (iv_contenttype == "Photos") {
//................................Photos   	

	
	var mtdomn = mtpaths[2];	
	var mtsubdomn = mtpaths[3];	
	
	iv_subsection1 = mtpaths[4];
	iv_subsection2 = '';
	
	
	var mttitletemp = mtpaths[7];   
	
	
} else if (iv_contenttype == "Blogs") {
//..............................Blogs

	
	var mtdomn = mtpaths[2];
	var mtsubdomn = mtpaths[3];
	
	var mtss1 = mtdomn.split(".");
	iv_subsection1 = mtss1[0];	
	iv_subsection2 = '';
	
	if (mtpaths.length > 6 && mtpaths[6] != "") {
		var mttitletemp = mtpaths[6];		
	} else {		
		var mttitletemp = "dummyBlog"
	}
	
} else if (iv_contenttype == "Slideshows") {
//..............................Slideshows
		
	var mtdomn = mtpaths[2];
	iv_subsection1 = '';
	var mttitletemp = ''
	if (typeof mtstuff != 'undefined' && mtstuff == "true") {
        //.....................StuffWeLove slideshows
		var mtsubdomn = mtpaths[3];	
		iv_subsection1 = mtpaths[4];
		if ( typeof mtpaths[6] != 'undefined' && mtpaths[6].indexOf('.html') != -1 ) {
			iv_subsection2 = mtpaths[5];
			var mttitletemp = mtpaths[6];
		} else {
			iv_subsection2 = '';
			var mttitletemp = mtpaths[5];
		}
	} else if (typeof mtmom != 'undefined' && mtmom == "true") {
		//.....................Momtourage slideshows
		var mtsubdomn = mtpaths[3];	
		var mtchan = 'momtourage';
		
		
        
		iv_subsection2 = '';
		
	} else if (typeof mtgreen != 'undefined' && mtgreen == "true") {
		var mtsubdomn = mtpaths[3];	
		iv_subsection1 = mtpaths[6];
		iv_subsection2 = '';
		var mttitletemp = mtpaths[7];	

			
	} else if (typeof mtdiet != 'undefined' && mtdiet == "true") {
		//.....................TotalHealth Slideshows
		var mtsubdomn = mtpaths[3];	
		iv_subsection1 = mtpaths[6];
	
		if ( typeof mtpaths[8] != 'undefined' && mtpaths[8].indexOf('.html') != -1 ) {
			iv_subsection2 = mtpaths[7];
			var mttitletemp = mtpaths[8];
		} else {
			iv_subsection2 = '';
			var mttitletemp = mtpaths[7];
		}
	} else {
	    //.....................totalhealth Slideshows
                       if (mtpaths[2].indexOf('diet') != -1 || mtpaths[2].indexOf('health') != -1) {
                            var mtsubdomn = mtpaths[4];	
	      iv_subsection2 = mtpaths[5];
	      var mttitletemp = '';
	      if (typeof mtpaths[6] != 'undefined') {
	                mttitletemp = mtpaths[6];
	     }
                      } else {
                          //.....................iVillage Slideshows
		var mtsubdomn = mtpaths[4];	
		iv_subsection1 = mtpaths[5];
		var mtsubsect2 = mtpaths[6];
		var mttitletemp = mtpaths[7];
		iv_subsection2 = "";
		iv_titletag = "";

		if (typeof mtsubsect2 != 'undefined'){
			if(mtsubsect2.indexOf('.html') != -1 ) {
				var mtss2 = mtsubsect2.split(".html");
				iv_subsection2 = mtss2[0];
			} else {
				iv_subsection2 = mtsubsect2;
			}
		} else {
				iv_subsection2 = "";
		}
		if (iv_subsection2 == "index") {
				iv_subsection2 = "";
		}
                     }
	}
} 
if (typeof mttitletemp != 'undefined' ) {
		if (mttitletemp.indexOf('.html') != -1){
			mttitletemp = mttitletemp.split(".");
			iv_titletag = mttitletemp[0];
		} else {
			iv_titletag = mttitletemp;
		}	
} else {
		iv_titletag = '';
}
if (iv_titletag == "index") {
		iv_titletag = "";
}
iv_section = mtsubdomn;
if (mtsubdomn == "entertainment") {
	iv_section = "Entertainment";
} else if (mtsubdomn == "weddings") {
	iv_section = "Weddings";
} else if (mtsubdomn == "parenting") {
	iv_section = "Parenting";
} else if (mtsubdomn == "food") {
	iv_section = "Food";
} else if (mtsubdomn == "love") {
	iv_section = "Love";
} else if (mtsubdomn == "home" || mtsubdomn == "home_garden") {
	iv_section = "Home";
} else if (mtsubdomn == "ivillage") {
	iv_section = "iVillage";
} else if ( mtsubdomn == "beauty" || mtsubdomn == "beauty_style" || mtsubdomn == "beauty-style") {
	iv_section = "Beauty";
} else if ( mtsubdomn == "health") {
	//iv_site = "YourTotalHealth";
	//iv_section = "health";
                     	iv_section = "totalhealth";
	iv_subsection1 = "Health";
} else if ( mtsubdomn == "diet" || mtsubdomn == "diet_fitness") {
	//iv_site = "YourTotalHealth";
	//iv_section = "diet";
                     iv_section = "totalhealth";
	iv_subsection1 = "Diet";
} else if ( mtsubdomn == "momtourage" ) {
	iv_site = "Momtourage";
	iv_section = mtchan;
} else if ( mtsubdomn == "green" || mtsubdomn == "igo_green"  ) {	
	iv_section = "Green";
} else if ( mtsubdomn == "makeovers"  ) {	
	iv_section = "Beauty";
} 

if (mtdomn.indexOf('ivillage.co.uk') != -1){
	iv_site = 'iVillageUK';
} else if (mtdomn.indexOf('momtourage') != -1){
	iv_site = 'Momtourage';
} 