// Package Launch tab configuration
if (expTabs === undefined) {
    var expTabs = {
        parentTabs:["featured","lastminute","destinationdeals"],
        subTabs:[
			// Featured Deals tab
            {
              "url": "/daily/prod/ashx/mdbHandler.ashx?max=50&nl=18&rfrr=-53320&product=all&title=Flight%20%2B%20Hotel%20Deals",
              "title": "Save money on your trip with our top flight + hotel package deals!",
              "id": "featPkg",
              "parent": "featured"
            },
            // Last-minute tab
            {
              "url": "/daily/prod/ashx/opiHandler.ashx?type=package&locs=[ORIGIN]&max=5&start=0&end=14&rfrr=-23456&dd=1&jsobj=expDealsTabs&ddtext=See+more+last-minute+Flight+%2B+Hotel+deals+from",
              "title": "",
              "id": "lmPkg",
              "parent": "lastminute"
            },
			// Deals by Destination tab
            {
              "url": "/daily/packages/destination_deals.asp",
              "title": "",
              "id": "destTab",
              "parent": "destinationdeals"
            }
           ],
           
        getChildTab: function (parent, idx) {
            var cnt = -1;
            for (var i in this.subTabs)
            {
                if (this.subTabs[i].parent == parent)
                    if (++cnt == idx)
                        return this.subTabs[i];
            }
            return null;    
       },
	   
	   getChildById: function (childId) {
			for (var i in this.subTabs)
            {
                if (this.subTabs[i].id == childId) 
					return this.subTabs[i];
            }
			return null;
	   },
	   
	   getChildIndex: function (childId) {
            var child = this.getChildById(childId);
			if (child) {
				var parent = child.parent;
				var idx = -1;
				for (var i in this.subTabs)
	            {
    	            if (this.subTabs[i].parent == parent) 
						idx++;
					if (this.subTabs[i] === child)
						return idx;
				}
            }
			return -1;
       },
    
       dmaMap: {
            "803" : "178276|178280|178304|178305|450",
            "501" : "178293|178276|178294|333|178318",
            "807" : "178276|178305|178280|450|3018",
            "511" : "178276|178293|178318|178294",
            "602" : "178276|178248|178293|178294",
            "819" : "178276|178307|178299|178315|178305",
            "504" : "178276|178293|178318|178294|178248",
            "506" : "178293|178276|178239|178294|178318",
            "623" : "178276|178303|178293|178294|178305",
            "751" : "178276|178298|178304|178293|178305",
            "524" : "178232|178276|178294|178286|3079",
            "528" : "178294|178276|178286|178293|1219",
            "753" : "178276|178298|178304|450|3574",
            "618" : "178303|178276|178293|178294|178305",
            "825" : "178276|178304|450|178305|178298",
            "613" : "178276|178248|178293|178294|178305",
            "862" : "178305|178276|450|178304|180077",
            "505" : "178276|178248|178294|178293|178318",
            "534" : "178294|178276|178286|972|1219",
            "539" : "178294|178276|178286|1219|178293",
            "820" : "178276|178307|178305|178299|450",
            "609" : "178276|178248|178293|178294|178318",
            "560" : "178276|178318|178293|178294|178232",
            "510" : "178276|178248|178293|178294|178318",
            "533" : "178293|178276|178239|178294|178318",
            "770" : "178276|450|178304|178254|178305",
            "744" : "180077|178276|178305|178307|178304",
            "561" : "178294|178276|1674|972|178286",
            "548" : "178294|178276|178286|1219|178232",
            "617" : "178276|178248|178294|178293|178305"
        }
    }
}
