Advertisement
Guest User

Untitled

a guest
Jan 18th, 2012
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.25 KB | None | 0 0
  1. <?php include '../../../../wp-load.php';
  2. header("Content-type: text/javascript"); ?>
  3.  
  4. <?php
  5.  
  6. $tz_slider_autostart = get_option('tz_slider_autostart');
  7. $tz_slider_delay = get_option('tz_slider_delay');
  8. ?>
  9.  
  10.  
  11. <?php ob_flush(); ?>
  12.  
  13. // Custom Javascript
  14.  
  15. jQuery(document).ready(function() {
  16.    
  17.     // Secondary Navigation
  18.     jQuery("ul.sf-menu").superfish({
  19.         delay: 500,
  20.         animation: {opacity:'show'},
  21.         speed: 200,
  22.         autoArrows: false,
  23.         dropShadows: false
  24.     });
  25.    
  26.     <?php // Second nav styling ?>
  27.     jQuery("#second_nav li li:first, #second_nav li li li:first, #second_nav li li li li:first").addClass('first');
  28.     jQuery("#second_nav li:last-child").addClass('last');
  29.    
  30.     <?php // Main nav styling ?>
  31.     jQuery("#nav li:first, #nav li li:first, #nav li li li:first, #nav li li li li:first").addClass('first');
  32.     jQuery("#nav li:last-child").addClass('last');
  33.    
  34.     <?php // Flickr styling ?>
  35.     jQuery("#sidebar .flickr div:nth-child(5), #sidebar .flickr div:nth-child(9), #sidebar .flickr div:nth-child(13)").addClass('last');
  36.     jQuery("#footer .flickr div:nth-child(4), #footer .flickr div:nth-child(7), #footer .flickr div:nth-child(10)").addClass('last');
  37.    
  38.     <?php // Tab styling ?>
  39.     jQuery(".tab li:last-child").addClass('last');
  40.    
  41.     <?php // Twtitter styling ?>
  42.     jQuery("#twitter_update_list li:last-child").addClass('last');
  43.     jQuery("#twitter_update_list li:first").addClass('first');
  44.    
  45.     <?php // Category list styling ?>
  46.     jQuery(".category_list li:last-child").addClass('last');
  47.    
  48.     <?php // Advert styling ?>
  49.     jQuery(".advert li:even").addClass('left');
  50.    
  51.     jQuery('.s').each(
  52.    
  53.         function() {
  54.            
  55.             if(jQuery(this).val() === '' || jQuery(this).val() === '<?php _e('to search, type and hit enter', 'framework'); ?>')
  56.             {
  57.                 jQuery(this).val('<?php _e('to search, type and hit enter', 'framework'); ?>');
  58.        
  59.                 jQuery(this).blur(
  60.                     function () {
  61.                        jQuery(this).val('<?php _e('to search, type and hit enter', 'framework'); ?>');
  62.                     });
  63.                    
  64.                 jQuery(this).focus(
  65.                     function () {
  66.                        jQuery(this).val('');
  67.                     });
  68.             }
  69.            
  70.         }
  71.        
  72.     );
  73.  
  74.    
  75.     // Main Navigation
  76.     jQuery('#nav ul.sf-menu').superfish({
  77.         delay: 200,
  78.         animation: {opacity:'show', height:'show'},
  79.         speed: 'fast',
  80.         autoArrows: false,
  81.         dropShadows: false
  82.     });
  83.    
  84.     // Coda Slider
  85.     jQuery('#coda-slider-1').codaSlider({
  86.         <?php if($tz_slider_autostart == 'true') : ?>
  87.         autoSlide: true,
  88.         autoSlideInterval: <?php echo $tz_slider_delay; ?>,
  89.         <?php endif; ?>
  90.         dynamicArrows: false,
  91.         dynamicTabs: false,
  92.         slideEaseDuration: 1000
  93.     });
  94.    
  95.     // Post Grid Tooltips
  96.     jQuery('.tooltip').poshytip({
  97.         className: 'tip-twitter',
  98.         showTimeout: 1,
  99.         alignTo: 'target',
  100.         alignX: 'center',
  101.         offsetY: 5,
  102.         allowTipHover: false,
  103.         fade: false,
  104.         slide: false
  105.     });
  106.    
  107.     // Tab Widget
  108.     jQuery(".tabs").tabs({
  109.         fx: { opacity: 'toggle' }
  110.     });
  111.  
  112.     // Opacity change for clicked thumbnails
  113.     jQuery('#slider_nav li a').click(
  114.         function () {
  115.             jQuery('#slider_nav li a').css('opacity', 0.5);
  116.             jQuery(this).css('opacity', 1);
  117.         }
  118.     );
  119.    
  120.     // Opacity change for hovered thumbnails
  121.     jQuery('#slider_nav li a').hover(
  122.         function () {
  123.             jQuery(this).not(".current").stop(true, true).animate({opacity: 1}, 300);
  124.         }, function () {
  125.             jQuery(this).not(".current").stop(true, true).animate({opacity: 0.5}, 300);
  126.         }
  127.     );
  128.    
  129.     // Input focus css change
  130.     jQuery('input').focus(
  131.         function () {
  132.             jQuery(this).css('border', '1px solid #d2d2d2');
  133.             jQuery(this).css('colo  r', '#444444');
  134.         }
  135.     );
  136.    
  137.     // Input blur css change
  138.     jQuery('input').blur(
  139.         function () {
  140.             jQuery(this).css({
  141.                 border: '1px solid #e0e0e0',
  142.                 color: '#999999'
  143.             });
  144.         }
  145.     );
  146.    
  147.     // Submit buttons
  148.     jQuery('#respond input.btn, #content button').hover(
  149.         function () {
  150.             jQuery(this).css({background: '#fff'});
  151.         }, function () {
  152.             jQuery(this).css({background: 'url(<?php echo get_template_directory_uri(); ?>/images/button_bg.gif) repeat-x'});
  153.         }
  154.     );
  155.  
  156. });
  157.  
  158. <?php ob_end_flush(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement