// previous page
$(function() {

	/* not sure where this is used. */
	/*
	var ppLinks = $('.previous-page');
	var totalPPLinks = ppLinks.length;
	
	for(var i = 0; i < totalPPLinks; i++) {
		
		ppLinks[i].onclick = previousPage;
	}
	*/
	
	
	function previousPage() {
		
		history.back();
		
		return false;
	}
	
});

/** Function for opneing old school pop up windows **/
$(function () {
	
	$("a")
	 	// add additional filters for pop up windows of different sizes
   		.filter(".newindow")
     		.click(function(){
      			 window.open(this.href,"_blank","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=500,height=425");
    			 return false;
     		})
   		.end();
	
	$(".newindow").attr("title","This link opens in a new window");

}
); 

function reportBehavior(obj) {
	URL = $(obj).attr("href");
	myCurrentPopupWindow = window.open(URL,'reportBehavior','location=0,status=0,menubar=0,toolbar=0,resizable=0,width=500,height=475')
};

function windowMessageDesigner(obj) {
	URL = $(obj).attr("href");
	myCurrentPopupWindow = window.open(URL,'messageDesigner','location=0,status=0,menubar=0,toolbar=0,resizable=0,width=500,height=350')
};

function windowFriendRequest(obj) {
	URL = $(obj).attr("href");
	myCurrentPopupWindow = window.open(URL,'friendRequest','location=0,status=0,menubar=0,toolbar=0,resizable=0,width=500,height=350')
};

function windowShareOutfitWithFriend(obj) {
	URL = $(obj).attr("href");
	myCurrentPopupWindow = window.open(URL,'emailFriend','location=0,status=0,menubar=0,toolbar=0,resizable=0,width=600,height=550')
};