/*



*/

/* Start page load time (whole js in perfs-analytics.js */
var plstart = new Date();

/* Added to config.js to avoid the dependency on YUI */
if (typeof YAHOO == "undefined") {
    var YAHOO = {};
}
YAHOO.namespace = function() {
    var a=arguments, o=null, i, j, d;
    for (i=0; i<a.length; i=i+1) {
        d=a[i].split(".");
        o=YAHOO;
        for (j=(d[0] == "YAHOO") ? 1 : 0; j<d.length; j=j+1) {
            o[d[j]]=o[d[j]] || {};
            o=o[d[j]];
        }
    }
    return o;
};

YAHOO.namespace('YAHOO.EU.Shopping');
YAHOO.EU.Shopping.config = {
  tracking: {
    bEnabled: false,
    baseUrl: "http://uk.rd.yahoo.com/shopping/kelkoo/homepage", // No trailing slash
    uastring: "Googlebot|Slurp|msnbot|Teoma",
    productsearchId : "productsearch",
    searchFormId : 's',
    aModuleIds : ['globalnav','vct','home-promo','hot-products','home-topcat','misc-infos','gen-ter-mod','tagcloud','feat-stores','country-misc','intl-cpy','spec-sites', 'hp-custom1', 'hp-custom2', 'newsletter', 'featured-stores', 'user-hist', 'most-popular-container', 'themes']
  },
  suggestAsYouType:{
    isActivated: true,
    startsFrom: 3,
    minimumFrom: 2,
    sendDelay: 0.8
  },
  bookmark:{
     isActivated: true,
     trackingUrl: '/asyncCall/ctl/do/uxtracking',
     bookmarkParam: 'type=bookmark',
     homepageParam: 'type=homepage'
  },
  globalnav:{
    dataURL: '/ctl/do/asyncCall/navigation-data?hash=vYFN_X9_5DFFtWkkHrWU8HkxCd0-&aggressiveCaching=true&partner=kelkoo'
  },
  caroEditorial: { 
    vContainer: 'ed-caro',
    sLoopMode: 'continuous',
    bRandomStart: true,
    bAutoPlay: true,
    iAutoPlayCount: 3,
    iAutoPlayInterval: 4000,
    oControls: {
      sClassName: 'controls',
      sInsertion: 'after',
      sNextTxt: 'Next',
      sPrevTxt: 'Previous',
      vRef: 'ed-caro'
    },
    oPagination: {
      sClassName: 'dot-pagination',
      sInsertion: 'append',
      vRef: 'home-promo'
    }
  },
  caroPopcats: { 
    vContainer: 'pop-cats',
    sLoopMode: 'continuous',
    iNumSlidesVisible: 3,
    iSlideAdvance: 3,
    bRandomStart: false,
    oControls: {
      sClassName: 'controls',
      sInsertion: 'after',
      sNextTxt: 'Next',
      sPrevTxt: 'Previous',
      vRef: 'pop-cats'
    },
    oPagination: {
      sClassName: 'dot-pagination',
      sInsertion: 'append',
      vRef: 'home-topcat'
    }
  },
  chartsProductOverlay : { delegateId : 'top-products' },
  levelsProductOverlay : { delegateId : 'level-results-page' }
};


YAHOO.EU.Shopping.kelkooid = {
  tracking: function(){
    var time = new Date();
    var url = '/servlet/Kelkooid?siteName=kelkoo&a={1}&referer={2}';
    url = url.replace(/\{1\}/, time.getTime());
    var referer = escape(document.referrer);
    referer = referer.replace(/\+/g, "%2B");
    url = url.replace(/\{2\}/g, referer);
    /* Browser tracking */
    var a = new Image(); 
    a.src="/servlet/Bs?sc=yes";
		// Make the request
		document.write('<img src="' + url + '" width="1" height="1" alt="" style="position: absolute; top: 0; left: 0;">');
  }
};

YAHOO.EU.Shopping.locale = {
	domain: "kelkoo.co.uk",
  loading: "Loading&hellip;",
  close: "Close",
	showAll: "Show All",
	hideAll: "Hide All",
	histOversize: "You already have 5 items in your saved items list.Please delete one before adding a new one.",
	rate: "Rate",
	emailErrorMsg: "Please enter a valid email address.",
	subjectErrorMsg: "Please select a subject for the list.",
	feedbackErrorMsg: "We require some feedback to determine what the problem is.",
	promoText: "Free Voucher ",
	promoTextHeading: "Free Voucher Codes",
	promoTextSupplement: "Free Voucher Codes",
	merchantSearchError: "Please enter a search term",
	minProductsToCompare: "You must select at least two Products to compare.",
	maxProductsToCompare: "You can't compare more than MAX_COMPARE products.",
	addedToSavedList: "This product has been added to your saved list",
	bookmarkMsg : "To bookmark Kelkoo press {0}",
	showAllItems: "ALL ITEMS ",
	numItems: "{0} ITEMS ",
	showUsedItems: "USED ",
	numUsedItems: "{0} Used ",
	chooseDate: "Choose a date",
	wrongDateFormat: "Please enter a valid date: dd/mm/yyyy ",
	returnDateBeforeDeparture: "Return date you selected is before the departure date",
	departureDateBeforeToday: "Today is after the departure date selected ",
	returnDateEqualsDeparture: "Return date you selected is equal to the departure date",
	lvl2ShowDetails: "Show details",
	lvl2HideDetails: "Hide details ",  
	ShowFilters: "Show Filters",
	HideFilters: "Hide Filters",
	mostPopModuleProductsTab: "Products",
	mostPopModuleBrandsTab: "Brands",
	mostPopModuleStoresTab: "Stores",
	mostPopModuleThemesTab: "Themeshell",
	TravelNoDestination: "Please choose or enter a destination city",
	suggestSuggestion: "suggestions",
	suggestClose: "close",
	offerVerification: "Offer verified on ",
	departureCaption: "Departure Flight Itinerary",
	returnCaption: "Return Flight Itinerary",	
	departureLabel: "Dep.",	
	stopsLabel: "Stops",
	monostopLabel: "Stop",
	arrivalLabel: "Arrival",
	flightNumber: "Flight : ",
	flightDuration: "Duration : ",
	flightClass: "Class : ",
	flightType: "Type : ",
	flightAircraft: "Aircraft : ",
	flightDistance: "Distance : ",
	multipleAirlines: "Multiple Airlines",
	airportcode: "Airport Code",
	chain: "Hotel chain: ",
	location: "Address:",
	roomtype: "Room type:  ",
	nbRooms: "Number of rooms: ",
	boardBasis: "Board Basis: ",
	services: "Features:",
	obfuscationKey: "[at]",
	postCodeDescription : "eg.SE19BG",
	sponsoredLinksTitle : "Sponsored Links",
	flightFormAlert1 : "Please enter a valid date (as illustrated by the prompts).",
    flightFormAlert2 : "The date selected is invalid, please check the dates.",
    flightFormAlert3 : "Please enter a valid departure date.",
    flightFormAlert4 : "Please enter or select a departure / arrival airport.",
    flightFormAlert5 : "The departure date you have chosen is more than 300 days from today. Unfortunately, we are not able to help you with this search.",
    
    hotelFormAlert1 : "The check-in date is invalid please check the dates.",
    hotelFormAlert2 : "The check-out date is invalid please check the dates. ",
    hotelFormAlert3 : "Departure date cannot be same date as arrival date.",
    hotelFormAlert4 : "Please enter a destination",
    hotelFormAlert5 : "The departure date you have chosen is more than 780 days from today. Unfortunately, we are not able to help you with this search.",
    hotelFormAlert6 : "Please select a number of adult.",
     
    jqueryDatepickerPrev : "Prev",
    jqueryDatepickerNext : "Next",
    jqueryDatepickerToday : "Today",
    jqueryDatepickerClose : "Close"
    
};

YAHOO.EU.Shopping.YUICalendarConf = {
	WEEKDAYS_MEDIUM:
		["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],
	WEEKDAYS_LONG:
		["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],
	WEEKDAYS_SHORT:
		["Su","Mo","Tu","We","Th","Fr","Sa"],
	WEEKDAYS_1CHAR:
		["S","M","T","W","T","F","S"],
	DATE_FIELD_DELIMITER:"/", 
	LOCALE_WEEKDAYS:"medium",
	START_WEEKDAY:1, 
	MONTHS_SHORT: 
		["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],
	MONTHS_LONG:
		["January","February","March","April","May","June","July","August","September","October","November","December"],
	MDY_DAY_POSITION:1, 
	MDY_MONTH_POSITION:2,
	MDY_YEAR_POSITION:3,
	MY_MONTH_POSITION:1,
	MY_YEAR_POSITION:2,
	MD_MONTH_POSITION:2,
	MD_DAY_POSITION:1
};


