$(document).ready(function(){
	var script    = "<script type='text/javascript' src='https://apis.google.com/js/plusone.js'>{lang: 'es-CL'}"+"<"+"/"+"script"+">";
			 $("head").append(script);

		   // new scrollWindow({target:$('#carrousel'), autoPlay:true, autopause:false, mode:'bounce', speed:900, size:'wide', tooltips:true});

		    $(".arrow").hover(function() { 
              $(this).addClass("arrowHover"); 
              }, function() { 
               $(this).removeClass("arrowHover"); 
            });

			$('#trigger').click(function(){
			$('#ventana').load("formulario.html");	

			});

			jQuery("#mycarousel2").jcarousel({
				scroll: 1,
				animation:'slow',				
				size: 3,
				start:1			
				});
			
				
			jQuery('#player').flash({
				src: '/content-store/es_AR/Zero/media/player.swf', height: 240, width: 300, allowfullscreen: 'true',
				flashvars:{
				file:'/content-store/es_AR/Zero/videos/comercial.flv',
				imageFilename:'/content-store/es_AR/Zero/img-tmp/video_preview.jpg'
			  }
			  });
			  
			 jQuery('#flash6').flash({
			  src: '/content-store/es_AR/Zero/media/player.swf', 
			  height: 280, 
			  width: 370, 
			  allowfullscreen: 'true',
			  flashvars:{
			   file:'/content-store/es_AR/Zero/videos/trailer2.flv'
			  }	
			});
			
			jQuery('#sinlimite').flash({
				src: '/content-store/es_AR/Zero/960x300.swf',
				width: 958,
				height: 298,				
				wmode:'transparent'
				}); 
				
			jQuery('#wallpapers').flash({
				src: '/content-store/es_AR/Zero/banner_wallpaper/wallpaper.swf',
				width: 300,
				height: 240,				
				wmode:'transparent'
				}); 
				
			jQuery('#comercial').flash({
				src: '/content-store/es_AR/Zero/banner_video/video.swf', 
				height: 240, 
				width: 300, 
				wmode:'opaque',
				allowfullscreen: 'true',
				flashvars: {file: '/content-store/es_AR/Zero/banner_video/video.flv'}	
			});
 
			jQuery('#musica').flash({
				src: '/content-store/es_AR/Zero/Mp3Player.swf',
				width: 300,
				height: 240,				
				wmode:'transparent'
				}); 


		    $('body').addClass('coca-zero');

			/* $("a[rel]").overlay({mask:'#fff'});

			$("div[rel]").overlay({mask:'#fff'}); */

			$('.socialicons').load('header.html');
            
			$('.logo-principal').wrap('<a href="#" />');
			
			new stickyFooter().draw();
			$(".googleBtn").html("<div class='g-plusone' data-size='standard' data-count='true'></div>");
			var otrasmarcas = new menu({datafile:'menu-otras-marcas.json',cssClass:'menu-otras-marcas', triggerElement:'#menu-otras-marcas', triggerClass:'menubutton otras-marcas', triggerText:'Otras Marcas', closerClass:'menubutton closer'});
			otrasmarcas.draw();
			otrasmarcas.addItem({cssClass:'coca-zero-menu coca-zero-otras-marcas a', url: 'http://www.coca-colazero.cl/es/index.html?<@wt_mm />'});
			otrasmarcas.addItem({cssClass:'coca-red-menu coca-red-otras-marcas a', url: '#'});
			otrasmarcas.addItem({cssClass:'coca-red-otras-marcas b','text':'Coca-Cola FM', url: 'http://la.coca-cola.fm/?<@wt_mm />'});
			otrasmarcas.addItem({cssClass:'coca-red-otras-marcas b','text':'Navidad', url: 'http://xmas.coke.com/v/es_CL/?<@wt_mm />'});
			otrasmarcas.addItem({cssClass:'coca-red-otras-marcas b','text':'Plant Bottle', url: 'http://www.coca-cola.cl/es/plantbottle/?<@wt_mm />'});
			otrasmarcas.addItem({cssClass:'coca-light-menu coca-light-otras-marcas a', url: 'http://www.coca-colalight.cl/es/index.html?<@wt_mm />'});
			otrasmarcas.addItem({cssClass:'coca-light-otras-marcas b','text':'Coca-Cola Light', url: 'http://www.coca-colalight.cl/es/index.html?<@wt_mm />'});
			otrasmarcas.addItem({cssClass:'coca-company-menu coca-company-otras-marcas a', url: 'http://www.thecoca-colacompany.com/'});
			otrasmarcas.addItem({cssClass:'coca-company-otras-marcas b',text:'Instituto de Bebidas', url: 'http://www.beverageinstitute.org/es/index.shtml'});
			otrasmarcas.addItem({cssClass:'coca-company-otras-marcas b',text:'Viviendo Positivamente', url: 'http://www.viviendopositivamente.cl/?<@wt_mm />'});

			var otrospaises = new menu({cssClass:'menu-otros-paises',triggerElement:'#menu-otros-paises', triggerClass:'menubutton otros-paises', triggerText:'Otros pa&iacute;ses', closerClass:'menubutton closer'});
			otrospaises.draw();
			otrospaises.addItem({cssClass:'item', text:'Argentina', url: 'http://www.coca-cola.com.ar/?WT.pi=Change%20Market'});
			otrospaises.addItem({cssClass:'item', text:'Bolivia', url: 'http://www.coca-cola.com.bo/?WT.pi=Change%20Market'});
			otrospaises.addItem({cssClass:'item', text:'Chile', url: 'http://www.coca-cola.cl/?WT.pi=Change%20Market'});
			otrospaises.addItem({cssClass:'item', text:'Paraguay', url: 'http://www.coca-cola.com.py/?WT.pi=Change%20Market'});
			otrospaises.addItem({cssClass:'item', text:'Per&uacute;', url: 'http://www.coca-cola.com.pe/?WT.pi=Change%20Market'});
			otrospaises.addItem({cssClass:'item', text:'Uruguay', url: 'http://www.coca-cola.com.uy/?WT.pi=Change%20Market'});
			otrospaises.addItem({cssClass:'item', text:'Otros Pa&iacute;ses', url: 'http://www.coca-cola.com/index.jsp?cookie=false&WT.pi=Change%20Market'});	
			
		});

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-18328637-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript';
ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' :
'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
  })();

  function sendClickTag(params) {
    _gaq.push(params);
  }

  function gup( name ){
    name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
    var regexS = "[\\?&]"+name+"=([^&#]*)";
    var regex = new RegExp( regexS );
    var results = regex.exec( window.location.href );
    if( results == null ){
      return "";
    } else {
      return results[1];
    }
  }
