var myDeco={};

myDeco.settings = {};
myDeco.settings.SITE_URL = "http://mydeco.com/";
myDeco.settings.SECURE_SITE_URL = "https://mydeco.com/";
myDeco.settings.STATIC_URL = "http://cdn.mydeco.com/media/";
myDeco.settings.MEDIA_URL = "http://cdn.mydeco.com/media/data/";
myDeco.settings.PRODUCT_MEDIA_URL = "http://pdb1.mydeco.com/product_images/";
myDeco.settings.SUPPLIER_MEDIA_URL = "http://cdn.mydeco.com/supplier_logos/";
myDeco.settings.IMAGE_TRANSFORM_SERVICE = 'http://media.dev.mydeco.com/t';
myDeco.settings.DEFAULT_AVATAR_IMG = 'http://cdn2.mydeco.com/media/6225/img/defaults/no_avatar.gif';

myDeco.settings.DEFAULT_AVATAR_THUMB_IMG = 'http://cdn2.mydeco.com/media/6225/img/defaults/no_avatar.gif';
myDeco.settings.DEFAULT_BTL_IMG = "img/defaults/room-placeholder.png";
myDeco.settings.IMAGE_URL_NOIMAGE = "img/blank.gif";
myDeco.settings.BLANK_IMG = "http://cdn.mydeco.com/media/2006/img/blank.gif";
myDeco.settings.SEARCH_BASE_URL = "/search/";
myDeco.settings.FCKEDITOR_BASE = "/media/js/fckeditor/";
myDeco.settings.PAGINATE_BY = '10';
myDeco.settings.AUTOCOMPLETE_URL = 'http://mydeco.com/ws/complete/';
myDeco.settings.OMNITURE_ACCOUNT = 'mydecocom';
myDeco.settings.TRACKING_TAGS = [{"cookieAge": 180, "type": "partner", "cookieName": "partner", "paramName": "partner"}, {"cookieAge": 60, "type": "campaign", "cookieName": "rw.cm", "paramName": "rw.cm"}];
myDeco.settings.ie6LoadAds = true;
myDeco.settings.AUTH_COOKIE_DOMAIN = '.mydeco.com';
myDeco.settings.USER_DATA_COOKIE_DOMAIN = 'None';

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/",
    removeQuestion : "/knowledge/remove-from-profile/ajax/",
    requestPasswordReset: "/account/password_reset/ajax/",
    sendMessage : "/people/message/send/ajax/",
    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/",
    register : "/account/register/",
    ajaxIframeLogin : "/account/ajax_iframe_login_test/",
    //registration (account)
    checkUsername : "https://mydeco.com/account/check_username/ajax/",
    //compliment
    sendCompliment : "/people/compliment/send/", //
    approveCompliment : "/people/compliment/approve/ajax/", //
    deleteCompliment : "/people/compliment/approve/ajax/", // same as approveCompliment, but needs another action string "decline"
    //friends
    addFriend : "/people/friend/add/ajax/", //same url for add/remove
    approveFriend : "/people/friend/approve/ajax/", //same url for approve/decline
    deleteFriend : "/people/friend/delete/ajax/",
    // comments
    approveComment : "/comment/approve/ajax/",
    //groups
    joinGroup : "/groups/join-leave/ajax/", //same url for join/leave
    approveGroupInvite : "/groups/join-leave/ajax/", //same url as for join group but different action, see doc on corresponding view
    requestInvite: "/groups/request_invite/ajax/",
    //blogs
    deleteBlogArticle: "/people/blog/delete-article/ajax/",
    //tips
    editTipsTitle: "/account/edit-tips-name/",
    deleteTip: "" ,
    //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
    addBookmark : "/scrapbook/bookmark/add/ajax/", //add new bookmark
    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
    deleteTip : "/user-tips/del/ajax/",

    //knowledge
    askQuestion : "/knowledge/ask-question/",
    answerQuestion : "/knowledge/answer-question/",
    //rating
    setScore : "/score/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/",
    //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/',
    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/",
    roomFurnish : "/rooms/furnish/",
    roomMontage : "/rooms/moodboard/",
    // Recognize "Shortlisted" property
    userShortlisted: "/product/shortlisted/ajax/",
    alertDelete: "/account/alert-delete/ajax/",
    getBTLProducts : "/buy-the-look/ajax_get_products/",
    imaginiPassedTest: "/imagini/passed-test/",
    // optin for ugs 
    optinForUgs: "",
    // help us improve
    feedback_post_ajax: "/feedback/post/ajax/",
    // newsletter
    newsletter_subscribe_ajax: "/phplist/subscribe/ajax/",
    newsletter_unsubscribe_ajax: "/phplist/unsubscribe/ajax/",
    // designers
    find_talent_ajax : "/designers/find-talent/",
    
	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/"
	},
	adIframe: "/ad_iframe/"
}

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.updateUserUrls(myDeco.username);
 