Server IP : 184.154.167.98 / Your IP : 18.118.138.113 Web Server : Apache System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 User : puertode ( 1767) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/puertode/public_html/css-api/javascript/ |
Upload File : |
/* * Mexico D.F. 2010 *El contenido de este archivo fue desarrollado por : *Rogelio Argumedo Uribe rogelio.argumedo@sip.gob.mx para la *Presidencia de la República a través del Sistema Internet de la *Presidencia (SIP sip.gob.mx). * *Bajo la Licencia: Creative Commons Attribution-NonCommercial-ShareAlike 3.0 *http://creativecommons.org/licenses/by-nc-sa/3.0/deed.es_MX * */ window.addEvent('domready', function(){ $$('#carrusel_2 .B1').each(function(el) { var fx = new Fx.Tween(el,{ duration: 640, link: 'cancel', transition: Fx.Transitions.Quint.easeOut }); el.addEvents({ 'mouseenter': function(e) { e.stop(); fx.start("margin-top", "-208px"); // alert('entra'); }, 'mouseleave': function(e) { e.stop(); fx.start("margin-top", "-48px"); //alert('sale'); } }); }); //para scroll if(Browser.Engine.webkit) { //Nada } else { var Para_Carrusel = new UvumiScrollbar('scrollbar-demo'); } }); /* UvumiTools Scrollbar v1.1.0 http://uvumi.com/tools/ Copyright (c) 2008 Uvumi LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. */ var UvumiScrollbar=new Class({Implements:Options,options:{baseClass:'scrollBar'},initialize:function(a,b){this.el=a;this.setOptions(b);if(Browser.Engine.webkit){window.addEvent('domready',this.domReady.delay(100,this))}else{window.addEvent('domready',this.domReady.bind(this))}},domReady:function(){this.el=$(this.el);this.build();this.update();if(!Browser.Engine.trident){this.el.addEvent('mousedown',function(e){e.stopPropagation();if(this.vscroll){this.vscroll.drag.start(e)}if(this.hscroll){this.hscroll.drag.start(e)}}.bind(this))}$$('body').addEvents({'mouseup':this.stopScrolling.bind(this)})},build:function(){this.el.setStyle('overflow','hidden');this.paddingBottom=this.el.getStyle('paddingBottom').toInt();this.paddingTop=this.el.getStyle('paddingTop').toInt();this.paddingRight=this.el.getStyle('paddingRight').toInt();this.border=this.el.getStyle('borderWidth').toInt();var a=this.el.getStyles('borderWidth','borderColor','borderStyle','position','overflow');this.el.setStyles({border:0});this.dimensions=this.el.getSize();a.position=(a.position=="static"?"relative":a.position);a.width=this.dimensions.x;a.height=this.dimensions.y;this.wrapper=new Element('div',{'class':this.options.baseClass,styles:a}).wraps(this.el);this.el.setStyles({position:'relative',margin:0,top:0,left:0,width:"auto",height:this.dimensions.y-this.border});this.scrollbarVertical=new Element('div',{'class':'bar',styles:{position:'absolute',padding:0,margin:0,top:0,right:0,visibility:'hidden'}});this.buttonTop=new Element('div',{'class':'button topButton',styles:{position:'relative'},events:{mousedown:this.startScrollingVertically.bindWithEvent(this,true)}}).inject(this.scrollbarVertical);this.verticalScrollable=new Element('div',{'class':'scrollable',styles:{position:'relative',overflow:'hidden'}}).inject(this.scrollbarVertical);this.buttonBottom=new Element('div',{'class':'button bottomButton',styles:{position:'relative'},events:{mousedown:this.startScrollingVertically.bind(this)}}).inject(this.scrollbarVertical);this.verticalKnob=new Element('div',{'class':'knob verticalKnob',styles:{position:'absolute',top:0,left:0}}).inject(this.verticalScrollable);if(Browser.Engine.trident4){this.verticalKnob.set('id','verticalKnob')}this.vKnobTop=new Element('div',{'class':'knobVerticalTip topTip',styles:{width:'100%'}}).inject(this.verticalKnob);this.vKnobFill=new Element('div',{'class':'knobVerticalFill',styles:{width:'100%'}}).inject(this.verticalKnob);this.vKnobBottom=new Element('div',{'class':'knobVerticalTip bottomTip',styles:{width:'100%'}}).inject(this.verticalKnob);this.scrollbarHorizontal=new Element('div',{'class':'bar',styles:{width:'100%',position:'absolute',padding:0,margin:0,left:0,bottom:0,visibility:'hidden'}});this.buttonLeft=new Element('div',{'class':'button leftButton',styles:{position:'relative','float':'left'},events:{mousedown:this.startScrollingHorizontally.bindWithEvent(this,true)}}).inject(this.scrollbarHorizontal);this.horizontalScrollable=new Element('div',{'class':'scrollable',styles:{position:'relative',overflow:'hidden','float':'left'}}).inject(this.scrollbarHorizontal);this.buttonRight=new Element('div',{'class':'button rightButton',styles:{position:'relative','float':'left'},events:{mousedown:this.startScrollingHorizontally.bind(this)}}).inject(this.scrollbarHorizontal);this.horizontalKnob=new Element('div',{'class':'knob horizontalKnob',styles:{position:'absolute',top:0,left:0}}).inject(this.horizontalScrollable);this.hKnobLeft=new Element('div',{'class':'knobHorizontalTip leftTip',styles:{height:'100%'}}).inject(this.horizontalKnob);this.hKnobRight=new Element('div',{'class':'knobHorizontalTip rightTip',styles:{height:'100%'}}).inject(this.horizontalKnob);this.hKnobFill=new Element('div',{'class':'knobHorizontalFill',styles:{height:'100%'}}).inject(this.horizontalKnob);var b=new Element('div',{styles:{height:0,width:0,clear:'left'}}).inject(this.scrollbarHorizontal);this.corner=new Element('div',{'class':'corner',styles:{position:'absolute',bottom:0,right:0,display:'none'}});$$(this.buttonTop,this.buttonBottom,this.buttonLeft,this.buttonRight,this.horizontalKnob,this.horizontalScrollable,this.verticalScrollable,this.verticalKnob,this.corner,b).setStyles({lineHeight:0,fontSize:0});this.scrollbarVertical.inject(this.wrapper);this.width=this.scrollbarVertical.getSize().x;this.scrollbarVertical.setStyles({display:'none',visibility:''});this.scrollbarHorizontal.inject(this.wrapper);this.height=this.scrollbarHorizontal.getSize().y;this.scrollbarHorizontal.setStyles({display:'none',visibility:''});this.el.setStyles({marginRight:this.width,height:this.dimensions.y-this.height-this.border-this.paddingBottom,width:(Browser.Engine.trident4?this.dimensions.x-this.width-this.border:"auto")});this.corner.inject(this.wrapper).setStyles({width:this.width-2*this.corner.getStyle('borderWidth').toInt(),height:this.height-2*this.corner.getStyle('borderWidth').toInt()});this.mouseEvent=this.mouseWheel.bind(this)},update:function(){$$(this.verticalScrollable,this.verticalKnob,this.horizontalScrollable,this.horizontalKnob).removeEvents();this.scrollSize=this.el.getScrollSize();if(this.scrollSize.y>this.dimensions.y){if(this.scrollbarVertical.getStyle('display')!='block'){this.el.addEvent('mousewheel',this.mouseEvent);this.scrollbarVertical.setStyle('display','block')}this.scrollHeight=this.dimensions.y-(this.scrollSize.x>this.dimensions.x?3:2)*(this.height+this.scrollbarVertical.getStyle('border-width').toInt());this.verticalScrollable.setStyle('height',this.scrollHeight);this.el.setStyle('margin-right',this.width);var a=Math.max((this.dimensions.y*this.scrollHeight/this.scrollSize.y).toInt(),this.height);this.verticalKnob.setStyle('height',a);this.vscroll=new Slider(this.verticalScrollable,this.verticalKnob,{mode:'vertical',range:[0,this.scrollSize.y-this.dimensions.y+this.height+this.paddingBottom+this.paddingTop],steps:this.scrollSize.y-this.dimensions.y+this.height+this.paddingBottom+this.paddingTop,onChange:this.scrollToVerticalPosition.bind(this),onTick:this.tick}).set(this.el.getScroll().y).fireEvent('onComplete')}else if(this.scrollbarVertical.getStyle('display')!='none'){this.scrollbarVertical.setStyle('display','none');this.el.setStyle('margin-right',0);this.el.removeEvent('mousewheel',this.mouseEvent).scrollTo(this.el.getScroll().x,0)}if(this.scrollSize.x>this.dimensions.x){if(this.scrollbarHorizontal.getStyle('display')!='block'){this.scrollbarHorizontal.setStyle('display','block')}this.scrollWidth=this.dimensions.x-(this.scrollSize.y>this.dimensions.y?3:2)*(this.width+this.scrollbarHorizontal.getStyle('border-width').toInt());this.horizontalScrollable.setStyle('width',this.scrollWidth);this.el.setStyle('height',this.dimensions.y-this.height-this.paddingBottom-this.paddingTop);var a=Math.max((this.dimensions.x*this.scrollWidth/this.scrollSize.x).toInt(),this.width);this.horizontalKnob.setStyle('width',a);this.hscroll=new Slider(this.horizontalScrollable,this.horizontalKnob,{mode:'horizontal',range:[0,this.scrollSize.x+this.width-this.dimensions.x+this.paddingRight],steps:this.scrollSize.x+this.width-this.dimensions.x+this.paddingRight,onChange:this.scrollToHorizontalPosition.bind(this),onTick:this.tick}).set(this.el.getScroll().x)}else if(this.scrollbarHorizontal.getStyle('display')!='none'){this.scrollbarHorizontal.setStyle('display','none');this.el.setStyle('height',this.dimensions.y-this.paddingBottom-this.paddingTop);this.el.scrollTo(0,this.el.getScroll().y)}if(this.scrollSize.y>this.dimensions.y&&this.scrollSize.x>this.dimensions.x){this.corner.setStyle('display','block')}else{this.corner.setStyle('display','none')}this.stopScrolling()},scrollToHorizontalPosition:function(a){this.el.scrollTo(a,this.el.getScroll().y)},scrollToVerticalPosition:function(a){this.el.scrollTo(this.el.getScroll().x,a)},startScrollingVertically:function(e,a){e.stop();$clear(this.periodScroll);if(a){this.buttonTop.addClass('active');this.periodScroll=this.scrollVertical.periodical(20,this,-5)}else{this.buttonBottom.addClass('active');this.periodScroll=this.scrollVertical.periodical(20,this,5)}},startScrollingHorizontally:function(e,a){e.stop();$clear(this.periodScroll);if(a){this.buttonLeft.addClass('active');this.periodScroll=this.scrollHorizontal.periodical(20,this,-5)}else{this.buttonRight.addClass('active');this.periodScroll=this.scrollHorizontal.periodical(20,this,5)}},stopScrolling:function(){$$(this.buttonBottom,this.buttonTop,this.buttonLeft,this.buttonRight,this.verticalKnob,this.horizontalKnob).removeClass('active');$clear(this.periodScroll)},scrollVertical:function(a){this.vscroll.set(this.vscroll.step+a)},scrollHorizontal:function(a){this.hscroll.set(this.hscroll.step+a)},mouseWheel:function(e){e.stop();this.scrollVertical(e.wheel<=0?20:-20);this.verticalKnob.removeClass('active')},tick:function(a){this.knob.setStyle(this.property,a)}});Slider.implement({clickedElement:function(a){this.knob.addClass('active');if($(a.target)==this.element){var b=this.range<0?-1:1;var c=a.page[this.axis]-this.element.getPosition()[this.axis]-this.half;c=c.limit(-this.options.offset,this.full-this.options.offset);this.step=Math.round(this.min+b*this.toStep(c));this.checkStep();this.end();this.fireEvent('tick',c)}}});