﻿$(document).ready(function() {
    var product = urlBrand();
    javascriptEnabled();
    buildMenu();
    customCode(product);
});
///////////////////////////////////////////////////////////////////////////////////////
function javascriptEnabled() {
    $("#warning").remove();
    $("#menu").show(); 
}
///////////////////////////////////////////////////////////////////////////////////////

//overide default stylesheet depending on the product range
function customCode(urlParameter)
{
    switch (urlParameter)
    {
        case "hello kitty":
            hellokitty();
            $("#contactemail").remove();
            break;
        case "hello kitty pos":
            hellokittypos();
            $("#contactemail").remove();
            break;
        case "nyyankees":
            nyyankees();
            $("#contactemail").remove();
            break;
        case "titeuf":
            titeuf();
            $("#contactemail").remove();
            break;
        case "lulu":
            lulu();
            $("#contactemail").remove();
            break;
        case "cottet":
            cottet();
            $("#contactemail").remove();
            break;
        case "lt":
            lt();
            $("#contactemail").remove();
            break;
        case "morel":
            morel();
            $("#contactemail").remove();
            break;
        case "nomad":
            nomad();
            $("#contactemail").remove();
            break;
        case "contactus":
            contactus();
            $("#contactemail").remove();
            break;

    default: //home page

        $('head').append('<link type="text/css" href="css/home.css" rel="stylesheet">')
        $('head').append('<script type="text/javascript" src="script/fisheye-iutil.min.js"></script>')
        Home();
        break;
    }
}
////////////////////////////////////////////////////////////////////////////////////////////////////
function buildMenu() {
    $("a.drop").click(function() {
        $(this).parent().find("ul.subnav").slideDown('normal').show();
        $(this).parent().hover(function() { }, function() { $(this).parent().find("ul.subnav").slideUp('fast'); })
    });

}

////////////////////////////////////home custom code//////////////////////////////////////////

function Home() {
    $("#content").append('<div id="fisheye" class="fisheye"></div>');
    $("#fisheye").append('<div class="fisheyeContainter"></div>');
    $(".fisheyeContainter").append('<a href="index.htm?#b$lt@" class="fisheyeItem"><img src="images/lt.jpg" width="30" /><span></span></a>');
    $(".fisheyeContainter").append('<a href="index.htm?#b$nomad@" class="fisheyeItem"><img src="images/nomad.jpg" width="30" /><span></span></a>');
    $(".fisheyeContainter").append('<a href="index.htm?#b$morel@" class="fisheyeItem"><img src="images/morel.jpg" width="30" /><span></span></a>');
    $(".fisheyeContainter").append('<a href="index.htm?#b$cottet@" class="fisheyeItem"><img src="images/cottet.jpg" width="30" /><span></span></a>');
    $(".fisheyeContainter").append('<a href="index.htm?#b$nyyankees@" class="fisheyeItem"><img src="images/ny.jpg" width="30" /><span></span></a>');
    $(".fisheyeContainter").append('<a href="index.htm?#b$hello kitty@" class="fisheyeItem"><img src="images/hk.jpg" width="30" /><span></span></a>');
    $(".fisheyeContainter").append('<a href="index.htm?#b$lulu@" class="fisheyeItem"><img src="images/lulu.jpg" width="30" /><span></span></a>');
    $(".fisheyeContainter").append('<a href="index.htm?#b$titeuf@" class="fisheyeItem"><img src="images/titeuf.jpg" width="30" /><span></span></a>');
    $(document).ready(
		function() {
		    $('#fisheye').Fisheye(
				{
				    maxWidth: 20,
				    items: 'a',
				    itemsText: 'span',
				    container: '.fisheyeContainter',
				    itemWidth: 100,
				    proximity: 90,
				    halign: 'center'
				}
		    )
		}
	);
}

//////////////////////////////////global data ////////////////////////////////////////

Brand = new Object;
Brand.name = "";
Brand.imageURL = "";
Brand.imageThumbsURL = "";
Brand.cssCarouselClassSkinName = "";
Brand.dataArray = new Array;

Brand.models = function() {
    var modelArray = new Array;
    $.each(Brand.dataArray, function() { modelArray.push(this[0].toUpperCase()); })
    return modelArray;
}

Brand.modelColours = function(modelName) {

    colours = new Array;
    $.each(this.dataArray, function() { if (this[0].toUpperCase() == modelName) { colours = this[1]; return false; } });
    colours = $.map(colours, function(val) { return val.toUpperCase(); }); //make upper case
    return colours;
}

    Brand.sizes = function(modelName) {
        var sizes = "";
        $.each(this.dataArray, function() { if (this[0].toUpperCase() == modelName) { sizes = this[2]; return false; } })
        return sizes;
    }
    Brand.showInCarousel = function(modelname) {

        var result = false;
        $.each(this.dataArray, function() {
        if (this[0].toString().toUpperCase() == modelname) {
                if (this[3] == "y") {
                    result = true;
                    return false;
                }
            }
        });
        return result;
    }
    Brand.firstModelColourInCarousel = function() {
        result = new Object;
        result.model = "";
        result.colour = "";
        $.each(this.dataArray, function() {
            if (this[3] == "y") {
                result.model = this[0].toUpperCase();
                result.colour = this[1][0].toUpperCase();
                return false;
            }
        });
        return result;
    }

//////build carousel
function BuildCarousel() {

    $("#carouselholder").append('<ul id="carousel" class="' + Brand.cssCarouselClassSkinName + '"></ul>');
    $.each(Brand.models(), function() { if (Brand.showInCarousel(this)) { $("#carousel").append('<li><a href="javascript:clickedCarousel(\'' + this + '\');"><img src="' + Brand.imageThumbsURL + this + '.jpg" alt="' + this + '.jpg"/></a></li>'); } });
    $('#carousel').jcarousel({ scroll: 4 });
}

function clickedCarousel(m){
    BuildModelSelect(m);
    BuildColourSelector();
    fadeInNewPhoto();
}

//////strip url hash code for model and colour

function urlBrand() {
    hash = new String(window.location.hash);
   var i = hash.indexOf("b$");
    if (i < 0) { return "" }
    var j = hash.indexOf("@");
    if (j < 0) { return "" }
    return hash.substring(i + 2, j);
}

function urlModel() {
    hash = new String(window.location.hash);
    var i = hash.indexOf("m$");
    if (i < 0) { return "" }
    var j = hash.indexOf("%");
    if (j < 0) { return "" }
    return hash.substring(i+2,j);
}

function urlColour() {

    hash = new String(window.location.hash);
    var i = hash.indexOf("c$");
    if (i < 0) { return "" }
   return hash.substring(i + 2, hash.length);
}

//////build model select drop down box

function BuildModelSelect(modelName) {

    $('#select').remove();
   $("#modelselectholder").append('<select id="select"  ></select>');
    $("#select").change(ModelSelectChange);
    $.each(Brand.models().sort(), function() {
    if (this == modelName) { $("#select").append('<option selected="selected" value=' + this + '>' + this + '</option>') }
        else { $("#select").append('<option value=' + this + '>' + this + '</option>') }
    });
}

function ModelSelectChange() {
    BuildColourSelector(Brand, Brand.models()[0]);
    fadeInNewPhoto()
}

/////build colour select drop down box ///parameter passes in first time if colour in urlParameters

function BuildColourSelector(optionalColour) {
    modelname = $('#select :selected').text();
    $('#colourselect').remove();
    $("#colourselectholder").append('<select id="colourselect" ></select>');
    $("#colourselect").change(fadeInNewPhoto);
    $.each(Brand.modelColours(modelname), function() {
        if (this == optionalColour) {
            $("#colourselect").append('<option id = "colouroptions" selected="selected" value="' + this + '">' + this + '</option>');
        }
       else {
           $("#colourselect").append('<option id = "colouroptions" value="' + this + '">' + this + '</option>');
        }
    });
}
/////build main image

function BuildMainImage() {
    var model = $('#select :selected').text();
    var colour = $('#colourselect :selected').text();
    var imagename = model + colour;
    window.location.hash = "b$" + Brand.name + "@" + "m$" + model + "%c$" + colour;
    //$("#photoholder").append('<img id="photo" src="' + Brand.imageURL + imagename + '.jpg" alt="' + imagename + '" width=600 height=302 />');
    $("#photoholder").append('<div id="loading" ></div>');
    $("#loading").append('<img id="loadinggif" src="images/loading.gif"/>');
    $("#loading").hide();
    $("#photoholder").append('<div id="noimage" ></div>');
    $("#noimage").append('<img id="noimagejpg" src="images/noimage.jpg" />');
    $("#noimage").hide();
    $("#photoholder").append('<img id="photo" />');
    $("#photo").attr('alt', imagename.toString());
    $("#photo").attr('src', Brand.imageURL + imagename.toString() + ".jpg");
    $("#sizes").text(Brand.sizes(model));
}

function fadeInNewPhoto() {
    var model = $('#select :selected').text();
    var colour = $('#colourselect :selected').text();
    var image = model + colour + ".jpg";
    window.location.hash = "b$" + Brand.name + "@" + "m$" + model + "%c$" + colour;
    src = $('#photo').attr('src').toString();
    modelcolour = src.substring(src.lastIndexOf("/") + 1, src.lastIndexOf("."));
    if (modelcolour.toString() != (model + colour).toString()) {//don't load again if already displaying
        // if ($("#photoholder").html != "") {
            $("#loading").show();
            $("#noimage").hide();
            $("#photo").remove();
           $("#photoholder").append('<img id="photo" />');
            $("#photo").attr('alt', image.toString());
            $("#photo").hide();
            $("#photo").load(function() {
                $("#loading").hide();
                $("#photo").fadeIn(1000);
            });
            $("#photo").error(function() {  $("#photo").hide(); $("#loading").hide(); $("#noimage").show(); });
            $("#photo").attr('src', Brand.imageURL + image.toString());
       // }
        $("#sizes").text(Brand.sizes(model));
    }
}
///////////////hello kitty//////////////////////
function hellokitty() {
    Brand.name = "hello kitty";
    Brand.cssCarouselClassSkinName = "jcarousel-skin-hk";
    Brand.imageURL = "images/hello kitty/";
    Brand.imageThumbsURL = "images/hello kitty/thumbs/";

    Brand.dataArray = new Array;
    Brand.dataArray.push(["HEMM024", ["C14", "C09", "C17"], "44/14", "y"]);
    Brand.dataArray.push(["HEMM025", ["C10", "C11", "C01"], "46/16", "y"]);
    Brand.dataArray.push(["HEMG002", ["C10", "C09", "C14"], "44/17", "y"]);
    Brand.dataArray.push(["HEMG003", ["C11", "C08", "C17"], "45/18", "y"]);
    Brand.dataArray.push(["HKMM029", ["C08", "C13", "C01"], "47/17", "y"]);
    Brand.dataArray.push(["HKAM002", ["C30", "C01", "C27"], "49/15", "y"]);
    Brand.dataArray.push(["HKMM027", ["C11", "C01", "C14"], "49/18", "y"]);
    Brand.dataArray.push(["HKMA018", ["C14", "C01", "C09"], "48/18", "n"]);
    Brand.dataArray.push(["HKMM023", ["C12", "C01", "C14"], "48/17", "y"]);
    Brand.dataArray.push(["HKMM024", ["C08", "C01", "C12"], "48/17", "y"]);
    Brand.dataArray.push(["HKMG001", ["C08", "C01", "C12"], "49/18", "y"]);
    Brand.dataArray.push(["HKMG002", ["C11", "C01", "C14"], "47/17", "n"]);
    Brand.dataArray.push(["HKMG003", ["C11", "C10", "C01"], "48/17", "y"]);
    Brand.dataArray.push(["HKMA013", ["C12", "C01", "C08"], "48/18", "n"]);
    Brand.dataArray.push(["HKMA015", ["C01", "C12", "C08"], "48/17", "n"]);
    Brand.dataArray.push(["HKKMA01", ["C14", "C10", "C09"], "44/17", "y"]);    
    Brand.dataArray.push(["HEMA004", ["C01", "C08", "C14"],"45/16","n"]);
    Brand.dataArray.push(["HEMA005", ["C01", "C10", "C15"], "44/17", "n"]);
    Brand.dataArray.push(["HEMA006", ["C08", "C11", "C14"], "45/16", "n"]);
    Brand.dataArray.push(["HEMM012", ["C09", "C11", "C14"], "43/18", "y"]);
    Brand.dataArray.push(["HEMM013", ["C01", "C08", "C12"], "46/16", "y"]);
    Brand.dataArray.push(["HEMM014", ["C09", "C11", "C12"], "44/17", "y"]);
    Brand.dataArray.push(["HEMM015", ["C11", "C14", "C09"], "41/18", "y"]);
    Brand.dataArray.push(["HEMM016", ["C09", "C11", "C14"], "45/18", "y"]);
    Brand.dataArray.push(["HKA11", ["C01", "C12"], "50/15", "n"]);
    Brand.dataArray.push(["HKKM05", ["C08", "C05","C14"], "44/17", "n"]);
    Brand.dataArray.push(["HKKM06", ["C10", "C08", "C12"], "43/18", "n"]);
//    //["hkkma02",["c"],"y",["44/17"]],
//    //["hkkm01",["c"],"y",["44/17"]],
//    //["hkkm02",["c"],"y",["46/18"]],
//["hkkm03", ["c"], "y", ["45/17"], [["C09", "Purple"], ["C01", "Black"]]],
//["hkkm05", ["c"], "y", ["44/17"], [["C08", "Purple"], ["C05", "Blue"], ["C14", "Pink"]]],
//["hkkm06", ["c"], "y", ["43/18"], [["C10", "Pink"], ["C08", "Purple"], ["C12", "Purple"]]],
//["hkkm07", ["c"], "y", ["44/18"], [["C06", "Green"], ["C14", "Red"], ["C10", "Pink"]]],
//["hkkm08", ["c"], "y", ["46/18"], [["C08", "Burg"], ["C06", "Blue"], ["C14", "Pink"]]]

    $('head').append('<link type="text/css" href="css/hellokitty.css" rel="stylesheet">');
    $('head').append('<script type="text/javascript" src="script/jcarousel/lib/jquery.jcarousel.js"></script>');
    $('head').append('<link rel="stylesheet" type="text/css" href="css/carousel/jcarouseldefault.css" />');
    $('head').append('<link rel="stylesheet" type="text/css" href="css/carousel/hk/hkcarouselskin.css" />');
 
     ///////////////////////////hello kitty banner/////////////////////////////////////////////////
    $('#banner').text('');
    $('#banner').append('<div id="hkbannerholder"></div>');
    $('#hkbannerholder').append('<img class="hktitle" src="images/hello kitty/title/h.gif" />');
    $('#hkbannerholder').append('<img class="hktitle" src="images/hello kitty/title/e.gif" />');
    $('#hkbannerholder').append('<img class="hktitle" src="images/hello kitty/title/l.gif" />');
    $('#hkbannerholder').append('<img class="hktitle" src="images/hello kitty/title/l.gif" />');
    $('#hkbannerholder').append('<img class="hktitle" src="images/hello kitty/title/l.gif" />');
    $('#hkbannerholder').append('<img class="hktitle" src="images/hello kitty/title/o.gif" />');
    $('#hkbannerholder').append('<img class="hktitle" src="images/hello kitty/title/blank.gif" />');
    $('#hkbannerholder').append('<img class="hktitle" src="images/hello kitty/title/k.gif" />');
    $('#hkbannerholder').append('<img class="hktitle" src="images/hello kitty/title/i.gif" />');
    $('#hkbannerholder').append('<img class="hktitle" src="images/hello kitty/title/t.gif" />');
    $('#hkbannerholder').append('<img class="hktitle" src="images/hello kitty/title/t.gif" />');
    $('#hkbannerholder').append('<img class="hktitle" src="images/hello kitty/title/y.gif" />');
    BuildCarousel();
    if (urlModel() == "") {
        first = Brand.firstModelColourInCarousel();
        BuildModelSelect(first.model);
        BuildColourSelector(first.colour);
    }
    else {
        BuildModelSelect(urlModel());
        BuildColourSelector(urlColour());
    }
    BuildMainImage();
}
///////////////nyyankees//////////////////////
function nyyankees() {
    Brand.name = "nyyankees";
    Brand.cssCarouselClassSkinName = "jcarousel-skin-ny";
    Brand.imageURL = "images/ny yankees/";
    Brand.imageThumbsURL = "images/ny yankees/thumbs/";
    $('head').append('<link type="text/css" href="css/ny.css" rel="stylesheet">');
    $('head').append('<script type="text/javascript" src="script/jcarousel/lib/jquery.jcarousel.js"></script>');
    $('head').append('<link rel="stylesheet" type="text/css" href="css/carousel/jcarouseldefault.css" />');
    $('head').append('<link rel="stylesheet" type="text/css" href="css/carousel/ny/nycarouselskin.css" />');
    $('#banner').text('');
    $('#banner').append('<div id="nybannerholder"></div>');

    Brand.dataArray = new Array;
    
    Brand.dataArray.push(["NYMM019", ["C02", "C16", "C18"], "47/17", "y"]);
    Brand.dataArray.push(["NYMM020", ["C07", "C01", "C18"], "51/18", "y"]);

    Brand.dataArray.push(["NYMM018", ["C16", "C01", "C07"], "48/18", "y"]);
    Brand.dataArray.push(["NYMM014", ["C03", "C01", "C07"], "51/18", "y"]);
    Brand.dataArray.push(["NYMM015", ["C04", "C18", "C01"], "49/17", "y"]);
    Brand.dataArray.push(["NYMM016", ["C18", "C00", "C01"], "48/18", "y"]);
    Brand.dataArray.push(["NYMM017", ["C01", "C04", "C16"], "50/18", "y"]);
    Brand.dataArray.push(["NYAA002", ["C01", "C16", "C07"], "51/15", "y"]);
    Brand.dataArray.push(["NYMM002", ["C01", "C02", "C18"], "49/18", "y"]);
    Brand.dataArray.push(["NYMM003", ["C01", "C03", "C18"], "46/18", "y"]);
    Brand.dataArray.push(["NYAM002", ["C01", "C07", "C16"], "49/15", "n"]);
    Brand.dataArray.push(["NYMA001", ["C01", "C04", "C16"], "50/18", "y"]);
    Brand.dataArray.push(["NYMA002", ["C02", "C07", "C18"], "51/18", "y"]);
    Brand.dataArray.push(["NYMA003", ["C02", "C07", "C18"], "49/18", "y"]);
    Brand.dataArray.push(["NYMA004", ["C01", "C04", "C16"], "53/19", "n"]);
    Brand.dataArray.push(["NYMA005", ["C04", "C07", "C13"], "49/18", "y"]);
    Brand.dataArray.push(["NYMA006", ["C01", "C03", "C18"], "50/18", "y"]);
    Brand.dataArray.push(["NYMA007", ["C07", "C04", "C18"], "52/18", "y"]);
    Brand.dataArray.push(["NYMM008", ["C07", "C03", "C01"], "52/18", "y"]);
    Brand.dataArray.push(["NYMM009", ["C01", "C17", "C13"], "52/18", "y"]);
    Brand.dataArray.push(["NYMM010", ["C04", "C01", "C17"], "51/18", "y"]);
    Brand.dataArray.push(["NYMM011", ["C18", "C01", "C03"], "52/18", "n"]);
    Brand.dataArray.push(["NYMM012", ["C03", "C18", "C04"], "49/18", "n"]);
    Brand.dataArray.push(["NYMM013", ["C07", "C17", "C01"], "48/18", "y"]);
    BuildCarousel();
    if (urlModel() == "") {
        first = Brand.firstModelColourInCarousel();
        BuildModelSelect(first.model);
        BuildColourSelector(first.colour);  
        }
    else {
        BuildModelSelect(urlModel());
        BuildColourSelector(urlColour());
    }
    BuildMainImage();
}
///////////////titeuf//////////////////////
function titeuf() {
    Brand.name = "titeuf";
    Brand.cssCarouselClassSkinName = "jcarousel-skin";
    Brand.imageURL = "images/titeuf/";
    Brand.imageThumbsURL = "images/titeuf/thumbs/";
    $('head').append('<link type="text/css" href="css/titeuf.css" rel="stylesheet">');
    $('head').append('<script type="text/javascript" src="script/jcarousel/lib/jquery.jcarousel.js"></script>');
    $('head').append('<link rel="stylesheet" type="text/css" href="css/carousel/jcarouseldefault.css" />');
    $('head').append('<link rel="stylesheet" type="text/css" href="css/carousel/titeuf/skin.css" />');
    $('#banner').text('');
    $('#banner').append('<div id="bannerholder"></div>');

    Brand.dataArray = new Array;
    
    Brand.dataArray.push(["TIMM088", ["C07", "C17", "C14"], "44/18", "y"]);
    Brand.dataArray.push(["TIMM087", ["C18", "C14", "C06"], "45/18", "y"]);
    Brand.dataArray.push(["TIAM002", ["C06", "C16", "C18"], "47/17", "y"]);
    
    Brand.dataArray.push(["TM16", ["C03", "C13", "C15"], "46/18", "y"]);
    Brand.dataArray.push(["TIGM001", ["C01", "C06"], "44/17", "y"]);
    Brand.dataArray.push(["TIMM083", ["C07", "C01", "C03"], "48/15", "n"]);
    Brand.dataArray.push(["TIMM084", ["C01", "C07", "C18"], "48/17", "y"]);
    Brand.dataArray.push(["TIMM085", ["C18", "C01", "C06"], "47/17", "y"]);
    Brand.dataArray.push(["TIMM086", ["C14", "C01", "C03"], "46/17", "y"]);
    Brand.dataArray.push(["TM29", ["C17", "C03", "C13"], "46/18", "n"]);
    Brand.dataArray.push(["TM24", ["C07", "C16", "C03"], "44/18", "y"]);
    Brand.dataArray.push(["TM26", ["C18", "C07", "C02"], "45/17", "y"]);
    Brand.dataArray.push(["TM28", ["C01", "C13", "C19"], "45/17", "n"]);
    Brand.dataArray.push(["TM30", ["C16", "C01", "C19"], "44/17", "n"]);
    Brand.dataArray.push(["TM32", ["C19", "C01", "C16"], "43/17", "n"]);
    BuildCarousel();
    if (urlModel() == "") {
        first = Brand.firstModelColourInCarousel();
        BuildModelSelect(first.model);
        BuildColourSelector(first.colour);
    }
    else {
        BuildModelSelect(urlModel());
        BuildColourSelector(urlColour());
    }
    BuildMainImage();

}

function lulu() {
    Brand.name = "lulu";
    Brand.cssCarouselClassSkinName = "jcarousel-skin";
    Brand.imageURL = "images/lulu castagnette/";
    Brand.imageThumbsURL = "images/lulu castagnette/thumbs/";
    $('head').append('<link type="text/css" href="css/lulu.css" rel="stylesheet">');
    $('head').append('<script type="text/javascript" src="script/jcarousel/lib/jquery.jcarousel.js"></script>');
    $('head').append('<link rel="stylesheet" type="text/css" href="css/carousel/jcarouseldefault.css" />');
    $('head').append('<link rel="stylesheet" type="text/css" href="css/carousel/lulu/carouselskin.css" />');
    $('#banner').text('');
    $('#banner').append('<div id="bannerholder"></div>');

    Brand.dataArray = new Array;
    Brand.dataArray.push(["LFMA052", ["C12", "C01"], "45/16", "y"]);
    Brand.dataArray.push(["LFMM100", ["C16", "C08","C01"], "49/18", "y"]);
    Brand.dataArray.push(["LFMM101", ["C08", "C01","C14"], "47/18", "y"]);
    Brand.dataArray.push(["LFMM099", ["C17", "C12","C01"], "47/18", "y"]);

    Brand.dataArray.push(["LEMM070", ["C09", "C05", "C01"], "43/17", "y"]);
    Brand.dataArray.push(["LEMM072", ["C08", "C11", "C01"], "45/16", "y"]);
    Brand.dataArray.push(["LEMM042", ["C09", "C05", "C10"], "41/16", "y"]);
    Brand.dataArray.push(["LEMM045", ["C17", "C08", "C14"], "44/18", "n"]);
    Brand.dataArray.push(["LEMM046", ["C08", "C01", "C14"], "44/18", "n"]);
    Brand.dataArray.push(["LFAM048", ["C01", "C08", "C90"], "48/16", "n"]);
    Brand.dataArray.push(["LEAA019", ["C12", "C10", "C14"], "45/16", "n"]);
    Brand.dataArray.push(["LM28", ["C08", "C10", "C14"], "45/18", "n"]);
    Brand.dataArray.push(["LM16", ["C12", "C10", "C09"], "44/18", "n"]);
    Brand.dataArray.push(["LEMM043", ["C21", "C11", "C14"], "42/17", "y"]);
    Brand.dataArray.push(["LEMM044", ["C09", "C14", "C10"], "41/17", "y"]);
    Brand.dataArray.push(["LMA06", ["C14", "C05", "C10"], "44/17", "n"]);
    Brand.dataArray.push(["LMA08", ["C15", "C10", "C05"], "43/17", "n"]);
    Brand.dataArray.push(["LAM01", ["C10"], "44/17", "n"]);

    BuildCarousel();
    if (urlModel() == "") {
        first = Brand.firstModelColourInCarousel();
        BuildModelSelect(first.model);
        BuildColourSelector(first.colour);
    }
    else {
        BuildModelSelect(urlModel());
        BuildColourSelector(urlColour());
    }
    BuildMainImage();
}

function cottet() {
    Brand.name = "cottet";
    Brand.cssCarouselClassSkinName = "jcarousel-skin";
    Brand.imageURL = "images/cottet/";
    Brand.imageThumbsURL = "images/cottet/thumbs/";
    $('head').append('<link type="text/css" href="css/cottet.css" rel="stylesheet">');
    $('head').append('<script type="text/javascript" src="script/jcarousel/lib/jquery.jcarousel.js"></script>');
    $('head').append('<link rel="stylesheet" type="text/css" href="css/carousel/jcarouseldefault.css" />');
    $('head').append('<link rel="stylesheet" type="text/css" href="css/carousel/cottet/skin.css" />');
    $('#banner').text('');
    $('#banner').append('<div id="bannerholder"></div>');

    Brand.dataArray = new Array;
    
    Brand.dataArray.push(["6698c", ["gi000", "rh115", "nm000"], "52/18", "y"]);
    Brand.dataArray.push(["6699c", ["co059", "co060", "ri000"], "54/18", "y"]);

    Brand.dataArray.push(["6718c", ["sn208", "sn207", "sn206"], "49/17", "y"]);
    Brand.dataArray.push(["6658c", ["sn194", "sn191", "sn192"], "51/17", "y"]); 
    Brand.dataArray.push(["6593c", ["co060", "di000", "gi000"], "50/16", "y"]);
    Brand.dataArray.push(["6594c", ["co059", "co060", "co098"], "54/18", "y"]);
    Brand.dataArray.push(["6595c", ["co100", "rh115", "co101"], "54/18", "y"]);
    Brand.dataArray.push(["6596c", ["co059", "co060", "nm000"], "51/19", "y"]);
    Brand.dataArray.push(["6597c", ["co109", "rf000", "co098"], "53/19", "y"]);
    Brand.dataArray.push(["6494c", ["sn183", "sn184", "sn185"], "51/17", "n"]);
    Brand.dataArray.push(["6495c", ["sn178", "sn186", "sn172"], "52/16", "n"]);
    Brand.dataArray.push(["6496c", ["sn173", "sn171", "sn172"], "50/16", "n"]);
    Brand.dataArray.push(["6471c", ["mj408", "mj407", "mj410"], "51/17", "n"]);
    Brand.dataArray.push(["6474c", ["mj414", "mj413", "mj407"], "52/17", "n"]);
    Brand.dataArray.push(["6477c", ["mj418", "mj419", "mj421"], "49/17", "n"]);
    Brand.dataArray.push(["6480c", ["mj426", "mj422", "mj424"], "50/17", "n"]);
    Brand.dataArray.push(["6411c", ["co065", "co056", "nm000"], "54/xx", "n"]);
    Brand.dataArray.push(["6412c", ["co064", "co088", "nm000"], "55/xx", "n"]);
    Brand.dataArray.push(["6413c", ["co067", "co065", "co088"], "55/xx", "n"]);
    Brand.dataArray.push(["6414c", ["nm000", "co056", "co088"], "55/xx", "n"]);
    Brand.dataArray.push(["6340c", ["co064", "nm000", "gu000"], "53/18", "y"]);
    Brand.dataArray.push(["6337c", ["co067", "co000", "do000"], "52/18", "n"]);
    Brand.dataArray.push(["6338c", ["co066", "nm000", "co064"], "54/18", "n"]);
    Brand.dataArray.push(["6339c", ["rf000", "co065", "do000"], "55/19", "n"]);
    Brand.dataArray.push(["6341c", ["di000", "rf000", "rh115"], "55/19", "n"]);
    Brand.dataArray.push(["6342c", ["co059", "gi000", "co060"], "55/19", "n"]);
    Brand.dataArray.push(["6343c", ["rf000", "co059", "rh115"], "51/19", "n"]);
    Brand.dataArray.push(["6344c", ["co060", "di000", "gi000"], "56/18", "n"]);
    Brand.dataArray.push(["6349c", ["mj385", "mj387", "mj383"], "51/17", "n"]);
    Brand.dataArray.push(["6350c", ["mj386", "mj388", "di000"], "49/17", "n"]);
    Brand.dataArray.push(["6028c", ["ql139", "ql137"], "54/17", "n"]);
    Brand.dataArray.push(["6029c", ["rh115", "gu000", "co051"], "52/20", "n"]);
    Brand.dataArray.push(["6168c", ["mj360", "co062", "mj361"], "57/19:60/19", "n"]);
 
   BuildCarousel();
    if (urlModel() == "") {
        first = Brand.firstModelColourInCarousel();
        BuildModelSelect(first.model);
        BuildColourSelector(first.colour);
    }
    else {
        BuildModelSelect(urlModel());
        BuildColourSelector(urlColour());
    }
    BuildMainImage();
}

function lt() {
    Brand.name = "lt";
    Brand.cssCarouselClassSkinName = "jcarousel-skin";
    Brand.imageURL = "images/lt/";
    Brand.imageThumbsURL = "images/lt/thumbs/";
    $('head').append('<link type="text/css" href="css/lt.css" rel="stylesheet">');
    $('head').append('<script type="text/javascript" src="script/jcarousel/lib/jquery.jcarousel.js"></script>');
    $('head').append('<link rel="stylesheet" type="text/css" href="css/carousel/jcarouseldefault.css" />');
    $('head').append('<link rel="stylesheet" type="text/css" href="css/carousel/lt/skin.css" />');
    $('#banner').text('');
    $('#banner').append('<div id="bannerholder"></div>');

    Brand.dataArray = new Array;
    Brand.dataArray.push(["6605L", ["gn101","nn136","gn001"], "54/18", "y"]);
    Brand.dataArray.push(["6628L", ["gn138","ng000","rn101"], "54/18", "y"]);
    Brand.dataArray.push(["6629L", ["gn121","gn000","nn136"], "54/18", "y"]);
    Brand.dataArray.push(["6736L", ["nr203","gn201","bb200"], "54/17", "y"]);
    Brand.dataArray.push(["6737L", ["no000","mm206","bg204"], "52/16", "y"]);
    Brand.dataArray.push(["6738L", ["bb200","mm202","no000"], "54/16", "y"]);
    Brand.dataArray.push(["6739L", ["nb209","gg208","mm206"], "52/16", "y"]);
    Brand.dataArray.push(["6740L", ["go205","no000","bg204"], "53/16", "y"]);  
    Brand.dataArray.push(["6742L", ["pp214","mm206","pp217"], "53/18", "y"]);
    Brand.dataArray.push(["6743L", ["pp217","mm202","gw213"], "51/17", "y"]);
    Brand.dataArray.push(["6744L", ["pp214","pp217","nw215"], "51/17", "y"]);
    Brand.dataArray.push(["6745L", ["mm206","gp210"], "51/17", "y"]);
    Brand.dataArray.push(["6638L", ["gb502","rr504","pv501"], "49/16", "y"]);
    Brand.dataArray.push(["6639L", ["pv502","ng510","gr509"], "50/16", "y"]);
    Brand.dataArray.push(["6640L", ["mm511","gp512"], "50/15", "y"]);
    Brand.dataArray.push(["6642L", ["ea084","ea083","ea065"], "52/17", "y"]);
    Brand.dataArray.push(["6643L", ["cb515","bg516","gn517","mg514"], "52/17", "y"]);
    Brand.dataArray.push(["6644L", ["gn517","bg521","mn520","nc518"], "52/17", "y"]);
    Brand.dataArray.push(["6645L", ["go523","gn524","ng513"], "52/18", "y"]);
    Brand.dataArray.push(["6646L", ["mg526","bg521","gn524","ng527"], "54/18", "y"]);
    Brand.dataArray.push(["6678L", ["bw008","nw012"], "52/18", "y"]);
    Brand.dataArray.push(["6674L", ["pw020","nw010"], "51/17", "y"]);
    Brand.dataArray.push(["6680L", ["mb040","no000"], "54/18", "y"]);
    Brand.dataArray.push(["6536L", ["ng209", "dm051", "gn206"], "51/20", "n"]);
    Brand.dataArray.push(["6537L", ["cv203", "do220", "gp205"], "49/19", "n"]);
    Brand.dataArray.push(["6443L", ["mm625", "gd605", "nn603"], "51/18", "n"]);
    //Brand.dataArray.push(["6245L", ["ea001", "ea014"], "52/18", "n"]);
    Brand.dataArray.push(["6300L", ["bb040", "bg041", "gn043"], "51/19", "y"]);
    Brand.dataArray.push(["6377L", ["bd600", "dm601", "gn602"], "52/17", "n"]);
    Brand.dataArray.push(["6378L", ["mc604", "nn603", "gd605"], "53/18", "n"]);
    Brand.dataArray.push(["6379L", ["mn606", "nd608", "gc607"], "51/18", "n"]);
    Brand.dataArray.push(["6380L", ["dm601", "bc610", "gd609"], "52/17", "n"]);
    Brand.dataArray.push(["6385L", ["bg060", "mg061", "dm051", "gg063", "nm000", "gb062"], "51/17", "n"]);
    Brand.dataArray.push(["6386L", ["ng064", "mm000", "bg067", "dm051", "gv065"], "51/18", "n"]);
    Brand.dataArray.push(["6526L", ["bg001", "gg002", "nc054", "mm000"], "52/17", "n"]);
    Brand.dataArray.push(["6437L", ["ea052", "ea050", "ea051"], "52/18", "n"]);
    Brand.dataArray.push(["6438L", ["ea055", "ea056"], "53/19", "n"]);
    Brand.dataArray.push(["6439L", ["ea055", "ea057", "ea058"], "54/18", "n"]);
    Brand.dataArray.push(["6440L", ["ea052", "ea057"], "52/18", "n"]);
    //Brand.dataArray.push(["6444L", ["gd623", "mc604", "nn626"], "52/17", "y"]);
    Brand.dataArray.push(["6445L", ["ea065", "ea056", "ea063"], "50/17", "n"]);
    Brand.dataArray.push(["6446L", ["ea056", "ea068", "ea063"], "51/16", "n"]);
    Brand.dataArray.push(["6381L", ["pb613", "mb612", "dw611"], "51/16", "n"]);
    //Brand.dataArray.push(["6382L", ["mw616", "pn614", "mb615"], "50/16", "y"]);
    Brand.dataArray.push(["6383L", ["dw611", "pb613", "mb617"], "50/17", "n"]);
    //Brand.dataArray.push(["6384L", ["mo619", "pn618", "mb612"], "49/17", "n"]);
    Brand.dataArray.push(["6528L", ["ng006", "dm051", "mg005"], "53/18", "n"]);
    //Brand.dataArray.push(["6449L", ["ea064", "ea068", "ea063"], "50/17", "n"]);
    //3-piece
    Brand.dataArray.push(["6533L", ["ea070", "ea071"], "50/18", "n"]);
    //Brand.dataArray.push(["6533L", ["ea070", "ea071"], "50/18", "y"]);
    Brand.dataArray.push(["6405L", ["dw611", "mn624"], "52/17", "n"]);
    Brand.dataArray.push(["6406L", ["mn629", "cp628", "mw630"], "51/17", "n"]);
    Brand.dataArray.push(["6403L", ["gc601", "gc607", "cn620"], "53/18", "y"]);
    Brand.dataArray.push(["6404L", ["gt623", "nd608", "mc604", "cn622"], "51/18", "n"]);
    Brand.dataArray.push(["6448L", ["ea056", "ea065", "ea063"], "52/17", "n"]);

    BuildCarousel();
    if (urlModel() == "") {
        first = Brand.firstModelColourInCarousel();
        BuildModelSelect(first.model);
        BuildColourSelector(first.colour);
    }
    else {
        BuildModelSelect(urlModel());
        BuildColourSelector(urlColour());
    }
    BuildMainImage();
}

function morel() {

    Brand.name = "morel";
    Brand.cssCarouselClassSkinName = "jcarousel-skin";
    Brand.imageURL = "images/marius morel/";
    Brand.imageThumbsURL = "images/marius morel/thumbs/";
    $('head').append('<link type="text/css" href="css/morel.css" rel="stylesheet">');
    $('head').append('<script type="text/javascript" src="script/jcarousel/lib/jquery.jcarousel.js"></script>');
    $('head').append('<link rel="stylesheet" type="text/css" href="css/carousel/jcarouseldefault.css" />');
    $('head').append('<link rel="stylesheet" type="text/css" href="css/carousel/morel/skin.css" />');
    $('#banner').text('');
    $('#banner').append('<div id="bannerholder"></div>');

    Brand.dataArray = new Array;
    
    Brand.dataArray.push(["1838m", ["mj458", "co157", "mj392"], "51/19", "y"]);
    Brand.dataArray.push(["1839m", ["co157", "mj393", "mj392"], "51/19", "y"]);
    Brand.dataArray.push(["1811m", ["gi000", "nm000", "co066"], "51/19", "y"]);
    Brand.dataArray.push(["1812m", ["co066", "nm000", "gi000"], "55/18", "y"]);
    Brand.dataArray.push(["1813m", ["nm000", "co066", "ri000"], "53/18", "y"]);
    Brand.dataArray.push(["1731m", ["co157", "mj392", "di000"], "50/17", "y"]);
    Brand.dataArray.push(["1732m", ["mj396", "mj393", "di000"], "52/17", "y"]);
    Brand.dataArray.push(["1734m", ["mj393", "mj392", "di000"], "49/18", "y"]);
    Brand.dataArray.push(["1754m", ["pp007","dm002", "mj061"], "51/16", "y"]);
    Brand.dataArray.push(["1755m", ["pp005","md110",  "do000"], "53/16", "y"]); 
    Brand.dataArray.push(["1765m", ["co157","mj396",  "di000"], "52/18", "n"]);
    Brand.dataArray.push(["1766m", ["di000","mj392",  "mj459"], "50/18", "y"]);
    Brand.dataArray.push(["1767m", ["mj456","mj392",  "di000"], "50/18", "y"]);
    Brand.dataArray.push(["1768m", ["co157","mj392",  "mj457"], "50/18", "y"]);
    Brand.dataArray.push(["1581m", ["mj392", "di000", "mj393"], "52/17", "y"]);
    Brand.dataArray.push(["1582m", ["mj396", "di000", "mj395"], "50/17", "n"]);
    //Brand.dataArray.push(["1584m", ["mj393", "di000", "mj392"], "49/17", "y"]);
    //Brand.dataArray.push(["1585m", ["mj396", "di000", "mj395"], "51/17", "y"]);
    Brand.dataArray.push(["1460m", ["ts520", "do000"], "52/17", "n"]);
    Brand.dataArray.push(["1462m", ["do000", "im041"], "51/18", "n"]);
    Brand.dataArray.push(["1508m", ["im131", "do000", "im041"], "51/17", "n"]);
    Brand.dataArray.push(["1792m", ["pt002", "gs002"], "53/17", "y"]);
    Brand.dataArray.push(["1727m", ["gu000", "br042", "do000"], "54/19", "y"]);
    Brand.dataArray.push(["1728m", ["br076", "rf000", "do000"], "53/18", "y"]);
    Brand.dataArray.push(["1729m", ["gu000", "br042", "do000"], "53/18", "y"]);
    Brand.dataArray.push(["1730m", ["br077", "rf000", "nm000"], "54/18", "y"]);
    Brand.dataArray.push(["1843m", ["rf000", "do000"], "54/18, 58/19", "y"]);
    Brand.dataArray.push(["1844m", ["rf000", "do000"], "53/18", "y"]);
    Brand.dataArray.push(["1846m", ["gu000", "nm000", "br042"], "51/19", "y"]);
    Brand.dataArray.push(["1477m", ["sn122", "sn124", "sn123"], "53/19", "n"]);
    Brand.dataArray.push(["1507m", ["im024", "rf000", "do000"], "54/18", "n"]);
    //Brand.dataArray.push(["0590m", ["im024", "gu000", "ts006"], "51/18", "n"]);
    Brand.dataArray.push(["0620m", ["do000", "gu000"], "52/18", "n"]);
    Brand.dataArray.push(["1171m", ["rh115", "do000", "gu000"], "50/19", "n"]);
    //["1459m",["f"],"y",["52/17"],[["mj140","lilac"],["im131","brown"]]],
    //["1509m",["f"],"y",["52/17"],[["im131","brown"],["do000","gold"],["im041","lilac"]]],
    //["1485m",["f"],"y",["50/18"],[["mj342","brown"],["do000","gold"],["im041","lilac"]]],
    //["1486m",["f"],"y",["51/18"],[["mj140","purple"],["mj342","brown"],["do000","gold"],["mj041","lilac"]]],
    //["1534m",["f"],"y",["50/18"],[["im131","brown"],["im135","red"],["do000","gold"]]],
    //["1535m",["f"],"y",["52/18"],[["im130","pink"],["im131","brown"],["do000","gold"]]],
    //["1538m",["f"],"y",["51/18"],[["mj140","lilac"],["im131","brown"],["do000","gold"]]],
    //["1539m",["f"],"y",["52/18"],[["im041","lilac"],["im131","brown"],["im130","pink"]]],
    //["1487m",["f"],"n",["49/18"],[["ga125","purple"],["mj342","brown"],["im041","lilac"]]],
    //["1407m",["f"],"y",["51/16"],[["im135","red"],["mj342","burg"]]],],
    //["1478m",["m"],"y",["52/19"],[["sn127","brown"],["sn126","silver"],["sn125","black"]]],
    //["1481m",["m"],"n",["53/19"],[["sn129","gun"],["sn128","brown"],["sn122","gold"]]],
    //["1482m",["m"],"n",["54/19"],[["sn131","gun"],["sn123","silver"]]],
    //["1505m",["m"],"y",["54/18"],[["nm000","black"],["im024","brown"],["gu000","gun"]]],
    //["1506m",["m"],"y",["53/19"],[["mj342","brown"],["rf000","gun"],["ga168","green"],["gu000","gun"]]],
	//["1528m", ["m"], "y", ["52/19"], [["co073", "blue"], ["sn123", "brown"]]],
	//["1529m", ["m"], "y", ["51/19"], [["co069", "black"], ["co070", "gun"]]],
	//["1530m", ["m"], "y", ["54/19"], [["co068", "gun"], ["sn122", "gold"]]],
    //["0511m",["f"],"n",["51/18"],[["mj041","blue"],["mj041","gold"],["mj061","red"]]],
    //["1150m",["m"],"n",["53/18"],[["mj342","brown"],["rf000","gun"],["gu000","gun"]]],
    //["1160m",["m"],"n",["54/18"],[["gu000","gun"],["do000","gold"]]],
    //["1326m",["f"],"n",["52/17"],[["mj041","brown"],["do000","gold"],["im131","brown"],["im134","purple"]]],
    //["1330m",["h","f"],"n",["52/17"],[["im134","purple"],["do000","gold"],["im135","red"]]],
    //["1337m",["m"],"n",["54/18"],[["mj342","brown"],["co000","silver"]]],
    //["1338m",["m"],"n",["52/18"],[["rh115","brown"],["rf000","gun"]]],
    //["1405m",["f"],"n",["49/17"],[["mj342","brown"],["im135","red"]]],
    //["1463m",["f"],"n",["51/17"],[["mj106","blue"],["do000","gold"]]],
    //["1468m",["m"],"n",["51/18"],[["im028","blue"],["gu000","gun"],["nm000","black"]]],
    //["1466m",["m"],"n",["54/18"],[["im024","brown"],["gu000","gun"],["im155","black"]]]

    BuildCarousel();
    if (urlModel() == "") {
        first = Brand.firstModelColourInCarousel();
        BuildModelSelect(first.model);
        BuildColourSelector(first.colour);
    }
    else {
        BuildModelSelect(urlModel());
        BuildColourSelector(urlColour());
    }
    BuildMainImage();
}

function nomad() {
    Brand.name = "nomad";
    Brand.cssCarouselClassSkinName = "jcarousel-skin";
    Brand.imageURL = "images/nomad/";
    Brand.imageThumbsURL = "images/nomad/thumbs/";
    $('head').append('<link type="text/css" href="css/nomad.css" rel="stylesheet">');
    $('head').append('<script type="text/javascript" src="script/jcarousel/lib/jquery.jcarousel.js"></script>');
    $('head').append('<link rel="stylesheet" type="text/css" href="css/carousel/jcarouseldefault.css" />');
    $('head').append('<link rel="stylesheet" type="text/css" href="css/carousel/nomad/skin.css" />');
    $('#banner').text('');
    $('#banner').append('<div id="bannerholder"></div>');

    Brand.dataArray = new Array;
    
    Brand.dataArray.push(["1828n", ["md001","mb006","po010"], "51/17", "y"]);
    Brand.dataArray.push(["1829n", ["pb003","mo002","nw006"], "51/17", "y"]);
    Brand.dataArray.push(["1832n", ["mo003","nb106","mr104"], "50/16", "y"]);
    Brand.dataArray.push(["1833n", ["bb002","rm007","mo001"], "51/17", "y"]);
    Brand.dataArray.push(["1822n", ["gn044","bb047","mm045"], "54/17", "y"]);
    Brand.dataArray.push(["1824n", ["bm048","nm050","gn049"], "52/17", "y"]);
    Brand.dataArray.push(["1825n", ["mm040","bg042","nm000"], "54/17", "y"]);
    Brand.dataArray.push(["1769n", ["no070","no068"], "50/17", "y"]);
    Brand.dataArray.push(["1770n", ["no073","no074"], "50/17", "y"]);
    Brand.dataArray.push(["1774n", ["no088","no087"], "50/17", "y"]);
    Brand.dataArray.push(["1775n", ["no073","no068"], "52/17", "y"]);
	Brand.dataArray.push(["1777n", ["gg137", "bb139", "mm136"], "53/18", "y"]);
	Brand.dataArray.push(["1778n", ["gg143", "mn142", "nn141"], "54/17", "y"]);
	Brand.dataArray.push(["1780n", ["po107", "nw104", "rr106"], "50/17", "y"]);
	Brand.dataArray.push(["1783n", ["pv118", "nr117", "ro119"], "50/17", "y"]);
	Brand.dataArray.push(["1784n", ["nw104", "mw121", "po107"], "52/16", "y"]);
	Brand.dataArray.push(["1785n", ["mm124", "mo122", "nw104"], "50/15", "y"]);
    Brand.dataArray.push(["1693n", ["nm000", "bl050", "mm052", "co051"], "54/18", "y"]);
    Brand.dataArray.push(["1694n", ["pg053", "bg054", "nm000"], "50/18", "y"]);
    Brand.dataArray.push(["1695n", ["bl060", "gr061", "nm000", "co059"], "52/18", "y"]);
    Brand.dataArray.push(["1697n", ["mm065", "gg066", "nm100", "mm052"], "53/18", "y"]);
    Brand.dataArray.push(["1698n", ["ea015", "mg067", "nm000", "pp068"], "51/17", "y"]);
    Brand.dataArray.push(["1699n", ["nb055", "tm056"], "51/17", "y"]);
    Brand.dataArray.push(["1702n", ["ng007", "gm005"], "48/19", "y"]);
    Brand.dataArray.push(["1704n", ["gm017", "nb015", "go013"], "52/17", "y"]);
    Brand.dataArray.push(["1706n", ["mp019", "np001", "gg018"], "51/16", "y"]);
//["1542n",["f","m"],"n",["51/18"],[["ng100","black"],["gb102","blue"],["mg101","brown"]]],
//["1545n",["f"],"n",["49/18"],[["mv107","green"],["fr106","pink"],["rp108","red"]]],
//["1546n",["f"],"n",["50/18"],[["pm109","burg"],["mr111","brown"],["bp110","pink"]]],
//["1548n",["f","m"],"n",["52/18"],[["gg104","gray"],["nm105","black"],["bg103","blue"]]],
//["1436n",["m","f"],"n",["51/17"],[["im082","brown"],["im173","black"],["im116","gray"]]],
//["1437n",["f"],"n",["51/17"],[["im182","purple"],["im169","pink"],["im183","brown"]]],
//["1446n",["f"],"n",["50/17"],[["im095","red"],["im166","brown"]]],
//["1502n",["h"],"y",["51/19"],[["sn112","green"],["sn109","brown"],["sn108","blue"],["sn111","gray"],["sn110","red"]]],
//["1503n",["h"],"y",["50/19"],[["sn106","green"],["sn103","blue"],["sn105","brown"],["sn102","orange"],["sn104","purple"]]],
//["1523n",["f"],"n",["51/16"],[["pl015","black"],["pl068","red"]]],
//["1525n",["f"],"n",["50/16"],[["pl063","pink"],["pl015","black"]]],
//["1527n",["f"],"n",["52/17"],[["pl060","brown"],["pl061","blue"],["pl015","black"]]],
//["1549n",["m"],"n",["52/18"],[["mm112","brown"],["gb102","gray"],["ng100","black"]]],
//["1550n",["f"],"n",["50/17"],[["mp115","burg"],["pv114","green"],["nw113","black"]]],
//["1551n",["f"],"n",["50/17"],[["pp117","burg"],["mm116","brown"],["fr106","pink"]]],
//["1552n",["f"],"y",["52/17"],[["im063","red"],["dg002","brown"],["im094","green"],["im120","red"],["im182","burg"],["sn101","black"]]],
//["1553n",["m"],"y",["52/18"],[["dg001","gray"],["im085","black"],["im189","blue"],["im185","brown"],["sn095","black"],["im188","brown"]]],
//["1554n",["f","m","r"],"n",["51/19"],[["sn153","black"],["sn145","brown"],["sn155","gray"]]],
//["1557n",["f","r"],"y",["52/18"],[["sn136","pink"],["sn133","burg"],["sn134","brown"]]],
//["1635n",["f","m"],"n",["52/18"],[["im196","blue"],["im195","brown"],["im194","gray"]]],
//["1636n",["f"],"n",["52/17"],[["im201","brown"],["im200","blue"],["im199","black"]]],
//["1637n",["f","m"],"n",["52/17"],[["im202","burg"],["im203","gray"],["im204","brown"]]],
//["1448n",["m","f"],"y",["51/18"],[["im166","brown"],["sn080","purple"],["sn083","orange"]]],
//["1449n",["m","f"],"y",["51/19"],[["sn086","gray"],["sn094","brown"],["sn014","orange"],["sn098","black"]]],
//["1452n",["m"],"n",["52/19"],[["sn086","gray"],["sn096","brown"],["gb001","blue"]]],
//["1493n",["f"],"n",["50/18"],[["im065","orange"],["sn099","brown"]]],
//["1494n",["f"],"n",["50/17"],[["im169","pink"],["im105","lilac"],["sn084","burg"]]],
//["1346n",["f"],"n",["50/17"],[["im166","burg"],["im120","pink"],["im094","purple"],["im065","orange"]]],
//["1347n",["f"],"n",["50/17"],[["im053","gray"],["im167","brown"],["im105","purple"]]],
//["1348n",["m"],"n",["51/18"],[["im087","blue"],["im082","brown"],["im070","black"]]],
//["1349n",["m"],"n",["51/18"],[["im083","gray"],["im172","brown"]]],
//["1396n",["f"],"n",["49/17"],[["sn080","burg"],["sn082","purple"],["sn101","black"]]],
//["1399n",["m"],"n",["50/18"],[["sn086","gray"],["sn096","brown"]]]

    BuildCarousel();
    if (urlModel() == "") {

        first = Brand.firstModelColourInCarousel();

        BuildModelSelect(first.model);

        BuildColourSelector(first.colour);
    }
    else {

        BuildModelSelect(urlModel());

        BuildColourSelector(urlColour());
    }
    BuildMainImage();

}

function hellokittypos() {

    $("#content").append('<div id="countercard">Counter Card</div>');$("#countercard").append('<img src="images/hello kitty/marketing/ccard1.jpg"></img>');
    $("#content").append('<div id="case">Case</div>'); $("#case").append('<img src="images/hello kitty/marketing/hkcase.jpg"> </img>');$("#case").append('<img src="images/hello kitty/marketing/hkkcase.jpg"></img>');
    $("#content").append('<div id="counterstand">Counter Stand</div>'); $("#counterstand").append('<img src="images/hello kitty/marketing/stand1.jpg"></img>');
    $("#content").append('<div id="windowsticker">Window Sticker</div>'); $("#windowsticker").append('<img src="images/hello kitty/marketing/windowsticker.jpg"></img>');
}

function contactus() {

    $("#content").append('<p class="contact" id="wholesalewarning">Being a wholesaler we are unable to supply the public</p>');
    $("#content").append('<p class="contact" id="phone">Phone: 61 02 98764212</p>');
    $("#content").append('<p class="contact" id="fax">Fax : 61 02 98766928</p>');
    $("#content").append('<p class="contact" id="email">email : <a id="emaillink" href="mailto:admin@figtreeoptical.com.au">admin@figtreeoptical.com.au</a></p>');
    //$("#content").append('<p class="contact"><a href="test.php">x</a></p>'); 
}