Advertisement
Guest User

Untitled

a guest
May 13th, 2013
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. include('js/switcher.js')
  2. include('js/bgStretch.js')
  3. include('js/forms.js')
  4. include('js/jquery.fancybox-1.3.4.pack.js')
  5.  
  6. $(window).load(function(){
  7.     var nav=$('nav')
  8.         ,content=$('#content')
  9.         ,header=$('header')
  10.         ,h_inner=$('>.inner',header)
  11.         ,h1=$('header h1')
  12.         ,h1_span=$('>a>span',h1)
  13.         ,privacy=$('footer .privacy')
  14.         ,soc_ico=$('footer .soc-ico')
  15.         ,nav_a=$('>ul>li>a',nav)       
  16.         ,bgStretch=$('#bgStretch')
  17.         ,body=$('body')
  18.         ,glob=$('#glob')
  19.        
  20.     $('#media .cols a')
  21.         .fancybox()
  22.  
  23.  
  24.        
  25.        
  26.        
  27.     $('li>ul',nav).each(function(){
  28.         var ul=$(this).hide()
  29.             ,li=ul.parent()
  30.             ,a=$('>a',li)
  31.             ,tmr
  32.         li.children()
  33.             .on('mouseenter',function(){
  34.                 clearTimeout(tmr)
  35.                 li.addClass('_hover')
  36.                 ul
  37.                     .fadeIn()                  
  38.             })
  39.             .on('mouseleave',function(){
  40.                 tmr=setTimeout(function(){
  41.                     li.removeClass('_hover')
  42.                     ul
  43.                         .fadeOut()                     
  44.                 },400)
  45.             })
  46.     })
  47.    
  48.     header.add(h_inner).css({overflow:'visible'})
  49.    
  50.     $('.slogans')
  51.         .tabs(0)
  52.         .tabs({
  53.             actFu:function(_){
  54.                 if(_.prev)
  55.                     _.prev
  56.                         .stop()
  57.                         .fadeOut(function(){
  58.                             if(_.curr)
  59.                                 _.curr
  60.                                     .stop()
  61.                                     .fadeIn()
  62.                         })             
  63.             }
  64.         })
  65.        
  66.        
  67.     $('.slogans .prev,.slogans .next')
  68.         .click(function(){
  69.             $('.slogans').tabs($(this).is('.next')?'next':'prev')
  70.         })
  71.    
  72.     bgStretch
  73.         .bgStretch({
  74.             align:'center'
  75.         })
  76.    
  77.     content
  78.         .tabs({
  79.             empty:'#!/home'
  80.             ,actFu:function(_){
  81.                 if(_.prev)
  82.                     _.prev
  83.                         .stop()
  84.                         .css({
  85.                             top:_.prev.prop('offsetTop')
  86.                             ,marginTop:0
  87.                         })
  88.                         .animate({
  89.                             top:-522
  90.                             ,opacity:0
  91.                         },{
  92.                             duration:800
  93.                             ,easing:'easeInOutSine'
  94.                             ,complete:function(){
  95.                                 _.prev
  96.                                     .hide()
  97.                             }
  98.                         })
  99.                 if(_.curr)
  100.                     _.curr
  101.                         .stop()
  102.                         .css({
  103.                             top:glob.height()
  104.                             ,marginTop:0
  105.                         })
  106.                         .show()
  107.                         .animate({
  108.                             top:glob.height()/2-204
  109.                             ,opacity:1
  110.                         },{
  111.                             duration:800
  112.                             ,easing:'easeInOutSine'
  113.                             ,complete:function(){
  114.                                 _.curr
  115.                                     .css({
  116.                                         top:'50%'
  117.                                         ,marginTop:-204
  118.                                     })
  119.                             }
  120.                         })
  121.             }
  122.         })
  123.    
  124.     nav
  125.         .navs({
  126.             useHash:true
  127.             ,defHash:'#!/home'         
  128.         })
  129.         .navs(function(n,_){
  130.             if(n===_.defHash)
  131.                 show_splash()
  132.             else
  133.                 show_subpages()
  134.             if(n==='#!/mail')
  135.                 googleMap()
  136.             content.tabs(n)
  137.         })
  138.    
  139.     function show_splash(){
  140.         if(!show_subpages.ready)
  141.             return false
  142.         show_subpages.ready=false
  143.        
  144.         $('li>ul',nav).css({opacity:0})
  145.         header
  146.             .stop()
  147.             .animate({
  148.                 height:64
  149.             },{
  150.                 duration:600
  151.                 ,easing:'easeInOutSine'
  152.                 ,step:function(now){                   
  153.                     header.css({backgroundPosition:'0 -'+(179-now)+'px'})
  154.                     h_inner.height(now-1)
  155.                 }              
  156.             })
  157.        
  158.         nav_a
  159.             .stop()
  160.             .animate({
  161.                 height:63
  162.             },{
  163.                 duration:600
  164.                 ,easing:'easeInOutSine'
  165.             })
  166.  
  167.         $.when(nav_a).then(function(){
  168.             $('li>ul',nav).css({opacity:1})
  169.             nav.removeClass('-subpages')
  170.         })
  171.        
  172.         privacy
  173.             .stop()
  174.             .animate({
  175.                 marginLeft:-85
  176.                 ,left:'50%'
  177.             },{
  178.                 duration:600
  179.                 ,easing:'easeInOutSine'
  180.             })
  181.         soc_ico
  182.             .stop()
  183.             .animate({
  184.                 bottom:-32
  185.             },{
  186.                 duration:600
  187.                 ,easing:'easeInOutSine'
  188.             })
  189.         h1
  190.             .stop()
  191.             .animate({
  192.                 top:20
  193.             },{
  194.                 duration:600
  195.                 ,easing:'easeInOutSine'
  196.             })
  197.         h1_span
  198.             .stop()
  199.             .animate({
  200.                 left:37
  201.             },{
  202.                 duration:200
  203.                 ,easing:'easeInOutSine'
  204.             })
  205.             .animate({
  206.                 top:-5
  207.             },{
  208.                 duration:400
  209.                 ,easing:'easeInOutSine'
  210.             })
  211.         header.add(h_inner).css({overflow:'visible'})
  212.         $('.slogans')
  213.             .stop()
  214.             .animate({
  215.                 bottom:62
  216.             },{
  217.                 duration:400
  218.                 ,easing:'easeInOutSine'
  219.             })
  220.     }
  221.    
  222.     function show_subpages(){
  223.         if(show_subpages.ready)
  224.             return false
  225.         show_subpages.ready=true
  226.         $('li>ul',nav).css({opacity:0})
  227.         header
  228.             .stop()
  229.             .animate({
  230.                 height:179
  231.             },{
  232.                 duration:600
  233.                 ,easing:'easeInOutSine'
  234.                 ,step:function(now){
  235.                     header.css({backgroundPosition:'0 -'+(179-now)+'px'})
  236.                     h_inner.height(now-1)
  237.                 }              
  238.             })
  239.         header.add(h_inner).css({overflow:'visible'})
  240.         nav_a
  241.             .stop()
  242.             .css({overflow:'visible'})
  243.             .animate({
  244.                 height:75
  245.             },{
  246.                 duration:600
  247.                 ,easing:'easeInOutSine'
  248.             })
  249.        
  250.         $.when(nav_a).then(function(){
  251.             nav.addClass('-subpages')
  252.             $('li>ul',nav).css({opacity:1})
  253.         })
  254.        
  255.         privacy
  256.             .stop()
  257.             .animate({
  258.                 marginLeft:5
  259.                 ,left:'0%'
  260.             },{
  261.                 duration:600
  262.                 ,easing:'easeInOutSine'
  263.             })
  264.         soc_ico
  265.             .stop()
  266.             .animate({
  267.                 bottom:14
  268.             },{
  269.                 duration:600
  270.                 ,easing:'easeInOutSine'
  271.             })
  272.         h1
  273.             .stop()
  274.             .animate({
  275.                 top:78
  276.             },{
  277.                 duration:600
  278.                 ,easing:'easeInOutSine'
  279.             })
  280.         h1_span
  281.             .stop()
  282.             .animate({
  283.                 top:35
  284.             },{
  285.                 duration:400
  286.                 ,easing:'easeInOutSine'
  287.             })
  288.             .animate({
  289.                 left:0
  290.             },{
  291.                 duration:200
  292.                 ,easing:'easeInOutSine'
  293.             })
  294.         $('.slogans')
  295.             .stop()
  296.             .animate({
  297.                 bottom:-77
  298.             },{
  299.                 duration:400
  300.                 ,easing:'easeInOutSine'
  301.             })
  302.     }
  303.    
  304.     function googleMap(){
  305.         if(googleMap.ready)
  306.             return false
  307.         googleMap.ready=true
  308.         var cssPath='.google_map'
  309.             ,holder=$(cssPath)
  310.             ,src='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Brooklyn,+New+York,+NY,+United+States&aq=0&sll=37.0625,-95.677068&sspn=61.282355,146.513672&ie=UTF8&hq=&hnear=Brooklyn,+Kings,+New+York&ll=40.649974,-73.950005&spn=0.01628,0.025663&z=14&iwloc=A&output=embed'
  311.             ,str='<iframe class="blo" width="'+holder.width()+'" height="'+holder.height()+'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'+src+'"></iframe>'
  312.         holder.html(str)
  313.     }
  314.    
  315.     $.when($('#gspinner').fadeOut()).then(function(){
  316.         body.css({overflow:'auto'})
  317.     })
  318. })
  319.  
  320. ;(function($){var c=['DOMMouseScroll','mousewheel'];$.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var i=c.length;i;)this.addEventListener(c[--i],handler,false);else this.onmousewheel=handler},teardown:function(){if(this.removeEventListener)for(var i=c.length;i;)this.removeEventListener(c[--i],handler,false);else this.onmousewheel=null}};$.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}});function handler(a){var b=[].slice.call(arguments,1),delta=0,returnValue=true;a=$.event.fix(a||window.event);a.type="mousewheel";if(a.originalEvent.wheelDelta)delta=a.originalEvent.wheelDelta/120;if(a.originalEvent.detail)delta=-a.originalEvent.detail/3;b.unshift(a,delta);return $.event.handle.apply(this,b)}})(jQuery);
  321.  
  322. eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('h.i[\'V\']=h.i[\'y\'];h.M(h.i,{B:\'C\',y:9(x,t,b,c,d){6 h.i[h.i.B](x,t,b,c,d)},14:9(x,t,b,c,d){6 c*(t/=d)*t+b},C:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},12:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},Q:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},O:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},P:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},L:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},S:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},F:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},K:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*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9(x,t,b,c,d,s){e(s==w)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},Y:9(x,t,b,c,d,s){e(s==w)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},Z:9(x,t,b,c,d,s){e(s==w)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.D))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.D))+1)*t+s)+2)+b},z:9(x,t,b,c,d){6 c-h.i.r(x,d-t,0,c,d)+b},r:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.o*t*t)+b}m e(t<(2/2.k)){6 c*(7.o*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.o*(t-=(2.17/2.k))*t+.18)+b}m{6 c*(7.o*(t-=(2.19/2.k))*t+.1a)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.z(x,t*2,0,c,d)*.5+b;6 h.i.r(x,t*2-d,0,c,d)*.5+c*.5+b}});',62,74,'||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|5625||sqrt|easeOutBounce|||abs|asin|undefined||swing|easeInBounce|cos|def|easeOutQuad|525|easeInCirc|easeInQuint|easeOutCirc|easeInOutCirc|easeInElastic|easeOutQuint|easeInOutQuint|easeOutQuart|extend|easeInSine|easeInOutCubic|easeInQuart|easeOutCubic|easeOutSine|easeInOutQuart|easeOutElastic|easeInOutElastic|jswing|easeInBack|easeInOutSine|easeOutBack|easeInOutBack||easeInExpo|easeInCubic|easeInOutQuad|easeInQuad|easeOutExpo|easeInOutExpo|25|9375|625|984375|easeInOutBounce'.split('|'),0,{}))
  323.  
  324. ;(function(d){d.each(['backgroundColor','borderBottomColor','borderLeftColor','borderRightColor','borderTopColor','color','outlineColor'],function(i,b){d.fx.step[b]=function(a){if(a.state==0){a.start=getColor(a.elem,b);a.end=getRGB(a.end)}a.elem.style[b]="rgb("+[Math.max(Math.min(parseInt((a.pos*(a.end[0]-a.start[0]))+a.start[0]),255),0),Math.max(Math.min(parseInt((a.pos*(a.end[1]-a.start[1]))+a.start[1]),255),0),Math.max(Math.min(parseInt((a.pos*(a.end[2]-a.start[2]))+a.start[2]),255),0)].join(",")+")"}});function getRGB(a){var b;if(a&&a.constructor==Array&&a.length==3)return a;if(b=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(a))return[parseInt(b[1]),parseInt(b[2]),parseInt(b[3])];if(b=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(a))return[parseFloat(b[1])*2.55,parseFloat(b[2])*2.55,parseFloat(b[3])*2.55];if(b=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(a))return[parseInt(b[1],16),parseInt(b[2],16),parseInt(b[3],16)];if(b=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(a))return[parseInt(b[1]+b[1],16),parseInt(b[2]+b[2],16),parseInt(b[3]+b[3],16)];if(b=/rgba\(0, 0, 0, 0\)/.exec(a))return e['transparent'];return e[d.trim(a).toLowerCase()]}function getColor(a,b){var c;do{c=d.curCSS(a,b);if(c!=''&&c!='transparent'||d.nodeName(a,"body"))break;b="backgroundColor"}while(a=a.parentNode);return getRGB(c)};var e={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]}})(jQuery);
  325.  
  326. function include(url){document.write('<script type="text/javascript" src="'+url+'"></script>')}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement