Skip to content

Instantly share code, notes, and snippets.

@xyos
Created January 29, 2015 05:16
Show Gist options
  • Save xyos/101babe78a591ccf8814 to your computer and use it in GitHub Desktop.
Save xyos/101babe78a591ccf8814 to your computer and use it in GitHub Desktop.
<script>
$( document ).ready(function() {
$(".complejo1").selectOrDie();
$(".pelicula1").selectOrDie();
});
</script>
<script>try{Typekit.load();}catch(e){}</script>
<script>
var CKTEXT_PLG_MAXIMENUCK_MENU = 'Menu';
jQuery(document).ready(function($){
$('#maximenuck').MobileMaxiMenu({usemodules : 0,container : 'menucontainer',showdesc : 0,showlogo : 1,useimages : 0,menuid : 'maximenuck',displaytype : 'flat',displayeffect : 'normal'});
});
jQuery(document).ready(function($){$('#maximenuck').DropdownMaxiMenu({fxtransition : 'linear',dureeIn : 0,dureeOut : 200,menuID : 'maximenuck',testoverflow : '0',orientation : 'horizontal',behavior : 'mouseover',opentype : 'open',fxdirection : 'normal',directionoffset1 : '30',directionoffset2 : '30',showactivesubitems : '0',ismobile : 0,menuposition : '0',effecttype : 'dropdown',fxduration : 200});});
jQuery(document).ready(function($){
$('#maximenuck').FancyMaxiMenu({fancyTransition : 'linear',fancyDuree : 200});});
</script>
<script><!--
var eplDoc = document; var eplLL = false;
var eS1 = 'us.img.e-planning.net';var eplArgs = { iIF:1,sV:schemeLocal() + "://ads.e-planning.net/" ,vV:"4",sI:"12feb",sec:"ROS",eIs:["300x250","728x90","VOLADOR_Layer","Expandible_RO","Skin"] };
function eplCheckStart() {
if (document.epl) {
var e = document.epl;
if (e.eplReady()) {
return true;
} else {
e.eplInit(eplArgs);
if (eplArgs.custom) {
for (var s in eplArgs.custom) {
document.epl.setCustomAdShow(s, eplArgs.custom[s]);
}
}
return e.eplReady();
}
} else {
if (eplLL) return false;
if (!document.body) return false; var eS2; var dc = document.cookie;
var cookieName = ('https' === schemeLocal() ? 'EPLSERVER_S' : 'EPLSERVER') + '=';
var ci = dc.indexOf(cookieName);
if (ci != -1) {
ci += cookieName.length; var ce = dc.indexOf(';', ci);
if (ce == -1) ce = dc.length;
eS2 = dc.substring(ci, ce);
}
var eIF = document.createElement('IFRAME');
eIF.src = 'about:blank'; eIF.id = 'epl4iframe'; eIF.name = 'epl4iframe';
eIF.width=0; eIF.height=0; eIF.style.width='0px'; eIF.style.height='0px';
eIF.style.display='none'; document.body.appendChild(eIF);
var eIFD = eIF.contentDocument ? eIF.contentDocument : eIF.document;
eIFD.open();eIFD.write('<html prefix="og: http://ogp.me/ns#"><head><title>e-planning</title></head><bo'+'dy></bo'+'dy></html>');eIFD.close();
var s = eIFD.createElement('SCRIPT');
s.src = schemeLocal() + '://' + (eS2?eS2:eS1) +'/layers/epl-41.js';
eIFD.body.appendChild(s);
if (!eS2) {
var ss = eIFD.createElement('SCRIPT');
ss.src = schemeLocal() + '://ads.e-planning.net/egc/4/117f4';
eIFD.body.appendChild(ss);
}
eplLL = true;
return false;
}
}
eplCheckStart();
function eplSetAdM(eID,custF) {
if (eplCheckStart()) {
if (custF) { document.epl.setCustomAdShow(eID,eplArgs.custom[eID]); }
document.epl.showSpace(eID);
} else {
var efu = 'eplSetAdM("'+eID+'", '+ (custF?'true':'false') +');';
setTimeout(efu, 250);
}
}
function eplAD4M(eID,custF) {
document.write('<div id="eplAdDiv'+eID+'"></div>');
if (custF) {
if (!eplArgs.custom) { eplArgs.custom = {}; }
eplArgs.custom[eID] = custF;
}
eplSetAdM(eID, custF?true:false);
}
function schemeLocal() {
if (document.location.protocol) {
protocol = document.location.protocol;
} else {
protocol = window.top.location.protocol;
}
if (protocol) {
if (protocol.indexOf('https') !== -1) {
return 'https';
} else {
return 'http';
}
}
}
//--></script>
<script>eplAD4M("728x90");</script>
<script>
$(".nav").mouseover(function(){
$(this).removeClass().addClass("navOver");
}).mouseout(function(){
$(this).removeClass().addClass("navOut");
});
</script>
<script>
$(".nav").mouseover(function(){
$(this).removeClass().addClass("navOver");
}).mouseout(function(){
$(this).removeClass().addClass("navOut");
});
</script>
<script>
$(".nav").mouseover(function(){
$(this).removeClass().addClass("navOver");
}).mouseout(function(){
$(this).removeClass().addClass("navOut");
});
</script>
<script>
$(document).ready(function(){
nombre = "";
$("#loading-div-background1").css({ opacity: 0.8 });
movie = "-1";
cine = "-1";
cinelist = [{id: "1", name: "Cinema Adrogue"},{id: "2", name: "Atlas Avellaneda"},{id: "3", name: "Atlas Patio Bullrich"},{id: "4", name: "Atlas Flores"}];
movielist = [{id: "39", value: "39-relatos-salvajes-35mm", idewave: "21140010", name: "Relatos salvajes"},{id: "100", value: "100-american-sniper", idewave: "44444444", name: "Francotirador"},{id: "105", value: "105-los-pingueinos-de-madagascar-2d", idewave: "64150010", name: "Los Pingüinos de Madagascar"},{id: "145", value: "145-grandes-herores", idewave: "64140211", name: "Grandes Heroes"},{id: "152", value: "152-grandes-heroes-3d", idewave: "63140034", name: "Grandes Heroes 3D"},{id: "161", value: "161-el-hobbit-doblada", idewave: "064140240", name: "El Hobbit Doblada"},{id: "166", value: "166-papeles-en-el-viento", idewave: "25144035", name: "Papeles En El Viento"},{id: "168", value: "168-una-noche-en-el-museo-3", idewave: "064140247", name: "Una Noche En El Museo 3 Doblada"},{id: "172", value: "172-dios-mio-que-hemos-hecho", idewave: "64150006", name: "Dios mío, ¿Qué Hemos Hecho?"},{id: "174", value: "174-la-dama-de-negro-2", idewave: "64140246", name: "La Dama de Negro 2"},{id: "175", value: "175-whiplash", idewave: "64140230", name: "Whiplash: Música y Obsesión"},{id: "179", value: "179-busqueda-implacable-3-doblada", idewave: "064150013", name: "Búsqueda Implacable 3 - Doblada"},{id: "180", value: "180-inquebrantable-1", idewave: "64150008", name: "Inquebrantable"},{id: "181", value: "181-st-vincent", idewave: "64150016", name: "St. Vincent"},{id: "182", value: "182-el-desafio", idewave: "221", name: "El Desafío"},{id: "184", value: "184-los-pingueinos-de-madagascar-3d", idewave: "63150001", name: "Los Pingüinos de Madagascar 3D"},{id: "190", value: "190-el-gran-hotel-budapest", idewave: "64140044", name: "El Gran Hotel Budapest"}];
movieDblist = [{id: "21144017", nombre: "Relatos salvajes 2D", idcine: "1"},{id: "064140241", nombre: "Ouija Castellano", idcine: "1"},{id: "64150011", nombre: "Francotirador", idcine: "1"},{id: "64140246", nombre: "La dama de negro 2 Subtitulada", idcine: "1"}];
$('#pelicula1_custom li').click(function() {
console.log('Tomo movie');
console.log($(this).data("value"));
movie = $(this).data("value");
var str = movie;
var res = str.split("-");
console.log(res);
res.shift();
console.log(res);
str = res.toString();
console.log(str);
var find = ',';
var re = new RegExp(find, 'g');
movie = str.replace(re,"-");
console.log(movie);
});
$('#complejo1_custom li').click(function() {
console.log('Tomo cine');
console.log($(this).attr("title"));
cine = $(this).data("value");
console.log(cine);
});
$('#pelicula1').change(function() {
console.log('Tomo movie 1');
console.log($(this).val());
movie = $(this).val();
var str = movie;
var res = str.split("-");
console.log(res);
res.shift();
console.log(res);
str = res.toString();
console.log(str);
var find = ',';
var re = new RegExp(find, 'g');
movie = str.replace(re,"-");
console.log(movie);
});
$('#complejo1').change(function() {
console.log('Tomo cine 1');
console.log($(this).children(":selected").html());
cine = $(this).val();
nombre = $(this).children(":selected").html();
setMovieList(nombre);
console.log(cine);
});
function setMovieList(nombre) {
$(cinelist).each(function(i) {
if (cinelist[i].name == nombre) {
$('#pelicula1').html("");
$('#pelicula1').append("<option value='-1' selected>Elegí la película</option>");
$('#pelicula1_custom ul').html("");
$('#pelicula1_custom ul').append("<li data-value='-1' title='Elegí la película' class=' selected active '>Elegí la película</li>");
$('#pelicula1_custom .sod_label').html("Elegí la película");
$(movieDblist).each(function(j) {
if (cinelist[i].id == movieDblist[j].idcine) {
$(movielist).each(function(k) {
if (movieDblist[j].id == movielist[k].idewave) {
console.log(movielist[k].value);
$('#pelicula1').append("<option value='"+movielist[k].value+"'>"+movielist[k].name+"</option>");
//<li class="" title="Como entrenar a tu dragón 2" data-value="4-como-entrenar-a-tu-dragon-2">Como entrenar a tu dragón 2</li>
$('#pelicula1_custom ul').append("<li class='' title='"+movielist[k].name+"' data-value='"+movielist[k].value+"'>"+movielist[k].name+"</li>");
}
});
}
});
}
});
if (cine == -1) {
$(movielist).each(function(l) {
$('#pelicula1').append("<option value='"+movielist[l].value+"'>"+movielist[l].name+"</option>");
$('#pelicula1_custom ul').append("<li class='' title='"+movielist[l].name+"' data-value='"+movielist[l].value+"'>"+movielist[l].name+"</li>");
});
}
}
function ShowProgressAnimation() {
$("#loading-div-background1").show();
}
$('#buscardor').click(function() {
ShowProgressAnimation();
console.log("Peli: "+movie);
console.log("Cine: "+cine);
cineId = 0;
$(cinelist).each(function(i) {
if (cinelist[i].name == nombre) {
cineId = cinelist[i].id;
}
});
url="";
if (movie != -1 ) {
url='http://www.atlascines.com/cartelera/'+movie;
if (cineId > 0) {
url += '?cine='+cineId;
}
}
if (movie == -1 && cine != -1 ) {
url='http://www.atlascines.com/complejos/'+cine;
}
if (url != "") {
//alert(url);
window.location.href=url;
}
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment