﻿
var mainFolder = "Events";
var subFolder = "Corporate";


var event = function (showInCarousel, image, name, subtitle, description, type, category, defaultHeader, video_item, nameid, transformation) {
    this.nameid = nameid;
    this.name = name;
    this.description = description;
    this.subtitle = subtitle;
    this.type = type;
    this.category = category;
    this.id = items.length + 1;
    //this.defaultHeader = defaultHeader;
    this.directory = "";
    this.typeTitle = "";
    this.url = "";
    switch (type) {
        case 1:
            switch (category) {
                case 1:
                    this.typeTitle = "Corporate Events";
                    this.directory = "/Events/Corporate/";
                    this.url = "/Events.aspx?cat=corporate&id=" + this.id;
                    break;
                case 2:
                    this.typeTitle = "Event Premieres";
                    this.directory = "/Events/Premieres/";
                    this.url = "/Events.aspx?cat=premiere&id=" + this.id;
                    break;
                case 3:
                    this.typeTitle = "Digital";
                    this.directory = "/Events/Digital/";
                    this.url = "/Events.aspx?cat=digital&id=" + this.id;
                    break;
            }
            break;
        case 2:
            switch (category) {
                case 4:
                    this.typeTitle = "Environment Exhibits";
                    this.directory = "/Environments/Exibits/";
                    this.url = "/Environments.aspx?cat=exhibits&id=" + this.id;
                    break;
                case 5:
                    this.typeTitle = "designer 8*";
                    this.directory = "/Environments/Designer 8/";
                    this.url = "/Environments.aspx?cat=designer&id=" + this.id;
                    break;
            }
            break;
        case 3:
            this.typeTitle = "Mobile Tours";
            this.directory = "/Mobile Tours/";
            this.url = "/tours.aspx?id=" + this.id;
            break;
        case 4:
            this.typeTitle = "Brand Ambassadors";
            this.directory = "/Brand Ambassadors/";
            this.url = "/ambassadors.aspx?id=" + this.id;
            break;
        case 5:
            this.typeTitle = "Case Studies";
            break;
    }
    if (showInCarousel) {
        var parameters = showInCarousel.split(':');
        this.showInCarousel = parameters[0];
        this.imageForCarousel = "/itemimages" + this.directory + parameters[1];

    }
    this.video_item = video_item;
    for (i = 0; i < image.length; i++) {
        var tempName = image[i];
        image[i] = "/itemimages" + this.directory + tempName;
    }
    this.image = image;
    this.transformation = transformation;
}
var dictionary = function (value, key, title) {
    this.value = value;
    this.key = key;
    this.title = title;
}
//function getType(id) {
//    $.each(types, function (k, v) {
//        if (v.value == v) return v;
//    });
//    return null;
//}
function getCategory(id) {
    $.each(categories, function (k, v) {
        if (v.value == v) return v;
    });
    return null;
}
var types = new Array();
types.push(new dictionary("event", 1));
types.push(new dictionary("environments", 2));
types.push(new dictionary("tours", 3));
types.push(new dictionary("ambassador", 4));
types.push(new dictionary("casestudy", 5));
var categories = new Array();
categories.push(new dictionary("corporate", 1));
categories.push(new dictionary("premiere", 2));
categories.push(new dictionary("digital", 3));
categories.push(new dictionary("exhibit", 4));
categories.push(new dictionary("designer", 5));


items = new Array();
//Corporate Events
items.push(new event("", ["oscars_1_raw.jpg", "oscars_2_raw.jpg"], "Oscar Awards", "", "", 1, 1));
items.push(new event("9:ATT_Citi_4_raw.jpg", ["ATT_Citi_1_raw.jpg", "ATT_Citi_3_raw.jpg", "ATT_Citi_4_raw.jpg", "ATT_Citi_2_raw.jpg", "ATT_Citi_5_raw.jpg"], "Citi, AT&T & Mastercard Launch", "", "", 1, 1));
items.push(new event("", ["speedo_1_raw.jpg", "speedo_2_raw.jpg", "speedo_3_raw.jpg"], "Speedo Fashion Show", "", "", 1, 1));

items.push(new event("", ["hktb_hhh3155_raw.jpg"], "Hong Kong Visitors Bureau Sales Meeting", "", "", 1, 1));
items.push(new event("", ["adidas_raw.jpg"], "adidas Originals Product Launch", "", "", 1, 1));
items.push(new event("15:GoldenCalc-2_raw.jpg", ["GoldenCalc-3_raw.jpg", "GoldenCalc-1_raw.jpg", "GoldenCalc-4_raw.jpg", "GoldenCalc-2_raw.jpg"], "HP Golden Calculator Awards", "", "", 1, 1));
items.push(new event("", ["EdHardy_Event_raw.jpg", "EdHardy_Event3_raw.jpg", "EdHardy_Event4_raw.jpg"], "Ed Hardy Product Launch Event", "", "", 1, 1));
items.push(new event("", ["Sundance-7_raw.jpg", "Sundance-11_raw.jpg", "Sundance-1A_raw.jpg", "Sundance-10_raw.jpg", "Sundance-18_raw.jpg"], "HP Sundance House", "", "", 1, 1));

subFolder = "Premieres";
//Premieres
items.push(new event("2:Inception_2_raw.jpg", ["Inception_3_raw.jpg", "Inception_2_raw.jpg", "Inception_8_raw.jpg", "Inception_7_raw.jpg", "Inception_4_raw.jpg", "Inception_1_raw.jpg"], "Inception", "", "", 1, 2));
items.push(new event("16:IceAge-2_raw.jpg", ["IceAge-1_raw.jpg", "IceAge-4_raw.jpg", "IceAge-2_raw.jpg"], "Ice Age 2", "", "", 1, 2));
items.push(new event("", ["Taxi_raw.jpg"], "Taxi", "", "", 1, 2));
items.push(new event("13:WTWA_1_raw.jpg", ["WTWA_1_raw.jpg", "WTWA_2_raw.jpg", "WTWA_3_raw.jpg", "WTWA_4_raw.jpg"], "Where the Wild Things Are", "", "", 1, 2));
items.push(new event("", ["Valentine.01_raw.jpg", "Valentine.04_raw.jpg", "Valentine.06_raw.jpg"], "Valentine's Day", "", "", 1, 2));
items.push(new event("20:DOAWK_1_raw.jpg", ["DOAWK_1_raw.jpg", "DOAWK_2_raw.jpg", "DOAWK_3_raw.jpg", "DOAWK_4_raw.jpg", "DOAWK_5_raw.jpg"], "Diary of a Wimpy Kid", "", "", 1, 2));
items.push(new event("", ["DodgeBall_raw.jpg"], "Dodgeball", "", "", 1, 2));
items.push(new event("6:NATM_2_raw.jpg", ["NATM_2_raw.jpg", "NATM_1_raw.jpg"], "Night at the Museum", "", "", 1, 2));
items.push(new event("", ["Invictus_raw.jpg"], "Invictus", "", "", 1, 2));
items.push(new event("", ["COTT_6_raw.jpg", "COTT_1_raw.jpg", "COTT_2_raw.jpg", "COTT_3_raw.jpg", "COTT_4_raw.jpg", "COTT_5_raw.jpg"], "Clash of the Titans", "", "", 1, 2));
items.push(new event("", ["Robots_1_raw.jpg", "Robots_2_raw.jpg"], "Robots", "", "", 1, 2));
items.push(new event("", ["Swimfan_raw.jpg"], "Swimfan", "", "", 1, 2));
items.push(new event("", ["SandTC-1_raw.jpg", "SandTC-2_raw.jpg", "SandTC-3_raw.jpg", "SandTC-4_raw.jpg"], "Sex and the City 2 HP Lounge", "", "", 1, 2, '', '', "satc"));
subFolder = "Digital";
//Digital
items.push(new event("", ["digital_raw.jpg"], "Digital", "Integrated Marketing Campaigns & Programs", "IMT Digital offers a full array of integrated marketing campaigns and programs to our clients. With the right approach, planning, and proper utilization of resources, interactive digital technology continues to be the fastest growing avenue for a company to effectively communicate its ideas, operate more efficiently, and directly reach its customers. A natural extension of Infinity Marketing Team, IMTD offers digital marketing strategy, technology services, social networking solutions, and interactive advertising campaigns to help our clients increase traffic and attract and retain new customers. Moreover, our real-time campaign tracking and online event fulfillment system allow our clients to manage their program data quickly and efficiently.", 1, 3));
items.push(new event("", ["digital_email_raw.jpg"], "E-Blasts", "E-mail Marketing", "We create targeted mailing lists from any data source you may have. We then design each piece of communication to ensure maximum response. Each campaign is measured for impact and success by tracking user interaction.", 1, 3));
items.push(new event("", ["digital_tracking_2_raw.jpg"], "Campaign Tracking", "Statistics in Real-Time", "We track statistics in real-time. From keyword searches to page abandonment to site traffic, we watch what is going on with your digital presence and adjust our strategy to maximize results.", 1, 3));
items.push(new event("", ["Digital_results_raw.jpg"], "Real Time Reporting", "Instantaneous Reporting & Results", "We realize that clients want instantaneous reporting and results for their daily marketing campaigns and promotions. IMT implements real-time reporting solutions for each program offering instant analysis and ROI results.", 1, 3));
items.push(new event("", ["digital_social_raw.jpg"], "Social Networking", "Engaging Social Solutions", "IMT works with our clients to create distinctive social solutions that are engaging to consumers. We reach past simply having a presence on key social sites by connecting the brand into the actual experience to create an appealing, interactive and memorable consumer moment.", 1, 3));
items.push(new event("", ["digital.analysis_raw.jpg"], "Analysis", "Tracking Campaign Effectiveness", "We use the most current software to gather statistics to track the effectiveness of your marketing dollars. IMTD leverages the latest basic and enterprise web analytics to measure precise return from each of your direct marketing activities.", 1, 3));
items.push(new event("", ["digital_fulfillment_2_raw.jpg"], "Online Fulfillment", "Easy Ordering, Inventory & Management", "To help our clients avoid the struggles associated with event exhibit shipping and inventory coordination, IMT maintains an online fulfillment system for an easy and convenient ordering, inventory and management process.", 1, 3));

mainFolder = "Environments";
subFolder = "Exibits";
//Exhibits
items.push(new event("17:Citizens_3_raw.jpg", ["Citizens_1_raw.jpg", "Citizens_2_raw.jpg", "Citizens_3_raw.jpg", "Citizens_4_raw.jpg", "Citizens_5_raw.jpg"], "Citizens of Humanity", "", "", 2, 4));
items.push(new event("", ["nividia_raw.jpg"], "nVIDIA", "", "", 2, 4, '', '', '', true));
items.push(new event("", ["DirecTV_1_raw.jpg", "DirecTV_2_raw.jpg"], "DirecTV", "", "", 2, 4));
items.push(new event("", ["Eastman_kodak_raw.jpg"], "Eastman Kodak", "", "", 2, 4));
items.push(new event("", ["Merck-2_raw.jpg", "merck-1_raw.jpg", "Merck-3_raw.jpg", "merck-4_raw.jpg"], "Merck", "", "", 2, 4));
items.push(new event("4:docomo_raw.jpg", ["docomo_raw.jpg"], "Docomo", "", "", 2, 4));
items.push(new event("10:Dana-Davis_1_raw.jpg", ["Dana-Davis_1_raw.jpg", "Dana_Davis_2_raw.jpg"], "Dana Davis Pop Up Boutique", "", "", 2, 4));
items.push(new event("", ["GStar_1_raw.jpg", "GStar_2_raw.jpg", "GStar_3_raw.jpg"], "G-Star Raw", "", "", 2, 4));
items.push(new event("", ["Encore_2_raw.jpg", "Encore_3_raw.jpg", "Encore_4_raw.jpg", "Encore_1_raw.jpg"], "Encore", "", "", 2, 4));
subFolder = "Designer 8";
//Designer
items.push(new event("8:San_francisco_event_raw.jpg", ["San_francisco_event_raw.jpg"], "San Francisco Showcase", "", "", 2, 5));
items.push(new event("", ["Sibal_11_raw.jpg"], "Sibal", "", "", 2, 5));
items.push(new event("", ["Informant_raw.jpg"], "The Informant", "", "", 2, 5));
items.push(new event("11:August-Rush_raw.jpg", ["August-Rush_raw.jpg"], "August Rush", "", "", 2, 5));
items.push(new event("5:MercedesAmbiance2_raw.jpg", ["MercedesAmbiance2_raw.jpg"], "Mercedes Benz CLS Launch", "", "", 2, 5));
items.push(new event("", ["Petunia_raw.jpg", "Petunia_2_raw.jpg", "Petunia_3_raw.jpg"], "Petunia Pickle Bottom", "", "", 2, 5));
items.push(new event("", ["London_Lounge_raw.jpg", "London_Lounge_2_raw.jpg"], "London Lounge", "", "", 2, 5));
mainFolder = "Mobile Tours";
subFolder = null;
//Tours
var value = '<object width="500" height="400"><param name="movie" value="http://www.youtube.com/v/WNSM04andl4&amp;hl=en_US&amp;fs=1?rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/WNSM04andl4&amp;hl=en_US&amp;fs=1?rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="500" height="400"></embed></object>'
items.push(new event("18:MobileTours_HP_Truck_raw.jpg", ["MobileTours_HP_Truck_raw.jpg", "MobileTours_HP7_raw.jpg", "MobileTours_HP5_raw.jpg", "MobileTours_HP2_raw.jpg", "MobileTours_HP3_raw.jpg", "MobileTours_HP4_raw.jpg"], "You + HP Experience", "", "", 3, 0, "", value));
items.push(new event("14:Mortons_2_raw.jpg", ["Mortons_5_raw.jpg", "Mortons_4_raw.jpg", "Mortons_2_raw.jpg", "Mortons_3_raw.jpg"], "Morton's The Steakhouse", "", "", 3, 0));
items.push(new event("3:MobileTours_Promethean_raw.jpg", ["MobileTours_Promethean_raw.jpg", "MobileTours_Promethean6_raw.jpg", "MobileTours_Promethean5_raw.jpg", "MobileTours_Promethean2_raw.jpg", "MobileTours_Promethean4_raw.jpg"], "Promethean ActivClassroom in Motion", "", "", 3, 0));
items.push(new event("7:MobileTours_YouRock1_raw.jpg", ["MobileTours_YouRock1_raw.jpg", "MobileTours_YouRock4_raw.jpg", "MobileTours_YouRock5_raw.jpg", "MobileTours_YouRock3_raw.jpg", "MobileTours_YouRock2_raw.jpg"], "YOU Rock HP Tour", "", "", 3, 0));
items.push(new event("", ["MobileTours_ATT_1_raw.jpg", "MobileTours_ATT_3_raw.jpg", "MobileTours_ATT_2_raw.jpg"], "AT&T", "", "", 3, 0));
items.push(new event("12:MobileTours_ScanVan3_raw.jpg", ["MobileTours_ScanVan_raw.jpg", "MobileTours_ScanVan7_raw.jpg", "MobileTours_ScanVan6_raw.jpg", "MobileTours_ScanVan4_raw.jpg", "MobileTours_ScanVan5_raw.jpg"], "Kodak Gallery Scan Van", "", "", 3, 0));
items.push(new event("", ["MobileTours_Aloha1_raw.jpg", "MobileTours_Aloha3_raw.jpg", "MobileTours_Aloha2_raw.jpg"], "Aloha Airlines", "", "", 3, 0));
items.push(new event("1:MobileTours_BrilliantlySimple1_raw.jpg", ["MobileTours_BrilliantlySimple1_raw.jpg", "MobileTours_BrilliantlySimple5_raw.jpg", "MobileTours_BrilliantlySimple3_raw.jpg", "MobileTours_BrilliantlySimple2_raw.jpg", "MobileTours_BrilliantlySimple4_raw.jpg"], "HP Brilliantly Simple Tour", "", "", 3, 0));
mainFolder = 'Brand Ambassadors';
//ambassadors
items.push(new event("", ["hp_1_raw.jpg"], "Hewlett Packard", "", "", 4, 0, "IMT'S EXPERT FIELD STAFF & REPRESENTATIVES"));
items.push(new event("", ["amd_raw.jpg"], "AMD", "", "", 4, 0, "IMT'S EXPERT FIELD STAFF & REPRESENTATIVES"));
items.push(new event("", ["Mortons_2_raw.jpg"], "Morton's The Steakhouse", "", "", 4, 0, "IMT'S EXPERT FIELD STAFF & REPRESENTATIVES"));
items.push(new event("", ["TVG_raw.jpg"], "TVG Network", "", "", 4, 0, "IMT'S EXPERT FIELD STAFF & REPRESENTATIVES"));
items.push(new event("", ["kodak_1_raw.jpg"], "Kodak Gallery", "", "", 4, 0, "IMT'S EXPERT FIELD STAFF & REPRESENTATIVES"));
items.push(new event("", ["hawaii_raw.jpg"], "Hawaii Visitors Convention Bureau", "", "", 4, 0, "IMT'S EXPERT FIELD STAFF & REPRESENTATIVES"));
items.push(new event("19:ATT_raw.jpg", ["ATT_raw.jpg"], "AT&T U-Verse", "", "", 4, 0, "IMT'S EXPERT FIELD STAFF & REPRESENTATIVES"));

//case studies


function getItem(itemID) {
    var retItem = null;
    itemID = parseInt(itemID);
    $.each(items, function (k, v) {
        if (v.id == itemID)
            retItem = v;
    });
    return retItem;
}
function getItemByName(id){
    var retItem = null;
    id = id.toLowerCase();
    $.each(items, function (k, v) {
        if (v.nameid == id)
            retItem = v;
    });
    return retItem;
}
function returnItems(type, category) {
    var retArray = new Array();
    $.each(items, function (k, v) {
        if (v.type == type) {
            if (!category || v.category == category) {
                retArray.push(v);
            }
        }
    });
    return retArray;
}



