/**
 * @ngdoc overview
 * @name domainManagerApp
 * @description
 * # domainManagerApp
 *
 * Main module of the application.
 */
angular
  .module('goApp', [
    'ui.router',
    'ngAnimate',
    'ngCookies',
    'ngResource',
    'ngSanitize',
    'ngTouch',
    'famous.angular',
    'ngFx',
    'youtube-embed',
    'goApp.data',
    'goApp.index',
    'goApp.background',
    'goApp.navigation',
    'goApp.slideshow',
    'goApp.page',
    'goApp.video',
    'goApp.slider',
    'goApp.contact',
    'mandrill',
    'analytics.mixpanel'
  ])

  .config(['$stateProvider', '$urlRouterProvider', '$httpProvider', function($stateProvider, $urlRouterProvider, $httpProvider) {

    // Configs
    //Enable cross domain calls
    $httpProvider.defaults.useXDomain = true;
    //Remove the header used to identify ajax call  that would prevent CORS from working
    delete $httpProvider.defaults.headers.common['X-Requested-With'];

    // UI router
    $stateProvider
    .state('/', {
      url: "/",
      templateUrl: 'views/index.html',
      controller: 'IndexController'
    })
    .state('slideshow', {
      url: "/slideshow/:slideshow",
      templateUrl: "views/slideshow.html",
      controller: 'SlideshowController'
    })
    .state('resenhas', {
      url: "/resenhas/:slideshow",
      templateUrl: "views/resenha.html",
      controller: 'SlideshowController'
    })
    .state('movie', {
      url: "/filmes/:filme",
      templateUrl: "views/video.html",
      controller: 'VideoController'
    })
    .state('text', {
      url: "/textos/:texto",
      templateUrl: "views/page.html",
      controller: 'PageController'
    })
    .state('contato', {
      url: "/contato",
      templateUrl: "views/contact.html",
      controller: 'ContactController'
    })
    .state('creditos', {
      url: "/creditos",
      templateUrl: "views/page.html",
      controller: 'PageController'
    })
    .state('curriculum', {
      url: "/curriculum",
      templateUrl: "views/page.html",
      controller: 'PageController'
    })
    .state('mailling-list', {
      url: "/mailling-list",
      templateUrl: "views/page.html",
      controller: 'PageController'
    });

  }]);