(function() {
    'use strict';

    dashboard.videoService.mockData = dashboard.videoService.mockData || {};

    dashboard.videoService.mockData.searches = [{
        keywords: 'jQuery conference',
        data: {
            "items": [{
                "id": { "videoId": "u-_lZ2G82Rk" },
                "snippet": {
                    "title": "Konferencja jQuery Conference SF 2012: szybszy kod jQuery dzięki kategoriom - John Bender",
                    "thumbnails": {
                        "default": { "url": "https://i.ytimg.com/vi/u-_lZ2G82Rk/default.jpg" },
                        "medium": { "url": "https://i.ytimg.com/vi/u-_lZ2G82Rk/mqdefault.jpg" },
                        "high": { "url": "https://i.ytimg.com/vi/u-_lZ2G82Rk/hqdefault.jpg" }
                    }
                }
            }, {
                "id": { "videoId": "juRtEEsHI9E" },
                "snippet": {
                    "title": "Konferencja jQuery Conference SF 2012: obiecuję pokazać, kiedy używać obiektów Deferred - Alex McPherson",
                    "thumbnails": {
                        "default": { "url": "https://i.ytimg.com/vi/juRtEEsHI9E/default.jpg" },
                        "medium": { "url": "https://i.ytimg.com/vi/juRtEEsHI9E/mqdefault.jpg" },
                        "high": { "url": "https://i.ytimg.com/vi/juRtEEsHI9E/hqdefault.jpg" }
                    }
                }
            }, {
                "id": { "videoId": "JcHJtBAnGpE" },
                "snippet": {
                    "title": "Myśli przewodnie dotyczące bibliotek jQuery Mobile i jQuery UI - Konferencja jQuery Conference Portland 2013",
                    "thumbnails": {
                        "default": { "url": "https://i.ytimg.com/vi/JcHJtBAnGpE/default.jpg" },
                        "medium": { "url": "https://i.ytimg.com/vi/JcHJtBAnGpE/mqdefault.jpg" },
                        "high": { "url": "https://i.ytimg.com/vi/JcHJtBAnGpE/hqdefault.jpg" }
                    }
                }
            }, {
                "id": { "videoId": "cd7HHN6IkrU" },
                "snippet": {
                    "title": "Konferencja jQuery Conference 2013 SF: więcej niż model DOM: rozsądna struktura dla aplikacji JavaScript - Rebecca Murphey",
                    "thumbnails": {
                        "default": { "url": "https://i.ytimg.com/vi/cd7HHN6IkrU/default.jpg" },
                        "medium": { "url": "https://i.ytimg.com/vi/cd7HHN6IkrU/mqdefault.jpg" },
                        "high": { "url": "https://i.ytimg.com/vi/cd7HHN6IkrU/hqdefault.jpg" }
                    }
                }
            }]
        }
    }, {
        keywords: 'css conference',
        data: {
            "items": [{
                "id": { "videoId": "kTEGsFJDnC8" },
                "snippet": {
                    "title": "Zoe Mickley Gillenwater: CSS - wnioski",
                    "thumbnails": {
                        "default": { "url": "https://i.ytimg.com/vi/kTEGsFJDnC8/default.jpg" },
                        "medium": { "url": "https://i.ytimg.com/vi/kTEGsFJDnC8/mqdefault.jpg" },
                        "high": { "url": "https://i.ytimg.com/vi/kTEGsFJDnC8/hqdefault.jpg" }
                    }
                }
            }, {
                "id": { "videoId": "FYcu-wWrNqo" },
                "snippet": {
                    "title": "Kushagra Gour: 10 przykazań efektywnej architektury CSS - CSSConf.Asia 2014",
                    "thumbnails": {
                        "default": { "url": "https://i.ytimg.com/vi/FYcu-wWrNqo/default.jpg" },
                        "medium": { "url": "https://i.ytimg.com/vi/FYcu-wWrNqo/mqdefault.jpg" },
                        "high": { "url": "https://i.ytimg.com/vi/FYcu-wWrNqo/hqdefault.jpg" }
                    }
                }
            }, {
                "id": { "videoId": "3ikye7Qc7Ak" },
                "snippet": {
                    "title": "Lea Verou, \"Więcej tajemnic CSS: kolejnych 10 rzeczy, których możesz nie wiedzieć o CSS\" - Konferencja W3Conf 2013",
                    "thumbnails": {
                        "default": { "url": "https://i.ytimg.com/vi/3ikye7Qc7Ak/default.jpg" },
                        "medium": { "url": "https://i.ytimg.com/vi/3ikye7Qc7Ak/mqdefault.jpg" },
                        "high": { "url": "https://i.ytimg.com/vi/3ikye7Qc7Ak/hqdefault.jpg" }
                    }
                }
            }, {
                "id": { "videoId": "TjsXqt-UxLo" },
                "snippet": {
                    "title": "Projektowanie dynamiczne z wykorzystaniem CSS - Val Head",
                    "thumbnails": {
                        "default": { "url": "https://i.ytimg.com/vi/TjsXqt-UxLo/default.jpg" },
                        "medium": { "url": "https://i.ytimg.com/vi/TjsXqt-UxLo/mqdefault.jpg" },
                        "high": { "url": "https://i.ytimg.com/vi/TjsXqt-UxLo/hqdefault.jpg" }
                    }
                }
            }]
        }
    }, {
        keywords: 'js conference',
        data: {
            "items": [{
                "id": { "videoId": "z5e7kWSHWTg" },
                "snippet": {
                    "title": "Konferencja React.js Conf 2015 - Szum!",
                    "thumbnails": {
                        "default": { "url": "https://i.ytimg.com/vi/z5e7kWSHWTg/default.jpg" },
                        "medium": { "url": "https://i.ytimg.com/vi/z5e7kWSHWTg/mqdefault.jpg" },
                        "high": { "url": "https://i.ytimg.com/vi/z5e7kWSHWTg/hqdefault.jpg" }
                    }
                }
            }, {
                "id": { "videoId": "8aGhZQkoFbQ" },
                "snippet": {
                    "title": "Philip Roberts: Czym u licha jest pętla zdarzeń? | Konferencja JSConf EU 2014",
                    "thumbnails": {
                        "default": { "url": "https://i.ytimg.com/vi/8aGhZQkoFbQ/default.jpg" },
                        "medium": { "url": "https://i.ytimg.com/vi/8aGhZQkoFbQ/mqdefault.jpg" },
                        "high": { "url": "https://i.ytimg.com/vi/8aGhZQkoFbQ/hqdefault.jpg" }
                    }
                }
            }, {
                "id": { "videoId": "2ii1lEkIv1s" },
                "snippet": {
                    "title": "Konferencja React.js Conf 2015 - Skalowalna wizualizacja danych",
                    "thumbnails": {
                        "default": { "url": "https://i.ytimg.com/vi/2ii1lEkIv1s/default.jpg" },
                        "medium": { "url": "https://i.ytimg.com/vi/2ii1lEkIv1s/mqdefault.jpg" },
                        "high": { "url": "https://i.ytimg.com/vi/2ii1lEkIv1s/hqdefault.jpg" }
                    }
                }
            }, {
                "id": { "videoId": "bvDtEcQdGs0" },
                "snippet": {
                    "title": "Środowisko Node.js w skali - Erik Toth",
                    "thumbnails": {
                        "default": { "url": "https://i.ytimg.com/vi/bvDtEcQdGs0/default.jpg" },
                        "medium": { "url": "https://i.ytimg.com/vi/bvDtEcQdGs0/mqdefault.jpg" },
                        "high": { "url": "https://i.ytimg.com/vi/bvDtEcQdGs0/hqdefault.jpg" }
                    }
                }
            }]
        }
    }, {
        keywords: 'packt jquery',
        data: {
            "items": [{
                "id": { "videoId": "UdQbBq3APAQ" },
                "snippet": {
                    "title": "Kurs projektowania przy użyciu biblioteki jQuery UI: widżet Tooltip biblioteki jQuery UI | packtpub.com",
                    "thumbnails": {
                        "default": { "url": "https://i.ytimg.com/vi/UdQbBq3APAQ/default.jpg" },
                        "medium": { "url": "https://i.ytimg.com/vi/UdQbBq3APAQ/mqdefault.jpg" },
                        "high": { "url": "https://i.ytimg.com/vi/UdQbBq3APAQ/hqdefault.jpg" }
                    }
                }
            }, {
                "id": { "videoId": "KcnUdTmBuD4" },
                "snippet": {
                    "title": "Kurs projektowania przy użyciu biblioteki jQuery UI: metoda slider biblioteki jQuery UI | packtpub.com",
                    "thumbnails": {
                        "default": { "url": "https://i.ytimg.com/vi/KcnUdTmBuD4/default.jpg" },
                        "medium": { "url": "https://i.ytimg.com/vi/KcnUdTmBuD4/mqdefault.jpg" },
                        "high": { "url": "https://i.ytimg.com/vi/KcnUdTmBuD4/hqdefault.jpg" }
                    }
                }
            }, {
                "id": { "videoId": "_cXWBM4vEN0" },
                "snippet": {
                    "title": "Poznawanie biblioteki Highcharts: krótkie wprowadzenie do biblioteki jQuery Mobile | packtpub.com",
                    "thumbnails": {
                        "default": { "url": "https://i.ytimg.com/vi/_cXWBM4vEN0/default.jpg" },
                        "medium": { "url": "https://i.ytimg.com/vi/_cXWBM4vEN0/mqdefault.jpg" },
                        "high": { "url": "https://i.ytimg.com/vi/_cXWBM4vEN0/hqdefault.jpg" }
                    }
                }
            }, {
                "id": { "videoId": "PFyFq0mBIlA" },
                "snippet": {
                    "title": "Kurs projektowania przy użyciu biblioteki jQuery UI: metoda spinner biblioteki jQuery UI | packtpub.com",
                    "thumbnails": {
                        "default": { "url": "https://i.ytimg.com/vi/PFyFq0mBIlA/default.jpg" },
                        "medium": { "url": "https://i.ytimg.com/vi/PFyFq0mBIlA/mqdefault.jpg" },
                        "high": { "url": "https://i.ytimg.com/vi/PFyFq0mBIlA/hqdefault.jpg" }
                    }
                }
            }]
        }
    }];

    var allVideos = [];
    var searches = dashboard.videoService.mockData.searches;
    for (var i = 0; i < searches.length; i++) {
        allVideos = allVideos.concat(searches[i].data.items);
    }

    dashboard.videoService.mockData.allVideos = allVideos;

})();
