var myDeco={};







myDeco.settings = {

SITE_URL:"http://mydeco.com/",
SECURE_SITE_URL:"https://mydeco.com/",
MICROSITE_CATEGORY_NAME: null,
SEARCH_NO_PROCESS_URL_PARAMS: false,

STATIC_URL:"http://cdn.mydeco.com/media/",
MEDIA_URL:"http://cdn.mydeco.com/media/data/",
PRODUCT_MEDIA_URL:"http://cdn5.mydeco.com/product_images/",
SUPPLIER_MEDIA_URL:"http://cdn5.mydeco.com/",
IMAGE_TRANSFORM_SERVICE:'http://media.dev.mydeco.com/t',
DEFAULT_AVATAR_IMG:'http://cdn2.mydeco.com/media/19067/img/profile/user-photo.jpg',
DEFAULT_AVATAR_THUMB_IMG:'http://cdn2.mydeco.com/media/19067/img/profile/user-photo.jpg',
DEFAULT_BTL_IMG:"img/defaults/room-placeholder.png",
IMAGE_URL_NOIMAGE:"img/blank.gif",
BLANK_IMG:"http://cdn2.mydeco.com/media/2006/img/blank.gif",
SEARCH_BASE_URL:"/search/",
FCKEDITOR_BASE:"/media/js/fckeditor/",
PAGINATE_BY:'10',
AUTOCOMPLETE_URL:'http://mydeco.com/ws/complete/',
OMNITURE_ACCOUNT:'mydecocom',
TRACKING_TAGS:[{"cookieAge": 180, "type": "partner", "cookieName": "partner", "paramName": "partner"}, {"cookieAge": 90, "type": "campaign", "cookieName": "rw.cm", "paramName": "rw.cm"}, {"cookieAge": 30, "type": "internal", "cookieName": "srcid", "paramName": "srcid"}],
ie6LoadAds:true,
AUTH_COOKIE_NAME:'authtoken',
AUTH_COOKIE_DOMAIN:'.mydeco.com',
USER_DATA_COOKIE_NAME:'user_data',
USER_DATA_COOKIE_DOMAIN:'.mydeco.com',
SHORTLIST_COOKIE_NAME:'shortlist',
LOCALECONV: {"mon_decimal_point": ".", "int_frac_digits": 2, "p_sep_by_space": 0, "frac_digits": 2, "thousands_sep": ",", "n_sign_posn": 1, "decimal_point": ".", "int_curr_symbol": "GBP ", "n_cs_precedes": 1, "p_sign_posn": 1, "mon_thousands_sep": ",", "negative_sign": "-", "currency_symbol": "\u00a3", "n_sep_by_space": 0, "mon_grouping": [3, 3, 0], "p_cs_precedes": 1, "positive_sign": "", "grouping": [3, 3, 0]},
PROFILE_OBJECTS_PER_ROW: 3,
MINIME_STORAGE_KEY: "minime-room"
};
myDeco.settings.FBC_API_KEY = 'f9eb34090781642639177e236d4464a8';
var glam_section_mapping = {

'adfero':'',
'basket':'',
'buythelook ':'358268631',
'christmas':'358268155',
'community':'358268634',
'competition':'',
'deal-of-the-week':'',
'design-tips':'',
'editorial':'358268633',
'home':'362839072',
'internalerror':'',
'knowledge':'358268156',
'notfound':'',
'products':'358268635',
'model-editor':'358268632',
'rooms':'',
'search':'358268158',
'shopping':'358268155',
'sale':'358268155',
'Sitemap':'',
'design':'358268632'

};


 
//Messages
if (typeof(myDeco)=="undefined") myDeco = {};
var url = false; //replace url vars references below with correct url

// existing urls in comments
myDeco.urls = {

resendEmail:"/account/resend_confirmation/",
requestPasswordReset:"/account/password_reset/ajax/",
sendMessage:"/mail/compose-ajax/",
sendMessageSuggestRecipient:"/mail/friend_suggest/",
deleteThread:"/people/message/delete/ajax/",// deleting message thread for specific user by thread id
markAsRead:"/people/message/mark-read/ajax/", // mark thread as read (doesn't exist yet)
postToDiscussion:url,
//account
account:"/people/",
accountDelete:"/account/delete/",
userLoginQuick:"/account/login-quick/",
userLogin:"/account/login/",
userLoginFacebook:"/account/login/facebook/",
register:"/account/register/",
ajaxIframeLogin:"/account/ajax_iframe_login_test/",
//registration (account)
checkUsername:"https://mydeco.com/account/check_username/ajax/",
follow:"/profiles/follow/ajax/",
// comments
approveComment:"/comment/approve/ajax/",
//blogs
deleteBlogArticle:"/people/blog/delete-article/ajax/",
//rooms
notMyStyle:url, //missing functionality?
markRoomFav:"/rooms/fav/", //mark room as favourite
markRoomPub:"/rooms/public/", //mark room as public
markRoomPrivate:"/rooms/private/", //mark room as private
deleteRoom:"/rooms/delete/", //delete room
shortlistAllFromRoom:"/rooms/shortlist-ajax/",
room:"/rooms/detail/",
dmpUploadIframe:'/rooms/decorate-my-photo/upload/iframe/',
//profile
addRoom:url, //add new room
addPhotoLocal:url, // we can't add image from local computer through ajax
addPhotoUrl:"/scrapbook/pictures/add_url/ajax/", //add new photo from url
addToMyPhotos:"/scrapbook/add_to_my/", //add photo to user's scrapbook
addNote:"/scrapbook/note/add/ajax/",
addVideo:url, //missing functionality
copyRoom:"/product/shortlist/ajax/", //add product to shortlist
copyPhoto:url, //
deleteScrapbookItem:"/scrapbook/scrapbook-delete/ajax/",
scrapbookmarklet:'/scrapbook/bookmarklet.html',
scrapbookUploadIframe:'/scrapbook/pictures/add/iframe/',
editStrapline:"/account/set-strapline/", //user profile strapline
addRoomPhoto: "/people/edit-room-photo-ajax/",
addRoomPhotoMyDeco: "/people/edit-room-photo-mydeco-ajax/",
objectsCount: "/people/objects-count/ajax/",
//rating
setScore:"/score/set-score/ajax/", //sets score for specific object by content-type and object id
getScore:"/score/get-score/ajax/",
getUserScore:"/score/get-user-score/ajax/", //gets score for current user by content-type and object id
canRate:"/score/can-rate/ajax/",
canRateMulti:"/score/can-rate-multi/ajax/",
deleteObject: "/common/delete_object/ajax/",

//search
autoComplete:"/ws/complete/", // "/complete/"
search:"/search/", // "/search/"
search_ajax:"/search/ajax/",
btl_search_ajax:"/buy-the-look/search/ajax/",

//product
product:'/product/',
removeShortlistedProduct:'/product/unshortlist/ajax/',
addShortlistProduct:'/product/shortlist/ajax/',
convertToGuid:'/product/convert_to_guid/ajax/',
buythelookDetail:'/buy-the-look/', // buy the look details
addReview:url,
//global methods
reportInappropriate:"/moderation/report/ajax/", //same for rooms/blogs/comments etc
getInappropriateReasons:"/moderation/report-reasons/ajax/",
recommend:url, //same for rooms/blogs/comments etc  !!! missing ajax functionality
sendToAFriend:url, //this calls the generic email handler - not sure if that will have its own url
counters:null, //returns collection of counters for number of messages, alerts, etc
// Visualisation application popups
roomPlanner:"/rooms/planner/",
roomDecorate:"/rooms/decorate-my-photo/",
roomsBrowser:"http://cdn2.mydeco.com/media/1/room_explorer/",
roomFurnish:"/rooms/furnish/",
roomMontage:"/rooms/moodboard/",
roomComplete: "/rooms/complete/",
// Recognize "Shortlisted" property
userShortlisted:"/product/shortlisted/ajax/",
alertDelete:"/account/alert-delete/ajax/",
alertsDeleteAll:"/account/alert-delete-all/ajax/",
getBTLProducts:"/buy-the-look/ajax_get_products/",
// optin for ugs 
optinForUgs:"",
// help us improve
feedback_post_ajax:"/feedback/post/ajax/",
// newsletter
newsletter_subscribe_ajax:"/newsletter/",
newsletter_unsubscribe_ajax:"/newsletter/unsubscribe/",
// designers
find_talent_ajax:"/designers/find-talent/",
// profile showcase
profileSlideshowAddAjax: "/account/profile/slideshow/add/ajax/",
profileSlideshowDeleteAjax: "/account/profile/slideshow/delete/ajax/",
profileSlideshowDeleteAllAjax: "/account/profile/slideshow/delete-all/ajax/",
profileSlideshowObjectsToAddAjax: "/account/profile/slideshow/objects-to-add/ajax/",
// FCKeditor base path
fckeditor: "/media/js/fckeditor/",
renderws: "http://render.mydeco.com/ws/render/",


	ws:{

		login:"/ws/login/",
		logout:"/ws/logout/",
		register:"/ws/register/",
		product:"/ws/product/",
		room_competitions:"/ws/competitions/",

		location_to_coords:"/ws/tools/location_to_coords/"
	},

	room_competition:{
		vote_ajax:"/competitions/vote_ajax/",
		entry_ajax:"/competitions/entry_ajax/",
		entry_form_ajax:"/competitions/entry_form_ajax/",
		available_competitions_ajax:"/competitions/available_competitions/ajax/",
		geo_entries_ajax: "/competitions/geo_entries/ajax/",
		share_email_ajax: "/competitions/share_email/ajax/"
	},
	profile: {
		setSectionVisibility: "/common/set_section_visibility/ajax/",
		objectsPerSection: "/common/objects_per_section/ajax/"
	},

	adIframe:"/ad_iframe/",
	// Facebook sharing
	shareOnFacebook: "/account/facebook/share_item/",
	facebookDisassociate: "/account/facebook/disassociate/ajax/",
	facebookInviteIframe: "/account/facebook/invite_iframe/",
	forumsUserListView: "/forum/user/",
	saveSharedItem: "/account/save_shared_item/ajax/",
	competitionsHome: "/competitions/",
	supplierClaim: "/suppliers/claim/ajax/",
	supplierStore: "/suppliers/stores/ajax/",
	supplierDeleteAd: "/suppliers/advertisement/delete/ajax/",
	supplierBestsellers: "/suppliers/bestsellers/ajax/",
	supplierEditInfo: "/suppliers/info/edit/ajax/",
	supplierSubscribe: "/suppliers/subscribe/ajax/",
	supplierEditOffer: "/suppliers/offer/edit/ajax/",
	supplierDeleteOffer: "/suppliers/offer/delete/ajax/",
	supplierSendMobileVoucher: "/suppliers/offer/mobile/send/ajax/",
	bookmarksAjax: "/account/bookmarks/ajax/",
	forms: {
		feedback: "/common/forms/feedback.html",
		reportInappropriate: "/common/forms/report_inappropriate.html",
		sendToFriend: "/common/forms/send_to_friend.html",
		sendToMyFriend: "/common/forms/send_to_my_friend.html"
	}
};

myDeco.urls.updateUserUrls = function(username) {
	
		myDeco.urls.counters = username && ("/people/" + username + "/counters/ajax/");
		myDeco.urls.ws.userHome = username && ("/ws/people/" + username + "/");
		myDeco.urls.ws.userRooms = username && (myDeco.urls.ws.userHome + "rooms/");
		myDeco.urls.ws.userAlerts = username && (myDeco.urls.ws.userHome + "alerts/");
		myDeco.urls.ws.userShortlistedProducts = username && (myDeco.urls.ws.userHome + "productshortlist/");
		myDeco.urls.ws.userScrapbookImages = username && (myDeco.urls.ws.userHome + "scrapbook/image/");
		myDeco.urls.addRoomPhoto = username && ("/people/" + username + "/edit-room-photo-ajax/");
		myDeco.urls.addRoomPhotoMyDeco = username && ("/people/"+ username + "/edit-room-photo-mydeco-ajax/");
		myDeco.urls.profileWishlist = username && ("/people/" + username + "/products/edit/");
		myDeco.urls.profileBookmarks = username && ('/people/' + username + '/bookmarks/edit/');
	
};

myDeco.urls.updateUserUrls(myDeco.username);

 
