function nnEventTrack(_nnClickURL) {
	var _nnCI = "es-antena3tv";
	var _nnCG = "0";
	var _nnCC = "uk"; 
	var _nnLP = location.protocol.indexOf('https')>-1?'https:':'http:';
	var _nnRP = escape(window.location);
	var _nnND = _nnLP + '//secure-' + _nnCC + '.imrworldwide.com/';
	var _nnPixel = new Image(1,1);
	var _nnParams = "rnd=" + (new Date()).getTime() + "&ci=" + _nnCI + "&cg=" + _nnCG;
	_nnParams += "&si=" + escape(_nnClickURL) + "&rp=" + _nnRP;	
	_nnPixel.src = _nnND + "cgi-bin/m?" + _nnParams;
}


function oceroInit() {
	/* tabs
	----------------------------------------------------------------------------------------------------*/
	if ($(".fn_tabs").length > 0)tabs();
	/* dots
	----------------------------------------------------------------------------------------------------*/
	fn_dots();
	//tabsPuntos();

	/* mod superdestacado_multi
	----------------------------------------------------------------------------------------------------*/
	$('.mod_superdestacado_multi').highlighter({autoplay : true, delay : 7000});

	/* mod encuesta
	----------------------------------------------------------------------------------------------------*/
	if ($(".mod_encuesta").length > 0)scale();

	/* ie
	----------------------------------------------------------------------------------------------------*/
	if ($.browser.msie && $.browser.version == 7)hacksIE7();
	if ($.browser.msie && $.browser.version == 8)hacksIE8();
	
	/* mod buscador
	----------------------------------------------------------------------------------------------------*/
	if (($(".mod_buscador").length > 0))mod_buscador();

	/* mod galeria imagenes
	----------------------------------------------------------------------------------------------------*/
	if ($(".mod_galeria_imagenes").length > 0)mod_galeria_imagenes();

	/* mod galeria videos
	----------------------------------------------------------------------------------------------------*/
	if ($(".mod_galeria_videos").length > 0)mod_galeria_videos();
	
	/* mod_concursos_trivial
	----------------------------------------------------------------------------------------------------*/
	if ($(".mod_concursos_trivial").length > 0)mod_concursos_trivial('.mod_concursos_trivial');

	/* carruseles
	----------------------------------------------------------------------------------------------------*/
	if ($(".grid_12 > .mod_carrusel").length > 0){$(".grid_12 > .mod_carrusel .visor").scrollable({ size: 6, items: '.grid_12 > .mod_carrusel .visor ul li', loop:true, clickable: false})};
	if ($(".grid_8 > .mod_carrusel").length > 0){$(".grid_8 > .mod_carrusel .visor").scrollable({ size: 4, items: '.grid_8 > .mod_carrusel .visor ul li', loop:true, clickable: false})};
	if ($(".mod_carrusel_cabecera").length > 0)mod_carrusel_cabecera();
	
	if ($(".grid_12 > .mod_prog_completos").length > 0){$(".grid_12 > .mod_prog_completos .visor").scrollable({ size: 4, items: '.grid_12 > mod_prog_completos .visor ul li', loop:true, clickable: false})};
	if ($(".grid_8 > .mod_prog_completos").length > 0){$(".grid_8 > .mod_prog_completos .visor").scrollable({ size: 3, items: '.grid_8 > mod_prog_completos .visor ul li', loop:true, clickable: false})};
	
	/* carruseles
	----------------------------------------------------------------------------------------------------*/
	if ($(".mod_frecs").length > 0)frecs();
	if ($(".mod_frecs").length > 0)map2();

	/* mod_audios_collection
	----------------------------------------------------------------------------------------------------*/
	if ($(".grid_8 .mod_audios_collection").length > 0)mod_audios_collection();

	/* modal
	----------------------------------------------------------------------------------------------------*/
	if ($("a.modal").length > 0)modal_2();

	/* btn_podcast
	----------------------------------------------------------------------------------------------------*/
	if ($(".fn_btn_podcast").length > 0)btn_podcast();

	/* mod_podcast
	----------------------------------------------------------------------------------------------------*/
	if ($(".mod_podcast").length > 0)mod_podcast();

	/* input
	----------------------------------------------------------------------------------------------------*/
	if ($('input[type="file"]').length > 0)$('input[type="file"]').customFileInput();

	/* mod_tu_clip
	----------------------------------------------------------------------------------------------------*/
	if ($(".mod_tu_clip").length > 0)mod_tu_clip();

	/* mod_galeria_noticias_carrusel
	----------------------------------------------------------------------------------------------------*/
	if ($(".mod_galeria_noticias_carrusel").length > 0)mod_galeria_noticias_carrusel();

	/* mod_locales
	----------------------------------------------------------------------------------------------------*/
	if ($(".mod_locales").length > 0)mod_locales();

	/* p vacios
	----------------------------------------------------------------------------------------------------*/
	if ($('p:empty').length > 0)$('p:empty').hide();

	/* mod_programacion
	----------------------------------------------------------------------------------------------------*/
	if ($('.mod_programacion').length > 0)mod_programacion();
	
	/* mod calendar
	----------------------------------------------------------------------------------------------------*/
	if (($("#calendarRadioShow").length > 0))mod_calendar();
	
	/* mod calendar
	----------------------------------------------------------------------------------------------------*/
	if (($("#mod_calendar_bulletin").length > 0))mod_calendar_bulletin();

	/* mod player html
	----------------------------------------------------------------------------------------------------*/
	if (($(".mod_player_html").length > 0))mod_player_html();
	  /**********************ONLINE GALERY**/
	   $(' .mod_audios_collection li ').bind('click', function(){
		   var galleryaudio=$('input[name=gallery]', this).attr('value');
		   var player_swf=$('input[name=playerswf]', this).attr('value');
		 // alert($('input[name=urlaudio]', this).attr('value'));
		  logBug($('input[name=urlaudio]', this).attr('value'));
		  logBug(player_swf);
		//   var playeronline=document.getElementById('online_galery');
		   eval(player_swf+".variables.xml=$('input[name=urlaudio]', this).attr('value');");
		   eval(player_swf+".variables.autoplay='true';");	 
			 document.getElementById(galleryaudio).style.width=$('input[name=playerWidth]', this).attr('value') +"px";
			 document.getElementById(galleryaudio).style.height=$('input[name=playerHeight]', this).attr('value')+"px";
			 document.getElementById(galleryaudio).innerHTML ="";
		   eval(player_swf+".write('"+galleryaudio+"')");
			//$('.contenido .info span').html($('input[name=footer]', this).attr('value'));
			//$('.contenido .info strong').html($('input[name=name]', this).attr('value'));
		   //playeronline.setXML($('input[name=urlvideo]', this).attr('value'));		   
	     })

	/* ocero_modal
	----------------------------------------------------------------------------------------------------*/
	if (($(".ocero_modal").length > 0))ocero_modal();
	if ($(".modal_no_html").length > 0)modal_no_html();

} //oceroInit_end


/*	tabs
	----------------------------------------------------------------------------------------------------*/
	function tabs() {
		$('.fn_tabs li a').click(function() {
			$(this).parent().parent().parent().find('.fn_tabsLay').hide();
			$(this).parent().parent().find('.active').removeClass('active');
			$(this).addClass('active');
			
			i = $(this).attr('href');
			$(i).show();
			tabsPuntos()
			return false;
		});
	};
	function tabsPuntos() {
		$('.fn_puntos li a').each (function () {
				j = $(this).text();
				i = $(this).text().split(' ');
				ultimaPalabra = (i.length) -1;
			if (! $(this).hasClass('active')){
				$(this).text('... ' + i[ultimaPalabra])
			}else{
				$(this).text('lo mas ' + i[ultimaPalabra])
			}
		});
	}

/*	hacks ie
	----------------------------------------------------------------------------------------------------*/
	function hacksIE7() {
		$('.audios_list > li:last-child').addClass('last')
	};
	function hacksIE8() {
	};

	/* dots
	----------------------------------------------------------------------------------------------------*/
	function fn_dots() {
		$('.fn_dots').each (function () {
			j = $(this).text();
			i = j.length;
			maxChars = 45;
			visibles = j.substr(0, maxChars)
			$(this).text(visibles + ' [...]')
		});
	};


/*	mod_encuesta
	----------------------------------------------------------------------------------------------------*/

	function scale() {
		$('.mod_encuesta .bars li').each (function () {
			var percent = $(this).find('.right').text();
			$(this).find('.scale .orange').css('width',percent)
		})
	};

/*	mod_superdestacado_multi
	----------------------------------------------------------------------------------------------------*/
	(function($) {
		$.fn.highlighter = function(options) {
			var opts = $.extend({}, $.fn.highlighter.defaults, options);
			$.fn.highlighter.options = opts;
		
			// iterate and reformat each matched element
			return this.each(function() {
				var target = $(this);
				opts.target = target;
				var list_items = $(opts.list_items+' a', target);
				var viewport = $(opts.viewport, target);
				var banners = $(opts.full_items, opts.viewport);

				var other_banners = banners.not(':first');
				/*other_banners.hide();*/
				$('.info',other_banners).css('right', '-330px');
				$(list_items[0]).parent().addClass('active');
			  
				list_items.bind('click', function(e, target){
					e.preventDefault();
					//reset setInterval if user click on tab
					if (typeof(target) == 'undefined' ) {
						window.clearInterval(opts.autoplay_timer);
					}
				  
					if($(this).closest('li').is('.active') !== true){
						var new_banner = $(banners[list_items.index(this)]);

						list_items.parent().removeClass('active');
						$(this).parent().addClass('active');
						$(this).parent().focus().blur();
						
						if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1 || navigator.userAgent.toLowerCase().indexOf('safari') > -1) {
							$('.info', banners.not(':hidden')).animate({right: '-330px'},'slow');
							banners.has(':visible').fadeOut('normal');
							new_banner.fadeIn('normal');
							$('.info', new_banner).animate({right: '0px'},'slow');
						}else{
							$('.info', banners.not(':hidden')).animate({right: '-330px'},'slow');
							banners.has(':visible').fadeOut('normal', function(){
								new_banner.fadeIn('normal',function(){
									$('.info', new_banner).animate({right: '0px'},'slow');
								});
							});
						}
						
					}
				})
				.bind('mouseover', function(){
					window.clearInterval(opts.autoplay_timer);
				})
				.bind('mouseout', function(){
					opts.autoplay_handler();
				})
		  
				if (opts.autoplay === true){
					opts.autoplay_handler = function(){
						opts.autoplay_timer =  window.setInterval(function(){
							var next = $('a', $(opts.list_items+'.active', opts.target).next());
							if(next.length > 0){
								next.trigger('click', true);
							}else{
								$('a', $(opts.list_items+':first', opts.target)).trigger('click', true);
							}
						}, opts.delay);
					}
					opts.autoplay_handler();
				}
			});
		};

		// plugin defaults
		$.fn.highlighter.defaults = {viewport: ".visor", list_items: 'ul li', full_items: '> div', delay: 1000 , autoplay : false };
	})(jQuery);

	
/*	mod_buscador
	----------------------------------------------------------------------------------------------------*/
	function mod_buscador() {
		
	$("form[id^='gs']").submit(function(event){
		event.preventDefault();
		submitQuery(event.target);
	});
	$('.date-pick').datePicker({disabled:true,startDate: '31/12/2000'});
	$('.turn-me-into-datepicker').datePicker({inline:true,dateFormat:'ddMMyy'}).bind(
		'dateSelected',
		function(e, selectedDate, $td){
			var fecha=new Date(selectedDate);
			var fecha_YYYY=fecha.getFullYear();
			var fecha_MM=(fecha.getMonth()+1);
			if (fecha_MM < 10){ 
				fecha_MM="0"+fecha_MM; 
			}
			var fecha_DD=fecha.getDate();
			if (fecha_DD < 10){ 
				fecha_DD="0"+fecha_DD; 
			}
			var miFechaPedida=fecha_DD+""+fecha_MM+""+fecha_YYYY; 
			$("form :input").val("");
			$("#date1").val(miFechaPedida);
			$("#date2").val(miFechaPedida);
			$("form#gsres").find("#termino").val("antena3.com");
			$("form#gsres").submit();
		}
	);
};

/*	mod_concursos_trivial
----------------------------------------------------------------------------------------------------*/
	function mod_concursos_trivial(target) {
		pregunta_total = $(target).find('.pregunta').length
		contador_total = $(target).find('.numero_pregunta .total')
		participado = true					// condicion si has participado ya
		if (participado == true){
			$('.fn_participa').bind('click', function(){
	//			var login_conectado = testSessionOnClient();
				href = $(this).attr('href')		// url de login
				cl = 'mod_concursos_trivial_login';
				lay_current = $(this).parent().parent().parent()
				lay_next = lay_current.next()
				//if ($('.mod_concursos_trivial form #logado').val() == 'false'){
				$.ajax({	
					async: false,
					cache: false,
					  type: "GET",
					  dataType: "jsonp", 
					  
					   url: "" + restDomain + "getCookies.action", 		   
					   success: function(data) {			   
						   var galletas = data.respuesta;	
						   conectado = getCookie_('zona3_user_login', galletas);
						   if (conectado == null){
								abre_popup();
								return false;
							} else {
								pasa_pantalla();
								numero_pregunta();
								return false;
							}
					   	}
					   });//jsonp
				
			})
		} else {
			$(target).find('.fn_participa').hide()
			$(target).find('.intro .red').show()
		}
		
		$('.fn_pregunta').bind('click', function(){
			lay_current = $(this).parent().parent().parent()
			lay_next = lay_current.next()
			checked = $(this).parent().parent().parent().find("input:checked").length
			if (checked > 0){
				pasa_pantalla();
			} else {
				alert('Selecciona una opcion')
			}
			numero_pregunta();
		})
		$('.pregunta:last-child .fn_pregunta').bind('click', function(){
			lay_current = $(this).parent().parent().parent().parent().parent().parent()
			lay_next = lay_current.next()
			checked = $(this).parent().parent().parent().find("input:checked").length
			if (checked > 0){
				pasa_pantalla();
			} else {
				alert('Selecciona una opcion')
			}
			numero_pregunta();
			$('#concurso').submit();
		})
		
		function conectado(data){
			
		}
		// mtds:
		function abre_popup() {
			$('<div class="modal_no_html green ' + cl + '"><div class="modal_no_html_lay"><a class="close"></a><iframe src="' + href + '"></iframe></div></div>').appendTo('body');						
			var overlay_2 = $('.modal_no_html');
			overlay_2.removeClass('efm_modal');
			modal_lay = $('.modal_no_html_lay');
			close_lay = overlay_2.find('.close');
			modal_lay.hide();
			setTimeout(function () {
				modal_lay.fadeIn(500)
			}, 200)
			overlaywidth = overlay_2.width();
			iframewidth = overlay_2.find('iframe').width();
			position_def = ((overlaywidth/2) + (iframewidth/2)) - 25
			cssObj = {
				'left' : position_def + 'px',
				'top' : '10px',
				'z-index' : modal_lay.css('z-index') + 100
			}
			close_lay.css(cssObj).click(function(e) {
				e.preventDefault();
				$(this).parent().parent().fadeOut()
			})
		}
		function pasa_pantalla() {
			lay_current.hide()
			lay_next.show()
		}
		function numero_pregunta() {
			$(contador_total).text(pregunta_total)
		}
	}
	function modal_no_html(){
		$('.modal_no_html').bind('click', function(e){
			e.preventDefault();
			target = $(this);
			rel = $(target).attr('rel');
			close = $(target).find('.close');
			window_width = $(window).width();
			contentWrap_width = $(rel).find('.contentWrap').width();
			position_def = (window_width - contentWrap_width)/2;
			$(rel).find('.contentWrap').css('left', position_def);
			$(rel).fadeIn('slow');
			console.log(window_width, contentWrap_width, position_def)
		})
		$('.modal_no_html_lay .close').bind('click', function(){
			$(this).parent().parent().parent().fadeOut('slow');
		})
	}

/*	mod galeria imagenes
    ----------------------------------------------------------------------------------------------------*/
	function mod_galeria_imagenes() {
		var total;
		if ($(".mod_galeria_imagenes").length > 0) {
		  var mod_galeria_img = $(".mod_galeria_imagenes .visor ").scrollable({
			size: 7, 
			items: '.mod_galeria_imagenes .visor ul li',
			loop:true,
			api: true,
			onReload: function(){
			  total = this.getItems().length;
			  var wrap = $(this.getRoot().closest('.mod_galeria_imagenes'));
			  $('.contador .total', wrap).html(total);
			  $('.contador .actual', wrap).html(1);
			  $('.carrusel .visor ul > li:first', wrap).addClass('now');
			  //set height for main photo wrapper first time
			  $('.principal', wrap).css('height', $('.principal .contenido', wrap).height() + 'px');
			}
		  });

		  //refresh counter with actual page
		  var refreshCounterImage = function(target){
			var actual = target.index()+1;
			if (actual==total) {
			  $('.principal .nextPage').addClass('disabled');
			}else{
			  $('.principal .nextPage').removeClass('disabled');
			}
			if (actual==1) {
			  $('.principal .prevPage').addClass('disabled');
			}else{
			  $('.principal .prevPage').removeClass('disabled');
			}
			var wrap = target.closest('.mod_galeria_imagenes');
			$('.contador .actual', wrap).html(actual);
			updateMainAreaImage(target, wrap, actual);
		  };

		  //set new content in the main area and sets height
		  var updateMainAreaImage = function(target, wrap, actual_index){
			var full_img = $('.principal .contenido img', wrap);
			var main_content = $('.principal .contenido', wrap);
			main_content.fadeOut(500, function(){
			  full_img.attr('src', $('img', target).attr('rel')).load(function(){
				var info = $('.info ', target);
				var actions = $('ul ', target);
				$('.principal .contenido .info ', wrap).html(info.html())
				$('.principal .contenido ul ', wrap).html(actions.html())

				$('.principal .contenido', wrap).fadeIn(function(){
				  $('.principal', wrap).stop().animate({height: $('.principal .contenido', wrap).height() + 'px' },400);
				});
			  });
			}) 
		  }
		  //update counter when slide moves
		  $('.mod_galeria_imagenes .visor li:not(.now)').live('click', function(e){
			  refreshCounterImage($(this));
			  $(this).siblings().removeClass('now');
			  $(this).addClass('now');
		  })

		  //seek to correspondent item when navigation arrows are clicked
		  $('.mod_galeria_imagenes .principal a.browse').bind('click', function(){
			if ($(this).hasClass('nextPage')) {
			  var target = parseInt(mod_galeria_img.getClickIndex())+1;
			  //nnEventTrack(pageUrlNielsenImagenes + '/galeriaimagenessiguiente');
			}else{
			  var target = parseInt(mod_galeria_img.getClickIndex())-1;
			  nnEventTrack(pageUrlNielsenImagenes +'/galeriaimagenesanterior');
			}
			var galeria_wrapImage = $(this).closest('.mod_galeria_imagenes');
			mod_galeria_img.click(target);
			$('.carrusel .visor ul > li:eq('+(target)+')', galeria_wrapImage).addClass('now').siblings().removeClass('now')
			refreshCounterImage($('.carrusel .active', galeria_wrapImage));
		  })
		};
	};

	  /* mod galeria videos
	----------------------------------------------------------------------------------------------------*/
	function mod_galeria_videos(){
	if ($(".mod_galeria_videos").length > 0) {
     var mod_galeria_videos = $(".mod_galeria_videos .visor").scrollable({
       size: 7, 
       items: '.visor ul li',
	   loop:true,
       api: true,
       onReload: function(){
         var total = this.getItems().length
         var wrap = $(this.getRoot().closest('.mod_galeria_videos'));
         $('.contador .total', wrap).html(total);
         $('.contador .actual', wrap).html(1);
         $('.carrusel .visor ul > li:first', wrap).addClass('now');
         //set height for main photo wrapper first time
         $('.principal', wrap).css('height', $('.principal .contenido', wrap).height()+'px');
       }
     });

     //refresh counter with actual page
     var refreshCounter = function(target){
       var actual = target.index()+1;
       var wrap = target.closest('.mod_galeria_videos');
       logBug("wrap="+wrap);
       logBug("actual="+$('.contador .actual', wrap));
       $('.contador .actual', wrap).html(actual);
       updateMainArea(target, wrap, actual);
     };

     //set new content in the main area and sets height
     var updateMainArea = function(target, wrap, actual_index){
     	var xml = $('img', target).attr('rel');
     	var player = $('input[name=gallery]', target).attr('value');
     	var contentPk = $('input[name=contentPk]', target).attr('value');
     	var pagePk = $('input[name=pagePk]', target).attr('value');
     	var section = $('input[name=section]', target).attr('value');
//     	logBug('player='+player);
//     	logBug('xml='+xml);
//     	logBug('player='+document.getElementById(player));
     	var player_swf='player_'+player;
     	
     	  eval(player_swf+".variables.xml='"+xml+"';");
		  //eval(player_swf+".variables.autoplay='true';");	 
			// document.getElementById(galleryaudio).style.width=$('input[name=playerWidth]', this).attr('value') +"px";
			//document.getElementById(galleryaudio).style.height=$('input[name=playerHeight]', this).attr('value')+"px";
			 document.getElementById('embed_'+player).innerHTML ="";
		   eval(player_swf+".write('"+'embed_'+player+"')");
     	
     	
     	
        //document.getElementById(player).setXML(xml);
     	var info = $('.info ', target);
     	logBug("info="+info);
     	
     	if($('.principal .contenido .info ', wrap).length>0){
     		// Columan de 8
     		logBug("info="+$('.principal .contenido .info ', wrap));
     		$('.principal .contenido .info ', wrap).html(info.html());
     	}else if($('.title').length>0){
     		logBug('tile='+$('.title'));
     		// Columan de 4-5
     		$('.title').html(info.html());
     	}
     }
     //update counter when slide moves
     $('.mod_galeria_videos .visor li:not(.now)').live('click', function(e){
         refreshCounter($(this));
         $(this).siblings().removeClass('now');
         $(this).addClass('now');
     })

     //seek to correspondent item when navigation arrows are clicked
     $('.mod_galeria_videos .principal a.browse').bind('click', function(){
       //nnEventTrack(urlPageNielsenVideo);
       if ($(this).hasClass('nextPage')) {
         var target = parseInt(mod_galeria_videos.getClickIndex())+1;
       }else{
         var target = parseInt(mod_galeria_videos.getClickIndex())-1;
       }
       var galeria_wrap = $(this).closest('.mod_galeria_videos');
       mod_galeria_videos.click(target);
       $('.carrusel .visor ul > li:eq('+(target)+')', galeria_wrap).addClass('now').siblings().removeClass('now')
       refreshCounter($('.carrusel .active', galeria_wrap));
     })
   };
	};

	

/*	mod carrusel cabecera
    ----------------------------------------------------------------------------------------------------*/
	function mod_carrusel_cabecera() {
		$('.mod_carrusel_cabecera .visor ul').find('li:first a').addClass('active')
		$('.mod_carrusel_cabecera .visor ul li a').parent().parent().find('li a').each(function(){
			$(this).click(function() {
			$('.mod_carrusel_cabecera .visor ul li a').removeClass('active')
			$(this).addClass('active')
			});
		});
		$('.mod_carrusel_cabecera .visor').scrollable({ size: 5, items: '.visor ul li', loop:true, clickable: false});
	};

	/* carruseles
	----------------------------------------------------------------------------------------------------*/
	function frecs() {
		$('.mod_frecs .wrapper .right').each(function(){
			if ($(this).find('p').length == 1){
				$(this).addClass('one_column');
			} else if ($(this).find('p').length > 1){
				$(this).addClass('two_columns');
			}
		});
	};
	
	/* mod_audios_collection
	----------------------------------------------------------------------------------------------------*/
	function mod_audios_collection(){
		$('.grid_8 .mod_audios_collection ul').makeacolumnlists({cols: 2, colWidth: 0, equalHeight: 'ul', startN: 1});
	}

	/* modal
	----------------------------------------------------------------------------------------------------*/
	
	function modal_2(){
		$(".modal").overlay({
			mask: 'black',
			onBeforeLoad: function() {
				var wrap = this.getOverlay().find(".contentWrap");
				wrap.load(this.getTrigger().attr("href"));
			}
		});
	};

	/* btn_podcast
	----------------------------------------------------------------------------------------------------*/
	function btn_podcast(){
		$(".fn_btn_podcast").click(function(e) {
			e.preventDefault();
			$(this).parent().find('.podcast_lay').fadeIn(200, function(){
				var link_copy = $(this).find('.fn_link_copy');
				var input_copy = $(this).find('.fn_input_copy');
				$(link_copy).zclip({
					path:'/static/js/ZeroClipboard.swf',
					copy:function(){
						return $(input_copy).val();
					},
					afterCopy:function(){
						$(link_copy).text('LISTO!').addClass('copied');
					}
				});
				$('.close').click(function() {
					$(".podcast_lay").hide();
					return false
				})
			});
		});
		$(".podcast_lay").mouseup(function() {
			return false
		});
		$(document).mouseup(function(e) {
			if($(e.target).parent(".fn_btn_podcast").length==0) {
				$('.fn_link_copy').text('COPIAR').removeClass('copied')
				$(".podcast_lay").hide();
			}
		});
	};

	/* mod_podcast
	----------------------------------------------------------------------------------------------------*/
	function mod_podcast(){
		$('.fn_link_copy').each(function() {
			var link_copy = $(this).parent().find('.fn_link_copy');
			var input_copy = $(link_copy).parent().parent().find('.fn_input_copy');
			$(link_copy).zclip({
				path:'/static/js/ZeroClipboard.swf',
				copy:function(){
					return $(input_copy).val();
				},
				afterCopy:function(){
					$(link_copy).text('LISTO!').addClass('copied');
				}
			});
		})
	}

	/* mod_tu_clip
	----------------------------------------------------------------------------------------------------*/
	function mod_tu_clip(){
		$('.fn_enviar').click(function(){
			$('.info').hide();
			$('.mod_tu_clip .data_1').show();
		});
		$('.data_1 .formItem_file .right').click(function(){
			$('.mod_tu_clip .data_1').hide();
			$('.data_3').show();
		});
		$('.data_1 .formItem_file .right').click(function(){
			$('.mod_tu_clip .data_1').hide();
			$('.data_3').show();
		});
		$('.data_3 .right_2').click(function(){
			$('.mod_tu_clip .data_3').hide();
			$('.info').show();
		});
		return false;
	};

	/* mod galeria noticias carrusel
	----------------------------------------------------------------------------------------------------*/
	function mod_galeria_noticias_carrusel() {
	$(".mod_galeria_noticias_carrusel .visor").scrollable({ size: 3, items: 'li', loop:true, onReload: function(){
		var total = this.getItems().length;
		var wrap = $(this.getRoot().closest('.mod_galeria_noticias_carrusel'));
		$('.contador span:last', wrap).html(total);
	}});

	$('.mod_galeria_noticias_carrusel .visor li a').bind('click', function(e){
		//nnEventTrack(/*pageUrlNielsenImagenes + */'/galeriasimagenes');
		e.preventDefault();
		var target = $(this).closest('li');
		var title = $('span', target).html();
		var wrap = target.closest('.mod_galeria_noticias_carrusel')
		var n = target.index()+1;

		$('.title', wrap).html(title);
		$('.contador .actual', wrap).html(n);

		$('.destacada a', wrap).attr('href', $('a', target).attr('href'));

		var full_img = $('.destacada img', wrap);
		full_img.fadeOut('normal', function(){
		  $('.destacada img', wrap).attr('src', $('img', target).attr('rel')).fadeIn('normal');
		})
	  })
	}

	/* mod_locales
	----------------------------------------------------------------------------------------------------*/
	function mod_locales() {
		$(".mod_locales #statesCombo").change(function(){
			$('#region').text($('select#statesCombo option:selected').html());
		});
	}

	/* mod_programacion
	----------------------------------------------------------------------------------------------------*/
	function mod_programacion() {
		$.ajax({
			type: "GET",
			url: /mobileDevice/ + "ondaCeroGrid.xml",
			dataType: "xml",
			success: function(xml) {
				$(xml).find('programa').each(function(){
					columna = $(this).parent().parent().attr('dayOfWeek');
					nombre_programa = '<p>' + $(this).find('nombre__programa').text() + '</p>';
					hora_init = $(this).find('horaInicio').text().split(':')[0];
					hora_fin = $(this).find('horaFin').text().split(':')[0];
					media_hora_init = $(this).find('horaInicio').text().split(':')[1];
					media_hora_fin = $(this).find('horaFin').text().split(':')[1];
					if (hora_fin < hora_init){hora_fin = parseInt(hora_fin) + 24};
					duracion = (hora_fin - hora_init) * 2;
					if (media_hora_init >= 30){duracion = duracion - 1};
					if (media_hora_fin >= 30){duracion = duracion +1};
					alt_init = ($('.mod_programacion .horario li').height())+1;
					alt_calculada = (duracion)*alt_init;
					padding = (alt_calculada/2)-10;
					alt_def = alt_calculada - padding;
					if (duracion == 1){alt_def = alt_calculada}
					style = {
						'height' : alt_def,
						'padding-top' : padding
					}
					programa = $(nombre_programa).css(style)

					// build:
					$('<li></li>').html(programa).appendTo('.mod_programacion ul.dia_' + columna).addClass('height_' + alt_calculada);
				})
			}
		});
	}

	var testCallback = function($td, thisDate, month, year) {
		var thisDateTime = thisDate.getTime();
		var disabled = true;
		for(i=0;i<fechas.length;i++){
			var arrayTime = convertToDateObject(fechas[i]).getTime();
			if(compareDate(thisDate, fechas[i])){
				disabled = false;
				break;
			}
		}
		if(disabled){
			$td.addClass("disabled")
		}
	}
	
	function compareDate(thisDate, arrayDate) {
		var date = new Date(thisDate);
		var year = arrayDate.substring(0, 4);
		var month = arrayDate.substring(4, 6);
		var day = arrayDate.substring(6, 8);
		
		var fecha_DD = thisDate.getDate();
		if (fecha_DD < 10){ 
			fecha_DD = "0"+fecha_DD; 
		}
		
		if ((year == date.getFullYear()) && (month == date.getMonth()+1) && day == fecha_DD) {
			return true;
		}
		
		return false;
	}
	
	function mod_calendar() {
		var $lastDate = fechas[fechas.length-1];
		var $dp = $('.turn-me-into-datepicker').datePicker({
			inline:true,
			dateFormat: 'ddMMyy',
			startDate:formatDate(fechas[0]),
			endDate:formatDate(fechas[(fechas.length-1)]),
		    constrainInput: true,
		    renderCallback:testCallback
		});
		if(getCurrentDate()!=null){
                        $dp.dpSetSelected(getCurrentDate());
                }else{
			$dp.dpSetSelected(formatDate($lastDate));
		}
		$dp.bind(
			'dateSelected',
			function(e, selectedDate, $td){
				var fecha=new Date(selectedDate);
				var fecha_YYYY=fecha.getFullYear();
				var fecha_MM=(fecha.getMonth()+1);
				if (fecha_MM < 10){ 
					fecha_MM="0"+fecha_MM; 
				}
				var fecha_DD=fecha.getDate();
				if (fecha_DD < 10){ 
					fecha_DD="0"+fecha_DD; 
				}
				var miFechaPedida=new String(fecha_YYYY);
				miFechaPedida +=fecha_MM; 
				miFechaPedida +=fecha_DD; 
				for(i=0;i<fechas.length;i++){
					if(fechas[i]==miFechaPedida){
	                                	if(miFechaPedida == $lastDate){
        	                                	window.location.href = "./" + sectionUrl;
	        	                        }else{
							window.location.href = programIndex + sectionUrl + "_" + miFechaPedida + ".html";
						}
                    			}
				}
			}
		);
	};
	
	function convertToDateObject(d){
		return new Date(d.substring(0,4),(parseInt(d.substring(4,6))-1),d.substring(6,8))		
	}
	
	function formatDate($date){
		if(isNaN($date)){
		return null
		}
		return $date.substring(6,8) + "/" + $date.substring(4,6) + "/" + $date.substring(0,4)
	}
	
	function zeroFill($e){
		if($e<10){
			$e = "0" + $e
		}
		return $e;		
	}
	
	function getCurrentDate(){
		var $url = window.location.href;
		var $index = $url.lastIndexOf(".html");
		if($index==-1){
			return null
		}
		var $dateStr = $url.substring($index-8,$index)
		var $date = formatDate($dateStr);
		return $date;
	}
	
	function mod_calendar_bulletin() {
		$('.date-pick').datePicker({disabled:true});
		var $today = new Date();
		var $endDate = zeroFill($today.getDate()) + "/" + zeroFill(($today.getMonth()+1)) + "/" + $today.getFullYear();
		var $dp = $('.turn-me-into-datepicker')
		.datePicker({
				inline:true,dateFormat:'ddMMyy',
				startDate:startDate,
				endDate:$endDate
		})
		if(getCurrentDate()!=null){
			$dp.dpSetSelected(getCurrentDate());
		}else{
			$dp.dpSetSelected($endDate);
		}
		$dp.bind(
			'dateSelected',
			function(e, selectedDate, $td){
				var fecha=new Date(selectedDate);
				var fecha_YYYY=fecha.getFullYear();
				var fecha_MM=(fecha.getMonth()+1);
				if (fecha_MM < 10){ 
					fecha_MM="0"+fecha_MM; 
				}
				var fecha_DD=fecha.getDate();
				if (fecha_DD < 10){ 
					fecha_DD="0"+fecha_DD; 
				}
				var miFechaPedida=new String(fecha_YYYY);
				miFechaPedida +=fecha_MM; 
				miFechaPedida +=fecha_DD; 
				if(formatDate(miFechaPedida) == $endDate){
					window.location.href = "./";
				}else{
					window.location.href = "boletines_" + miFechaPedida + ".html";
				}
			}

		);
	};

	function map2() {
		window.onload = function () {
			// Map Colors
			fill_dark = "#aaaaaa";
			fill_medium = "#bbbbbb";
			fill_soft = "#cccccc";
			border_color= "#dedede";
			border_color_2= "#04900d";
			hover_color = "#008108";
			
			// Where the image is going to be and its size
			var R = Raphael("paper", 500, 430);
			
			var genAttr = {
				stroke: border_color,
				"stroke-width": 1,
				"stroke-linejoin": "round"
			};
			var attr = { 		fill: fill_medium	};
			var attr_dark = {	fill: fill_dark		};
			var attr_soft = {	fill: fill_soft		};

			// para mod_frecs provincias:
			var map = {};

			map.state_13 = R.path("M78 48L66 47L51 55L39 57L47 45L38 49L37 41L31 42L33 33L38 32L36 27L47 27L47 21L55 24L65 19L72 23L74 19L68 12L86 1L86 7L93 1L95 4L84 21L78 48 M112 64L120 48L120 43L116 41L121 33L117 34L110 22L115 17L113 14L106 12L95 4L84 21L78 50L81 62L99 68L106 73L112 64 M66 47L78 48L78 50L80 60L70 59L63 63L66 75L69 80L53 83L45 90L43 80L44 75L43 73L44 69L44 67L43 62L47 62L51 55L66 47 M107 89L105 95L90 100L89 94L80 96L81 91L71 98L67 92L73 87L66 75L63 63L70 59L80 60L81 62L99 68L106 73L112 64L121 69L123 74L122 79L112 85L113 91L107 89").attr(genAttr).attr(attr_dark);
			map.state_3 = R.path("M120 43L116 41L121 33L117 34L110 22L118 14L138 14L150 16L160 12L167 17L182 20L210 25L194 36L191 33L183 40L163 42L155 45L149 40L135 43L132 46L120 48L120 43").attr(genAttr).attr(attr_soft);
			map.state_7 = R.path("M252 25L244 25L240 20L232 25L230 22L213 26L210 25L194 36L198 43L209 43L216 48L221 57L231 55L230 48L225 48L238 37L246 38L256 28L252 25").attr(genAttr).attr(attr_dark);
			map.state_5 = R.path("M247 37 L255 29 L269 24 L272 24 L283 28 L275 44 L264 41 L260 34 L256 38 L246 37 M275 43 L283 28 L289 30 L293 30 L303 27 L306 30 L289 48 L275 44 M289 48L288 58L283 63L281 69L273 69L269 64L266 62L257 55L256 52L252 51L253 47L261 47L256 38L261 33L264 41L275 44L289 48").attr(genAttr).attr(attr_soft);
			map.state_17 = R.path("M334 47L324 42L322 38L320 42L317 41L320 33L315 31L313 32L307 30L289 48L288 58L283 63L281 69L298 75L309 85L302 89L303 94L319 98L324 91L319 80L325 66L337 56L342 45L334 47").attr(genAttr).attr(attr);
			map.state_2 = R.path("M388 112L385 106L395 92L397 64L395 56L383 56L371 57L359 51L349 53L342 45L337 57L339 78L343 75L343 89L340 93L352 100L366 113L370 124L385 121L388 112 M345 192L352 184L364 172L360 160L367 153L375 156L383 152L383 142L380 139L354 125L346 135L331 135L313 146L315 163L306 172L321 186L324 182L333 189L331 194L336 193L345 200L345 192 M387 128L380 139L354 125L346 135L331 135L313 146L300 136L296 136L292 128L305 107L304 94L319 98L324 91L319 80L325 66L337 56L339 78L343 75L343 89L340 93L352 100L366 113L370 124L385 121L387 128").attr(genAttr).attr(attr_soft);
			map.state_10 = R.path("M424 100L429 101L433 89L432 80L438 73L434 65L423 68L420 55L413 55L396 49L395 56L397 64L395 92L385 106L388 112L385 121L387 128L389 125L406 123L424 110L424 100 M435 130L428 120L424 110L424 100L429 101L433 89L432 80L438 73L445 75L446 82L454 81L463 84L462 93L457 95L466 101L473 100L473 105L457 115L451 124L435 130 M485 96L491 87L486 80L486 75L491 74L492 70L488 69L488 65L480 64L468 67L467 71L456 68L445 71L439 66L434 65L438 73L445 75L446 82L454 81L463 84L462 93L457 95L466 101L473 100L473 105L485 96 M393 165L384 160L380 153L383 152L383 142L380 139L389 125L406 123L424 110L428 120L435 130L411 139L400 151L407 154L400 163L398 159L393 165").attr(genAttr).attr(attr_dark);
			map.state_9 = R.path("M187 78L190 58L198 43L194 36L191 33L183 40L163 42L155 45L149 40L135 43L132 46L120 48L112 64L121 69L123 74L122 79L132 83L138 81L161 88L163 85L170 90L173 82L187 78 M142 113L136 107L128 106L130 94L113 91L112 85L122 79L132 83L138 81L160 88L163 85L170 90L176 93L172 104L177 117L173 132L153 130L150 133L130 126L142 113 M114 177L121 178L126 173L138 165L147 176L156 176L159 169L166 168L166 161L181 145L178 133L153 130L150 133L130 126L113 138L117 146L114 177 M211 104L206 100L196 101L186 96L190 89L186 84L190 58L198 43L209 43L216 48L221 57L215 58L213 71L218 86L227 95L222 103L211 104 M173 132L177 117L172 104L176 93L170 90L173 82L187 78L186 84L190 89L186 96L196 101L206 100L211 104L222 103L225 115L205 121L205 126L196 135L178 133L173 132 M171 187L170 179L165 181L156 176L159 169L166 168L166 161L181 145L178 133L196 135L209 160L217 158L201 183L191 180L185 186L171 187 M225 115L233 118L240 114L251 100L256 102L264 92L257 85L259 74L256 67L259 63L266 62L257 55L256 52L252 51L253 47L261 47L256 38L246 38L238 37L225 48L230 48L231 55L215 58L213 71L218 86L227 95L222 103L225 115 M223 154L228 146L252 128L240 114L233 118L225 115L205 121L205 126L196 135L209 160L217 158L223 154 M256 102L251 100L240 114L252 128L265 127L281 140L296 136L292 128L305 107L304 94L298 97L284 86L273 93L270 88L264 92L256 102").attr(genAttr).attr(attr);
			map.state_14 = R.path("M298 97L284 86L273 93L270 88L264 92L257 85L259 74L256 67L259 63L266 62L269 64L273 69L281 69L298 75L309 85L302 89L303 94L298 97").attr(genAttr).attr(attr_dark);
			map.state_11 = R.path("M369 204L362 201L351 205L345 200L345 192L352 184L364 172L360 160L367 153L375 156L380 153L384 160L393 165L379 189L375 190L375 197L369 204 M318 222L321 209L325 209L331 194L336 193L351 205L362 201L369 204L363 217L367 233L373 247L356 252L356 256L352 257L340 253L339 245L332 245L327 238L330 226L318 222 M337 260L335 274L338 278L337 287L343 297L349 299L352 287L358 282L362 272L374 265L385 254L374 247L356 252L356 256L352 257L340 253L337 260").attr(genAttr).attr(attr);
			map.state_12 = R.path("M161 269L162 280L155 286L155 282L149 283L136 294L111 281L100 279L91 266L95 254L103 247L107 238L96 226L106 219L115 223L115 230L132 231L138 238L157 236L171 227L185 223L190 215L197 221L194 226L196 234L191 233L186 241L188 248L181 255L161 269 M87 206L103 206L111 199L112 186L108 180L114 177L121 178L126 173L138 165L147 176L156 176L165 181L170 179L173 206L186 223L171 227L157 236L138 238L132 231L115 230L115 223L106 219L96 226L95 216L87 206").attr(genAttr).attr(attr_soft);
			map.state_8 = R.path("M337 260L340 253L339 245L332 245L327 238L330 226L318 222L305 228L295 225L284 230L271 228L265 246L274 256L269 267L279 272L277 289L286 291L296 278L310 274L316 276L321 270L322 258L331 255L337 260 M271 228L284 230L295 225L305 228L318 222L321 209L325 209L333 189L324 182L321 186L306 172L293 159L267 175L265 184L259 184L254 191L264 210L263 220L271 228 M259 184L243 158L245 143L240 136L252 128L265 127L281 140L300 136L313 146L315 163L306 172L293 159L267 175L265 184L259 184 M254 191L244 190L228 198L236 188L217 179L201 183L191 180L185 186L171 187L173 206L186 223L190 215L197 221L202 214L221 215L217 224L232 230L252 220L263 220L264 210L254 191 M210 274L269 267L274 256L265 246L271 228L263 220L252 220L232 230L217 224L221 215L202 214L197 221L194 226L196 234L191 233L186 241L188 248L181 255L210 274").attr(genAttr).attr(attr_dark);
			map.state_15 = R.path("M228 198L236 188L217 179L201 183L217 158L223 154L228 146L240 136L245 143L243 158L259 184L254 191L244 190L228 198").attr(genAttr).attr(attr_soft);
			map.state_16 = R.path("M286 291L296 278L310 274L316 276L321 270L322 258L331 255L337 260L335 274L338 278L337 287L343 297L349 299L344 306L349 312L342 315L327 315L314 325L306 320L298 309L299 299L290 297L286 291").attr(genAttr).attr(attr_soft);
			map.state_1 = R.path("M101 287L95 288L82 310L85 328L102 331L102 326L125 350L128 319L121 307L132 302L136 294L111 281L105 280L101 287 M167 341L175 342L186 332L195 331L194 324L189 326L182 307L168 312L164 307L168 304L159 283L155 286L155 282L149 283L136 294L132 302L121 307L128 319L125 345L144 348L167 341 M125 350L125 345L144 348L167 341L175 342L173 351L167 349L165 361L155 367L164 368L168 377L153 392L141 384L136 383L128 370L130 365L122 359L125 350 M210 332L211 325L219 322L212 310L210 292L214 285L210 274L181 255L161 269L162 280L159 283L168 304L164 307L168 312L182 307L189 326L194 324L195 331L205 329L210 332 M203 358L199 365L189 370L182 368L168 377L164 368L155 367L165 361L167 349L173 351L175 342L186 332L195 331L205 329L210 332L209 341L228 351L229 357L203 358 M212 310L210 292L214 285L210 274L269 267L279 272L277 289L260 312L240 313L219 322L212 310 M255 356L241 360L229 357L228 351L209 341L211 325L240 313L260 312L277 289L286 291L290 297L287 301L283 316L275 323L272 331L266 330L255 356 M314 325L306 320L298 309L299 299L290 297L287 301L283 316L275 323L272 331L266 330L255 356L262 356L270 359L278 352L286 352L293 357L303 347L307 332L314 325").attr(genAttr).attr(attr);
			map.state_4 = R.path("M402 261 L404 259 L406 259 L408 262 L408 264 L405 264 L402 261 M399 253 L399 249 L404 245 L408 245 L410 248 L404 253 L399 253 M428 229 L423 224 L435 213 L449 207 L452 209 L445 214 L452 218 L455 216 L459 220 L449 236 L445 235 L444 232 L436 232 L432 225 L428 229 M470 207 L470 201 L474 201 L474 200 L478 200 L484 205 L483 207 L484 209 L485 211 L486 212 L482 213 L481 212 L476 211 L470 207").attr(genAttr).attr(attr_soft);
			map.state_6 = R.path("M7 395 L7 391 L9 391 L9 390 L12 390 L13 390 L18 394 L18 396 L19 398 L19 399 L17 399 L16 400 L13 400 L7 395 M17 385 L18 382 L20 383 L22 382 L28 384 L27 391 L23 390 L17 386 M8 373 L8 366 L11 364 L15 367 L17 370 L18 373 L17 374 L17 378 L12 378 L8 374 M28 375 L34 375 L35 376 L47 368 L50 369 L43 379 L38 388 L29 379 L29 378 L28 376 L28 375 M48 409 L48 403 L49 400 L50 400 L53 397 L62 401 L63 403 L61 405 L62 410 L60 410 L55 413 L48 409 M68 393 L78 383 L79 382 L80 378 L82 376 L86 377 L86 381 L85 388 L75 394 L74 393 L69 393 M85 367 L87 362 L89 360 L96 358 L96 359 L95 361 L96 366 L89 371 L85 367").attr(genAttr).attr(attr_soft);
			map.state_18 = R.path("M141 403L144 409L151 414L168 409L160 399L151 398L146 401L141 403").attr(genAttr).attr(attr_soft);
			map.state_19 = R.path("M250 406L241 408L243 413L249 416L257 413L263 406L256 403L250 406").attr(genAttr).attr(attr_soft);
			
			var current = null;
			for (var state in map) {
				map[state].color = hover_color;
				
				
				(function (st, state) {
					st[0].style.cursor = "pointer";
					st[0].onmouseover = function (e) {
						
						// the state that you just mouseout
						if (current) {
							setStatesAttr(current, map);
						} else {
							current && map[current].animate({fill: fill_medium, stroke: border_color_2}, 500);
						}
						
						// current state
						st.animate({fill: st.color, stroke: border_color_2}, 500);
						st.toFront();
						R.safari();
						stateId = state.split("_")[1];
						
						// change select value
						current = state;
					};
					st[0].onmouseout = function () {
						st.animate({fill: hover_color, stroke: border_color_2 }, 500);
						st.toFront();
						R.safari();
					};
					st[0].onmousedown = function () {
						currentId = current.split("_")[1];
						// alert("click en el estado " + currentId);
						$('select#statesCombo').val(stateId);
						$('#region').text($('select#statesCombo option:selected').html());
						$(window).scrollTo($('#region'),500);
						$.ajax({
							  url: (currentId+".html"),
							  //context: document.body,
							  success: function(data, textStatus, jqXHR){
								  $('ul#statesData').html(data);
							  }
							});
					};
					// state to be selected by default
					if (state == "state_00") {
						st[0].onmouseover();
					}
					
					$('select#statesCombo').change(function(){
						var id = "state_" + $(this).val();
						if (state == id) {
							$('#region').text($('select#statesCombo option:selected').html());
							eval("map." + id + ".animate({fill: hover_color, stroke: border_color}, 500)");
							current = state;
							$(window).scrollTo($('#region'),500);
							$.ajax({
								  url: ($(this).val()+".html"),
								  //context: document.body,
								  success: function(data, textStatus, jqXHR){
									  $('ul#statesData').html(data);
								  }
								});
						} else {
							setStatesAttr(state, map);
						}
					})
				})(map[state], state);
			}
			
		};

		function setStatesAttr(state, map) {
			currentId = state.split("_")[1];
			switch (currentId) {
				// soft areas
				case "01": case "03": case "05": case "07": case "09": case "11": case "13": case "15": case "17": case "19":
				   state && map[state].animate({fill: fill_soft, stroke: border_color}, 500);
				   break
				// dark areas
				case "02":  case "04": case "06":  case "08": case "10":  case "12": case "14":  case "16": case "18":
				   state && map[state].animate({fill: fill_dark, stroke: border_color}, 500);
				   break
				default:
					state && map[state].animate({fill: fill_medium, stroke: border_color}, 500);
			} 

		}
	}

	function ocero_modal() {
		$('.ocero_modal').click(function(e) {
			e.preventDefault();
			if ($(this).find('.ocero_modal_lay').length == 0) {
				href = $(this).attr('href');
				cl = $(this).attr('class');
				$('<div class="ocero_modal_overlay ' + cl + '"><div class="ocero_modal_lay"><a class="close"></a><iframe src="' + href + '"></iframe></div></div>').appendTo('body');
				var overlay_2 = $('.ocero_modal_overlay');
				overlay_2.removeClass('ocero_modal');
				modal_lay = $('.ocero_modal_lay');
				close_lay = overlay_2.find('.close');
				modal_lay.hide();
				setTimeout(function () {
					modal_lay.fadeIn(500)
				}, 200)
				overlaywidth = overlay_2.width();
				iframewidth = overlay_2.find('iframe').width();
				position_def = ((overlaywidth/2) + (iframewidth/2)) - 25
				cssObj = {
					'left' : position_def + 'px',
					'top' : '10px',
					'z-index' : modal_lay.css('z-index') + 100
				}
				close_lay.css(cssObj).click(function(e) {
					e.preventDefault();
					$(this).parent().parent().fadeOut()
				})
			}
		})
	}









$(document).ready(function(){
	oceroInit();
});

