diff --git a/wp-content/themes/hybrid-news/functions.php b/wp-content/themes/hybrid-news/functions.php index c93f4a500102c07d56d9905e1d9f7d211377c522..b74870d0d385b40c14c82312b29b43f8f298cafb 100644 --- a/wp-content/themes/hybrid-news/functions.php +++ b/wp-content/themes/hybrid-news/functions.php @@ -1,25 +1,44 @@ <?php /** - * Functions File + * This is your child theme functions file. In general, most PHP customizations should be placed within this + * file. Sometimes, you may have to overwrite a template file. However, you should consult the theme + * documentation and support forums before making a decision. In most cases, what you want to accomplish + * can be done from this file alone. This isn't a foreign practice introduced by parent/child themes. This is + * how WordPress works. By utilizing the functions.php file, you are both future-proofing your site and using + * a general best practice for coding. * - * This is your child theme's functions.php file. It is here for adding custom functions and - * setting up default functionality for this child theme. You are free to modify this file in - * any way you like. Note that if you change the functions already within this file, you run - * the risk of losing theme functionality. Alter the functions below only if you know what - * you're doing. + * All style/design changes should take place within your style.css file, not this one. + * + * The functions file can be your best friend or your worst enemy. Always double-check your code to make + * sure that you close everything that you open and that it works before uploading it to a live site. + * + * This program is free software; you can redistribute it and/or modify it under the terms of the GNU + * General Public License version 2, as published by the Free Software Foundation. You may NOT assume + * that you can use any other version of the GPL. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU General Public License along with this program; if not, write + * to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * @package HybridNews * @subpackage Functions + * @version 0.4.0 + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2011, Justin Tadlock + * @link http://themehybrid.com/themes/hybrid-news + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /* Set up the Hybrid News child theme and its default functionality. */ -add_action( 'after_setup_theme', 'hybrid_news_setup' ); +add_action( 'after_setup_theme', 'hybrid_news_setup', 11 ); /** * Adds all the default actions and filters to their appropriate hooks and sets up anything * else needed by the theme. * - * @since 0.3 + * @since 0.3.0 */ function hybrid_news_setup() { @@ -29,6 +48,9 @@ function hybrid_news_setup() { /* Load any translation files for the user. */ load_child_theme_textdomain( 'hybrid-news', get_stylesheet_directory() ); + /* Add support for the Cleaner Gallery extension. */ + add_theme_support( 'cleaner-gallery' ); + /* Register additional menus. */ add_action( 'init', 'hybrid_news_register_menus', 11 ); @@ -54,16 +76,13 @@ function hybrid_news_setup() { add_action( 'admin_menu', 'hybrid_news_create_meta_box' ); /* Save the theme settings meta box settings. */ - add_action( "{$prefix}_update_settings_page", 'hybrid_news_save_meta_box' ); - - /* Additional arguments for the post meta box of the parent theme. */ - add_filter( "{$prefix}_post_meta_box_args", 'hybrid_news_post_meta_box_args' ); + add_filter( "sanitize_option_{$prefix}_theme_settings", 'hybrid_news_save_meta_box' ); } /** * Registers additional nav menus for use with this theme. * - * @since 0.3 + * @since 0.3.0 */ function hybrid_news_register_menus() { register_nav_menu( 'secondary-menu', __( 'Secondary Menu', 'hybrid-news' ) ); @@ -72,7 +91,7 @@ function hybrid_news_register_menus() { /** * Loads the menu-secondary.php template, which displays the Secondary Menu. * - * @since 0.3 + * @since 0.3.0 */ function hybrid_news_get_secondary_menu() { locate_template( array( 'menu-secondary.php', 'menu.php' ), true ); @@ -81,17 +100,17 @@ function hybrid_news_get_secondary_menu() { /** * Register additional widget areas * - * @since 0.3 + * @since 0.3.0 */ function hybrid_news_register_sidebars() { - register_sidebar( array( 'name' => __( 'Tertiary', 'hybrid-news' ), 'id' => 'tertiary', 'before_widget' => '<div id="%1$s" class="widget %2$s widget-%2$s"><div class="widget-inside">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>' ) ); - register_sidebar( array( 'name' => __( 'Utility: Header', 'hybrid-news' ), 'id' => 'utilityheader', 'before_widget' => '<div id="%1$s" class="widget %2$s widget-%2$s"><div class="widget-inside">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>' ) ); + register_sidebar( array( 'name' => __( 'Tertiary', 'hybrid-news' ), 'id' => 'tertiary', 'before_widget' => '<div id="%1$s" class="widget %2$s widget-%2$s"><div class="widget-wrap widget-inside">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>' ) ); + register_sidebar( array( 'name' => __( 'Utility: Header', 'hybrid-news' ), 'id' => 'utilityheader', 'before_widget' => '<div id="%1$s" class="widget %2$s widget-%2$s"><div class="widget-wrap widget-inside">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>' ) ); } /** * Loads the sidebar-header.php template, which loads the Utility: Header sidebar. * - * @since 0.3 + * @since 0.3.0 */ function hybrid_news_get_utility_header() { get_sidebar( 'header' ); @@ -100,7 +119,7 @@ function hybrid_news_get_utility_header() { /** * Loads the sidebar-tertiary.php template, which displays the Tertiary sidebar. * - * @since 0.3 + * @since 0.3.0 */ function hybrid_news_get_tertiary() { get_sidebar( 'tertiary' ); @@ -110,7 +129,7 @@ function hybrid_news_get_tertiary() { * Adds JavaScript and CSS to Front Page page template. * Also removes the breadcrumb menu. * - * @since 0.3 + * @since 0.3.0 */ function hybrid_news_front_page_template() { @@ -125,60 +144,44 @@ function hybrid_news_front_page_template() { wp_enqueue_style( 'front-page', get_stylesheet_directory_uri() . '/css/front-page.css', false, '0.1', 'screen' ); /* Remove the breadcrumb trail. */ - remove_action( 'hybrid_before_content', 'hybrid_breadcrumb' ); + add_filter( 'breadcrumb_trail', '__return_false' ); } /** * Shows an author description after the post but before the comments section on * singular post views. * - * @since 0.3 + * @since 0.3.0 */ function hybrid_news_author_box() { ?> <div class="author-profile vcard"> - <?php echo get_avatar( get_the_author_email(), '96' ); ?> + <?php echo get_avatar( get_the_author_meta( 'email' ), '96' ); ?> <h4 class="author-name fn n"><?php the_author_posts_link(); ?></h4> - <?php the_author_meta( 'description' ); ?> + <?php echo wpautop( get_the_author_meta( 'description' ) ); ?> </div><?php } -/** - * Adds a medium/feature image setting to the post meta box. - * - * @since 0.3 - */ -function hybrid_news_post_meta_box_args( $meta_boxes ) { - $meta_boxes['medium'] = array( 'name' => 'Medium', 'default' => '', 'title' => __( 'Medium/Feature:', 'hybrid-news' ), 'type' => 'text', 'show_description' => false, 'description' => false ); - return $meta_boxes; -} - /** * Saves the theme settings for Hybrid News if the user has added any. * - * @since 0.3 + * @since 0.3.0 */ -function hybrid_news_save_meta_box() { - - /* Verify the nonce, so we know this is secure. */ - if ( !wp_verify_nonce( $_POST['front_page_meta_box_nonce'], basename( __FILE__ ) ) ) - return false; +function hybrid_news_save_meta_box( $settings ) { - $settings = get_option( 'hybrid_news_theme_settings' ); + $settings['feature_category'] = empty( $settings['feature_category'] ) ? '' : absint( $settings['feature_category'] ); + $settings['excerpt_category'] = empty( $settings['excerpt_category'] ) ? '' : absint( $settings['excerpt_category'] ); + $settings['feature_num_posts'] = empty( $settings['feature_num_posts'] ) ? 3 : absint( $settings['feature_num_posts'] ); + $settings['excerpt_num_posts'] = empty( $settings['excerpt_num_posts'] ) ? 3 : absint( $settings['excerpt_num_posts'] ); + $settings['headlines_num_posts'] = empty( $settings['headlines_num_posts'] ) ? 5 : absint( $settings['headlines_num_posts'] ); + $settings['headlines_category'] = empty( $settings['headlines_category'] ) || !is_array( $settings['headlines_category'] ) ? '' : $settings['headlines_category']; - $settings['feature_category'] = absint( $_POST['feature_category'] ); - $settings['excerpt_category'] = absint( $_POST['excerpt_category'] ); - $settings['feature_num_posts'] = absint( $_POST['feature_num_posts'] ); - $settings['excerpt_num_posts'] = absint( $_POST['excerpt_num_posts'] ); - $settings['headlines_num_posts'] = absint( $_POST['headlines_num_posts'] ); - $settings['headlines_category'] = (array)$_POST['headlines_category']; - - $updated = update_option( 'hybrid_news_theme_settings', $settings ); + return $settings; } /** * Adds a meta box to the theme settings page in the admin. * - * @since 0.3 + * @since 0.3.0 */ function hybrid_news_create_meta_box() { add_meta_box( 'hybrid-news-front-page-box', __( 'Front Page template settings', 'hybrid-news' ), 'hybrid_news_front_page_meta_box', 'appearance_page_theme-settings', 'normal', 'low' ); @@ -187,70 +190,67 @@ function hybrid_news_create_meta_box() { /** * Outputs the meta box and its form for the theme settings page. * - * @since 0.3 + * @since 0.3.0 */ function hybrid_news_front_page_meta_box() { - $categories = get_categories(); - $settings = get_option( 'hybrid_news_theme_settings' ); ?> - - <input type="hidden" name="front_page_meta_box_nonce" value="<?php echo wp_create_nonce( basename( __FILE__ ) ); ?>" /> + $categories = get_categories(); ?> <table class="form-table"> <tr> - <th><label for="feature_category"><?php _e( 'Feature Category:', 'hybrid-news' ); ?></label></th> + <th><label for="<?php echo hybrid_settings_field_id( 'feature_category' ); ?>"><?php _e( 'Feature Category:', 'hybrid-news' ); ?></label></th> <td> - <select id="feature_category" name="feature_category"> - <option value="" <?php selected( $settings['feature_category'], '' ); ?>></option> + <select id="<?php echo hybrid_settings_field_id( 'feature_category' ); ?>" name="<?php echo hybrid_settings_field_name( 'feature_category' ); ?>"> + <option value="" <?php selected( hybrid_get_setting( 'feature_category' ), '' ); ?>></option> <?php foreach ( $categories as $cat ) { ?> - <option value="<?php echo $cat->term_id; ?>" <?php selected( $settings['feature_category'], $cat->term_id ); ?>><?php echo esc_html( $cat->name ); ?></option> + <option value="<?php echo $cat->term_id; ?>" <?php selected( hybrid_get_setting( 'feature_category' ), $cat->term_id ); ?>><?php echo esc_html( $cat->name ); ?></option> <?php } ?> </select> <?php _e( 'Leave blank to use sticky posts.', 'hybrid-news' ); ?> </td> </tr> <tr> - <th><label for="feature_num_posts"><?php _e( 'Featured Posts:', 'hybrid-news' ); ?></label></th> + <th><label for="<?php echo hybrid_settings_field_id( 'feature_num_posts' ); ?>"><?php _e( 'Featured Posts:', 'hybrid-news' ); ?></label></th> <td> - <input type="text" id="feature_num_posts" name="feature_num_posts" value="<?php echo esc_attr( $settings['feature_num_posts'] ); ?>" size="2" maxlength="2" /> - <label for="feature_num_posts"><?php _e( 'How many feature posts should be shown?', 'hybrid-news' ); ?></label> + <input type="text" id="<?php echo hybrid_settings_field_id( 'feature_num_posts' ); ?>" name="<?php echo hybrid_settings_field_name( 'feature_num_posts' ); ?>" value="<?php echo esc_attr( hybrid_get_setting( 'feature_num_posts' ) ); ?>" size="2" maxlength="2" /> + <label for="<?php echo hybrid_settings_field_id( 'feature_num_posts' ); ?>"><?php _e( 'How many feature posts should be shown?', 'hybrid-news' ); ?></label> </td> </tr> <tr> - <th><label for="excerpt_category"><?php _e( 'Excerpts Category:', 'hybrid-news' ); ?></label></th> + <th><label for="<?php echo hybrid_settings_field_id( 'excerpt_category' ); ?>"><?php _e( 'Excerpts Category:', 'hybrid-news' ); ?></label></th> <td> - <select id="excerpt_category" name="excerpt_category"> - <option value="" <?php selected( $settings['excerpt_category'], '' ); ?>></option> - <?php foreach( $categories as $cat ) { ?> - <option value="<?php echo $cat->term_id; ?>" <?php selected( $settings['excerpt_category'], $cat->term_id ); ?>><?php echo esc_html( $cat->name ); ?></option> - <?php } ?> + <select id="<?php echo hybrid_settings_field_id( 'excerpt_category' ); ?>" name="<?php echo hybrid_settings_field_name( 'excerpt_category' ); ?>"> + <option value="" <?php selected( hybrid_get_setting( 'excerpt_category' ), '' ); ?>></option> + <?php foreach( $categories as $cat ) { ?> + <option value="<?php echo $cat->term_id; ?>" <?php selected( hybrid_get_setting( 'excerpt_category' ), $cat->term_id ); ?>><?php echo esc_html( $cat->name ); ?></option> + <?php } ?> </select> </td> </tr> <tr> - <th><label for="excerpt_num_posts"><?php _e( 'Excerpts Posts:', 'hybrid-news' ); ?></label></th> + <th><label for="<?php echo hybrid_settings_field_id( 'excerpt_num_posts' ); ?>"><?php _e( 'Excerpts Posts:', 'hybrid-news' ); ?></label></th> <td> - <input type="text" id="excerpt_num_posts" name="excerpt_num_posts" value="<?php echo esc_attr( $settings['excerpt_num_posts'] ); ?>" size="2" maxlength="2" /> - <label for="excerpt_num_posts"><?php _e('How many excerpts should be shown?', 'hybrid-news' ); ?></label> + <input type="text" id="<?php echo hybrid_settings_field_id( 'excerpt_num_posts' ); ?>" name="<?php echo hybrid_settings_field_name( 'excerpt_num_posts' ); ?>" value="<?php echo esc_attr( hybrid_get_setting( 'excerpt_num_posts' ) ); ?>" size="2" maxlength="2" /> + <label for="<?php echo hybrid_settings_field_id( 'excerpt_num_posts' ); ?>"><?php _e('How many excerpts should be shown?', 'hybrid-news' ); ?></label> </td> </tr> <tr> - <th><label for="headlines_category"><?php _e( 'Headline Categories:', 'hybrid-news' ); ?></label></th> + <th><label for="<?php echo hybrid_settings_field_id( 'headlines_category' ); ?>"><?php _e( 'Headline Categories:', 'hybrid-news' ); ?></label></th> <td> - <label for="headlines_category"><?php _e( 'Multiple categories may be chosen by holding the <code>Ctrl</code> key and selecting.', 'hybrid-news' ); ?></label> + <label for="<?php echo hybrid_settings_field_id( 'headlines_category' ); ?>"><?php _e( 'Multiple categories may be chosen by holding the <code>Ctrl</code> key and selecting.', 'hybrid-news' ); ?></label> <br /> - <select id="headlines_category" name="headlines_category[]" multiple="multiple" style="height:150px;"> + <select id="<?php echo hybrid_settings_field_id( 'headlines_category' ); ?>" name="<?php echo hybrid_settings_field_name( 'headlines_category' ); ?>[]" multiple="multiple" style="height:150px;"> <?php foreach( $categories as $cat ) { ?> - <option value="<?php echo $cat->term_id; ?>" <?php if( is_array( $settings['headlines_category'] ) && in_array( $cat->term_id, $settings['headlines_category'] ) ) echo ' selected="selected"'; ?>><?php echo esc_html( $cat->name ); ?></option> + <option value="<?php echo $cat->term_id; ?>" <?php if ( is_array( hybrid_get_setting( 'headlines_category' ) ) && in_array( $cat->term_id, hybrid_get_setting( 'headlines_category' ) ) ) echo ' selected="selected"'; ?>><?php echo esc_html( $cat->name ); ?></option> <?php } ?> </select> </td> </tr> <tr> - <th><label for="headlines_num_posts"><?php _e('Headlines Posts:', 'hybrid-news' ); ?></label></th> + <th><label for="<?php echo hybrid_settings_field_id( 'headlines_num_posts' ); ?>"><?php _e('Headlines Posts:', 'hybrid-news' ); ?></label></th> <td> - <input type="text" id="headlines_num_posts" name="headlines_num_posts" value="<?php echo esc_attr( $settings['headlines_num_posts'] ); ?>" size="2" maxlength="2" /> - <label for="headlines_num_posts"><?php _e( 'How many posts should be shown per headline category?', 'hybrid-news' ); ?></label> + <input type="text" id="<?php echo hybrid_settings_field_id( 'headlines_num_posts' ); ?>" name="<?php echo hybrid_settings_field_name( 'headlines_num_posts' ); ?>" value="<?php echo esc_attr( hybrid_get_setting( 'headlines_num_posts' ) ); ?>" size="2" maxlength="2" /> + <label for="<?php echo hybrid_settings_field_id( 'headlines_num_posts' ); ?>"><?php _e( 'How many posts should be shown per headline category?', 'hybrid-news' ); ?></label> </td> </tr> diff --git a/wp-content/themes/hybrid-news/js/jquery.cycle.js b/wp-content/themes/hybrid-news/js/jquery.cycle.js index d1d5b5afbefaaffe12431c565173a555f12183ac..83dcb1572d2d1046ace41fea7f1c453e9911b049 100644 --- a/wp-content/themes/hybrid-news/js/jquery.cycle.js +++ b/wp-content/themes/hybrid-news/js/jquery.cycle.js @@ -1,5 +1,28 @@ -eval(function(p,a,c,k,e,r){e=function(c){return(c<62?'':e(parseInt(c/62)))+((c=c%62)>35?String.fromCharCode(c+29):c.toString(36))};if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'([47-9yA-Z]|[12]\\w)'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';(4(j){8 u="2.30";8 t=j.21.22&&/MSIE 6.0/.1t(navigator.userAgent);4 r(){7(23.24&&23.24.2p){23.24.2p("[D] "+Array.prototype.join.call(2q,""))}}j.G.D=4(l){8 s=2q[1];Q A.1r(4(){7(l===undefined||l===R){l={}}7(l.25==2r){switch(l){26"stop":7(A.U){1u(A.U)}A.U=0;j(A).1C("D.1K","");Q;26"27":A.1h=1;Q;26"2s":A.1h=0;7(s===28){l=j(A).1C("D.1K");7(!l){r("2t 1n 2u, 2v 1n 2s");Q}7(A.U){1u(A.U);A.U=0}q(l.1L,l,1,1)}Q;default:l={fx:l}}}S{7(l.25==Number){8 i=l;l=j(A).1C("D.1K");7(!l){r("2t 1n 2u, 2v 1n advance 2w");Q}7(i<0||i>=l.1L.N){r("invalid 2w 1D: "+i);Q}l.P=i;7(A.U){1u(A.U);A.U=0}q(l.1L,l,1,i>=l.1b);Q}}7(A.U){1u(A.U)}A.U=0;A.1h=0;8 b=j(A);8 g=l.29?j(l.29,A):b.children();8 k=g.get();7(k.N<2){r("terminating; too few slides: "+k.N);Q}8 a=j.extend({},j.G.D.2x,l||{},j.2y?b.2y():j.meta?b.1C():{});7(a.2a){a.2b=a.2c||k.N}b.1C("D.1K",a);a.1v=A;a.1L=k;a.J=a.J?[a.J]:[];a.1k=a.1k?[a.1k]:[];a.1k.1M(4(){a.2d=0});7(a.1w){a.1k.L(4(){q(k,a,0,!a.1x)})}7(t&&a.1N&&!a.2z){h(g)}8 o=A.className;a.F=V((o.1E(/w:(\\d+)/)||[])[1])||a.F;a.E=V((o.1E(/h:(\\d+)/)||[])[1])||a.E;a.1c=V((o.1E(/t:(\\d+)/)||[])[1])||a.1c;7(b.y("1O")=="static"){b.y("1O","relative")}7(a.F){b.F(a.F)}7(a.E&&a.E!="1P"){b.E(a.E)}7(a.19){a.19=V(a.19)}7(a.1l){a.1p=[];1F(8 n=0;n<k.N;n++){a.1p.L(n)}a.1p.sort(4(e,f){Q Math.1l()-0.5});a.11=0;a.19=a.1p[0]}S{7(a.19>=k.N){a.19=0}}8 m=a.19||0;g.y({1O:"2A",B:0,9:0}).W().1r(4(e){8 f=m?e>=m?k.N-(e-m):m-e:k.N-e;j(A).y("z-1D",f)});j(k[m]).y("1i",1).X();7(j.21.22){k[m].2B.2C("2e")}7(a.1m&&a.F){g.F(a.F)}7(a.1m&&a.E&&a.E!="1P"){g.E(a.E)}7(a.27){b.2D(4(){A.1h=1},4(){A.1h=0})}8 v=j.G.D.O[a.fx];7(j.2E(v)){v(b,g,a)}S{7(a.fx!="2f"){r("unknown transition: "+a.fx)}}g.1r(4(){8 e=j(A);A.12=(a.1m&&a.E)?a.E:e.E();A.14=(a.1m&&a.F)?a.F:e.F()});a.C=a.C||{};a.K=a.K||{};a.I=a.I||{};g.1n(":eq("+m+")").y(a.C);7(a.1g){j(g[m]).y(a.1g)}7(a.1c){a.1c=V(a.1c);7(a.1a.25==2r){a.1a=j.fx.speeds[a.1a]||V(a.1a)}7(!a.1Q){a.1a=a.1a/2}while((a.1c-a.1a)<250){a.1c+=a.1a}}7(a.2h){a.1R=a.1S=a.2h}7(!a.1y){a.1y=a.1a}7(!a.1G){a.1G=a.1a}a.2F=k.N;a.1b=m;7(a.1l){a.P=a.1b;7(++a.11==k.N){a.11=0}a.P=a.1p[a.11]}S{a.P=a.19>=(k.N-1)?0:a.19+1}8 p=g[m];7(a.J.N){a.J[0].1T(p,[p,p,a,28])}7(a.1k.N>1){a.1k[1].1T(p,[p,p,a,28])}7(a.1H&&!a.1I){a.1I=a.1H}7(a.1I){j(a.1I).2i("1H",4(){Q w(k,a,a.1x?-1:1)})}7(a.2j){j(a.2j).2i("1H",4(){Q w(k,a,a.1x?1:-1)})}7(a.1q){x(k,a)}a.addSlide=4(e,f){8 c=j(e),d=c[0];7(!a.2c){a.2b++}k[f?"1M":"L"](d);7(a.1d){a.1d[f?"1M":"L"](d)}a.2F=k.N;c.y("1O","2A");c[f?"prependTo":"2G"](b);7(f){a.1b++;a.P++}7(t&&a.1N&&!a.2z){h(c)}7(a.1m&&a.F){c.F(a.F)}7(a.1m&&a.E&&a.E!="1P"){g.E(a.E)}d.12=(a.1m&&a.E)?a.E:c.E();d.14=(a.1m&&a.F)?a.F:c.F();c.y(a.C);7(a.1q){j.G.D.2k(k.N-1,d,j(a.1q),k,a)}7(1U a.Y=="4"){a.Y(c)}};7(a.1c||a.1w){A.U=1V(4(){q(k,a,0,!a.1x)},a.1w?10:a.1c+(a.2H||0))}})};4 q(c,d,i,b){7(d.2d){Q}8 g=d.1v,k=c[d.1b],a=c[d.P];7(g.U===0&&!i){Q}7(!i&&!g.1h&&((d.2a&&(--d.2b<=0))||(d.1W&&!d.1l&&d.P<d.1b))){7(d.2l){d.2l(d)}Q}7(i||!g.1h){7(d.J.N){j.1r(d.J,4(e,f){f.1T(a,[k,a,d,b])})}8 o=4(){7(j.21.22&&d.1N){A.2B.2C("2e")}j.1r(d.1k,4(e,f){f.1T(a,[k,a,d,b])})};7(d.P!=d.1b){d.2d=1;7(d.1X){d.1X(k,a,d,o,b)}S{7(j.2E(j.G.D[d.fx])){j.G.D[d.fx](k,a,d,o)}S{j.G.D.2f(k,a,d,o,i&&d.2I)}}}7(d.1l){d.1b=d.P;7(++d.11==c.N){d.11=0}d.P=d.1p[d.11]}S{8 n=(d.P+1)==c.N;d.P=n?0:d.P+1;d.1b=n?c.N-1:d.P-1}7(d.1q){j.G.D.2m(d.1q,d.1b)}}7(d.1c&&!d.1w){g.U=1V(4(){q(c,d,0,!d.1x)},d.1c)}S{7(d.1w&&g.1h){g.U=1V(4(){q(c,d,0,!d.1x)},10)}}}j.G.D.2m=4(e,f){j(e).find("a").removeClass("2J").2e("a:eq("+f+")").addClass("2J")};4 w(e,f,c){8 d=f.1v,i=d.U;7(i){1u(i);d.U=0}7(f.1l&&c<0){f.11--;7(--f.11==-2){f.11=e.N-2}S{7(f.11==-1){f.11=e.N-1}}f.P=f.1p[f.11]}S{7(f.1l){7(++f.11==e.N){f.11=0}f.P=f.1p[f.11]}S{f.P=f.1b+c;7(f.P<0){7(f.1W){Q 1Y}f.P=e.N-1}S{7(f.P>=e.N){7(f.1W){Q 1Y}f.P=0}}}}7(f.1Z&&1U f.1Z=="4"){f.1Z(c>0,f.P,e[f.P])}q(e,f,1,c>=0);Q 1Y}4 x(c,d){8 i=j(d.1q);j.1r(c,4(e,f){j.G.D.2k(e,f,i,c,d)});j.G.D.2m(d.1q,d.19)}j.G.D.2k=4(c,d,i,b,g){8 k=(1U g.2n=="4")?j(g.2n(c,d)):j(\'<a href="#">\'+(c+1)+"</a>");7(k.parents("body").N==0){k.2G(i)}k.2i(g.2K,4(){g.P=c;8 e=g.1v,f=e.U;7(f){1u(f);e.U=0}7(1U g.2o=="4"){g.2o(g.P,b[g.P])}q(b,g,1,g.1b<c);Q 1Y});7(g.2L){k.2D(4(){g.1v.1h=1},4(){g.1v.1h=0})}};4 h(d){4 i(e){8 e=V(e).toString(16);Q e.N<2?"0"+e:e}4 b(e){1F(;e&&e.nodeName.toLowerCase()!="html";e=e.parentNode){8 f=j.y(e,"2M-2N");7(f.indexOf("rgb")>=0){8 c=f.1E(/\\d+/g);Q"#"+i(c[0])+i(c[1])+i(c[2])}7(f&&f!="transparent"){Q f}}Q"#ffffff"}d.1r(4(){j(A).y("2M-2N",b(A))})}j.G.D.2f=4(e,f,c,d,i){8 b=j(e),g=j(f);g.y(c.C);8 k=i?1:c.1y;8 a=i?1:c.1G;8 o=i?R:c.1R;8 n=i?R:c.1S;8 m=4(){g.20(c.K,k,o,d)};b.20(c.I,a,n,4(){7(c.M){b.y(c.M)}7(!c.1Q){m()}});7(c.1Q){m()}};j.G.D.O={2O:4(f,c,d){c.1n(":eq("+d.19+")").y("1i",0);d.J.L(4(){j(A).X()});d.K={1i:1};d.I={1i:0};d.C={1i:0};d.M={T:"Z"};d.Y=4(e){e.W()}}};j.G.D.ver=4(){Q u};j.G.D.2x={fx:"2O",1c:4000,1w:0,1a:1000,1y:R,1G:R,1I:R,2j:R,1Z:R,1q:R,2o:R,2K:"1H",2n:R,J:R,1k:R,2l:R,2h:R,1R:R,1S:R,1J:R,K:R,I:R,C:R,M:R,1X:R,E:"1P",19:0,1Q:1,1l:0,1m:0,27:0,2L:0,2a:0,2c:0,2H:0,29:R,1N:0,1W:0,2I:0}})(2P);(4(h){h.G.D.O.scrollUp=4(d,i,b){d.y("18","1e");b.J.L(4(e,f,c){h(A).X();c.C.B=f.1z;c.I.B=0-e.1z});b.1g={B:0};b.K={B:0};b.M={T:"Z"}};h.G.D.O.scrollDown=4(d,i,b){d.y("18","1e");b.J.L(4(e,f,c){h(A).X();c.C.B=0-f.1z;c.I.B=e.1z});b.1g={B:0};b.K={B:0};b.M={T:"Z"}};h.G.D.O.scrollLeft=4(d,i,b){d.y("18","1e");b.J.L(4(e,f,c){h(A).X();c.C.9=f.1A;c.I.9=0-e.1A});b.1g={9:0};b.K={9:0}};h.G.D.O.scrollRight=4(d,i,b){d.y("18","1e");b.J.L(4(e,f,c){h(A).X();c.C.9=0-f.1A;c.I.9=e.1A});b.1g={9:0};b.K={9:0}};h.G.D.O.scrollHorz=4(g,k,a){g.y("18","1e").F();a.J.L(4(e,f,c,d){h(A).X();8 i=e.1A,b=f.1A;c.C=d?{9:b}:{9:-b};c.K.9=0;c.I.9=d?-i:i;k.1n(e).y(c.C)});a.1g={9:0};a.M={T:"Z"}};h.G.D.O.scrollVert=4(g,k,a){g.y("18","1e");a.J.L(4(e,f,c,d){h(A).X();8 i=e.1z,b=f.1z;c.C=d?{B:-b}:{B:b};c.K.B=0;c.I.B=d?i:-i;k.1n(e).y(c.C)});a.1g={B:0};a.M={T:"Z"}};h.G.D.O.slideX=4(d,i,b){b.J.L(4(e,f,c){h(e).y("H",1)});b.Y=4(e){e.W()};b.C={H:2};b.K={F:"X"};b.I={F:"W"}};h.G.D.O.slideY=4(d,i,b){b.J.L(4(e,f,c){h(e).y("H",1)});b.Y=4(e){e.W()};b.C={H:2};b.K={E:"X"};b.I={E:"W"}};h.G.D.O.1J=4(o,n,m){8 v=o.y("18","2Q").F();n.y({9:0,B:0});m.J.L(4(){h(A).X()});m.1a=m.1a/2;m.1l=0;m.1J=m.1J||{9:-v,B:15};m.1d=[];1F(8 p=0;p<n.N;p++){m.1d.L(n[p])}1F(8 p=0;p<m.19;p++){m.1d.L(m.1d.2R())}m.1X=4(d,i,b,g,k){8 a=k?h(d):h(i);a.20(b.1J,b.1y,b.1R,4(){k?b.1d.L(b.1d.2R()):b.1d.1M(b.1d.pop());7(k){1F(8 e=0,f=b.1d.N;e<f;e++){h(b.1d[e]).y("z-1D",f-e)}}S{8 c=h(d).y("z-1D");a.y("z-1D",V(c)+1)}a.20({9:0,B:0},b.1G,b.1S,4(){h(k?A:d).W();7(g){g()}})})};m.Y=4(e){e.W()}};h.G.D.O.turnUp=4(d,i,b){b.J.L(4(e,f,c){h(A).X();c.C.B=f.12;c.K.E=f.12});b.Y=4(e){e.W()};b.1g={B:0};b.C={E:0};b.K={B:0};b.I={E:0};b.M={T:"Z"}};h.G.D.O.turnDown=4(d,i,b){b.J.L(4(e,f,c){h(A).X();c.K.E=f.12;c.I.B=e.12});b.Y=4(e){e.W()};b.1g={B:0};b.C={B:0,E:0};b.I={E:0};b.M={T:"Z"}};h.G.D.O.turnLeft=4(d,i,b){b.J.L(4(e,f,c){h(A).X();c.C.9=f.14;c.K.F=f.14});b.Y=4(e){e.W()};b.C={F:0};b.K={9:0};b.I={F:0};b.M={T:"Z"}};h.G.D.O.turnRight=4(d,i,b){b.J.L(4(e,f,c){h(A).X();c.K.F=f.14;c.I.9=e.14});b.Y=4(e){e.W()};b.C={9:0,F:0};b.K={9:0};b.I={F:0};b.M={T:"Z"}};h.G.D.O.2S=4(d,i,b){b.1g={B:0,9:0};b.M={T:"Z"};b.J.L(4(e,f,c){h(A).X();c.C={F:0,E:0,B:f.12/2,9:f.14/2};c.M={T:"Z"};c.K={B:0,9:0,F:f.14,E:f.12};c.I={F:0,E:0,B:e.12/2,9:e.14/2};h(e).y("H",2);h(f).y("H",1)});b.Y=4(e){e.W()}};h.G.D.O.fadeZoom=4(d,i,b){b.J.L(4(e,f,c){c.C={F:0,E:0,1i:1,9:f.14/2,B:f.12/2,H:1};c.K={B:0,9:0,F:f.14,E:f.12}});b.I={1i:0};b.M={H:0}};h.G.D.O.blindX=4(d,i,b){8 g=d.y("18","1e").F();i.X();b.J.L(4(e,f,c){h(e).y("H",1)});b.C={9:g,H:2};b.M={H:1};b.K={9:0};b.I={9:g}};h.G.D.O.blindY=4(d,i,b){8 g=d.y("18","1e").E();i.X();b.J.L(4(e,f,c){h(e).y("H",1)});b.C={B:g,H:2};b.M={H:1};b.K={B:0};b.I={B:g}};h.G.D.O.blindZ=4(d,i,b){8 g=d.y("18","1e").E();8 k=d.F();i.X();b.J.L(4(e,f,c){h(e).y("H",1)});b.C={B:g,9:k,H:2};b.M={H:1};b.K={B:0,9:0};b.I={B:g,9:k}};h.G.D.O.growX=4(d,i,b){b.J.L(4(e,f,c){c.C={9:A.14/2,F:0,H:2};c.K={9:0,F:A.14};c.I={9:0};h(e).y("H",1)});b.Y=4(e){e.W().y("H",1)}};h.G.D.O.growY=4(d,i,b){b.J.L(4(e,f,c){c.C={B:A.12/2,E:0,H:2};c.K={B:0,E:A.12};c.I={B:0};h(e).y("H",1)});b.Y=4(e){e.W().y("H",1)}};h.G.D.O.curtainX=4(d,i,b){b.J.L(4(e,f,c){c.C={9:f.14/2,F:0,H:1,T:"1B"};c.K={9:0,F:A.14};c.I={9:e.14/2,F:0};h(e).y("H",2)});b.Y=4(e){e.W()};b.M={H:1,T:"Z"}};h.G.D.O.curtainY=4(d,i,b){b.J.L(4(e,f,c){c.C={B:f.12/2,E:0,H:1,T:"1B"};c.K={B:0,E:A.12};c.I={B:e.12/2,E:0};h(e).y("H",2)});b.Y=4(e){e.W()};b.M={H:1,T:"Z"}};h.G.D.O.cover=4(d,i,b){8 g=b.2T||"9";8 k=d.y("18","1e").F();8 a=d.E();b.J.L(4(e,f,c){c.C=c.C||{};c.C.H=2;c.C.T="1B";7(g=="2U"){c.C.9=-k}S{7(g=="up"){c.C.B=a}S{7(g=="2W"){c.C.B=-a}S{c.C.9=k}}}h(e).y("H",1)});7(!b.K){b.K={9:0,B:0}}7(!b.I){b.I={9:0,B:0}}b.M=b.M||{};b.M.H=2;b.M.T="Z"};h.G.D.O.uncover=4(d,i,b){8 g=b.2T||"9";8 k=d.y("18","1e").F();8 a=d.E();b.J.L(4(e,f,c){c.C.T="1B";7(g=="2U"){c.I.9=k}S{7(g=="up"){c.I.B=-a}S{7(g=="2W"){c.I.B=a}S{c.I.9=-k}}}h(e).y("H",2);h(f).y("H",1)});b.Y=4(e){e.W()};7(!b.K){b.K={9:0,B:0}}b.C=b.C||{};b.C.B=0;b.C.9=0;b.M=b.M||{};b.M.H=1;b.M.T="Z"};h.G.D.O.toss=4(d,i,b){8 g=d.y("18","2Q").F();8 k=d.E();b.J.L(4(e,f,c){h(e).y("H",2);c.C.T="1B";7(!c.I.9&&!c.I.B){c.I={9:g*2,B:-k/2,1i:0}}S{c.I.1i=0}});b.Y=4(e){e.W()};b.C={9:0,B:0,H:1,1i:1};b.K={9:0};b.M={H:2,T:"Z"}};h.G.D.O.wipe=4(v,p,l){8 s=v.y("18","1e").F();8 j=v.E();l.C=l.C||{};8 u;7(l.1j){7(/l2r/.1t(l.1j)){u="1s(1f 1f "+j+"px 1f)"}S{7(/r2l/.1t(l.1j)){u="1s(1f "+s+"px "+j+"px "+s+"px)"}S{7(/t2b/.1t(l.1j)){u="1s(1f "+s+"px 1f 1f)"}S{7(/b2t/.1t(l.1j)){u="1s("+j+"px "+s+"px "+j+"px 1f)"}S{7(/2S/.1t(l.1j)){8 t=V(j/2);8 r=V(s/2);u="1s("+t+"px "+r+"px "+t+"px "+r+"px)"}}}}}}l.C.1j=l.C.1j||u||"1s(1f 1f 1f 1f)";8 q=l.C.1j.1E(/(\\d+)/g);8 t=V(q[0]),w=V(q[1]),x=V(q[2]),r=V(q[3]);l.J.L(4(i,b,g){7(i==b){Q}8 k=h(i).y("H",2);8 a=h(b).y({H:3,T:"1B"});8 o=1,n=V((g.1y/13))-1;4 m(){8 e=t?t-V(o*(t/n)):0;8 f=r?r-V(o*(r/n)):0;8 c=x<j?x+V(o*((j-x)/n||1)):j;8 d=w<s?w+V(o*((s-w)/n||1)):s;a.y({1j:"1s("+e+"px "+d+"px "+c+"px "+f+"px)"});(o++<=n)?1V(m,13):k.y("T","Z")}m()});l.M={};l.K={9:0};l.I={9:0}}})(2P);',[],183,'||||function|||if|var|left|||||||||||||||||||||||||css||this|top|cssBefore|cycle|height|width|fn|zIndex|animOut|before|animIn|push|cssAfter|length|transitions|nextSlide|return|null|else|display|cycleTimeout|parseInt|hide|show|onAddSlide|none||randomIndex|cycleH||cycleW||||overflow|startingSlide|speed|currSlide|timeout|els|hidden|0px|cssFirst|cyclePause|opacity|clip|after|random|fit|not||randomMap|pager|each|rect|test|clearTimeout|container|continuous|rev|speedIn|offsetHeight|offsetWidth|block|data|index|match|for|speedOut|click|next|shuffle|opts|elements|unshift|cleartype|position|auto|sync|easeIn|easeOut|apply|typeof|setTimeout|nowrap|fxFn|false|prevNextClick|animate|browser|msie|window|console|constructor|case|pause|true|slideExpr|autostop|countdown|autostopCount|busy|filter|custom||easing|bind|prev|createPagerAnchor|end|updateActivePagerLink|pagerAnchorBuilder|pagerClick|log|arguments|String|resume|options|found|can|slide|defaults|metadata|cleartypeNoBg|absolute|style|removeAttribute|hover|isFunction|slideCount|appendTo|delay|fastOnEvent|activeSlide|pagerEvent|pauseOnPagerHover|background|color|fade|jQuery|visible|shift|zoom|direction|right||down'.split('|'),0,{})) +/* + * jQuery Cycle Plugin (with Transition Definitions) + * Examples and documentation at: http://jquery.malsup.com/cycle/ + * Copyright (c) 2007-2010 M. Alsup + * Version: 2.99 (12-MAR-2011) + * Dual licensed under the MIT and GPL licenses. + * http://jquery.malsup.com/license.html + * Requires: jQuery v1.3.2 or later + */ +(function($){var ver="2.99";if($.support==undefined){$.support={opacity:!($.browser.msie)};}function debug(s){$.fn.cycle.debug&&log(s);}function log(){window.console&&console.log&&console.log("[cycle] "+Array.prototype.join.call(arguments," "));}$.expr[":"].paused=function(el){return el.cyclePause;};$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};if(this.length===0&&options!="stop"){if(!$.isReady&&o.s){log("DOM not ready, queuing slideshow");$(function(){$(o.s,o.c).cycle(options,arg2);});return this;}log("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)"));return this;}return this.each(function(){var opts=handleArguments(this,options,arg2);if(opts===false){return;}opts.updateActivePagerLink=opts.updateActivePagerLink||$.fn.cycle.updateActivePagerLink;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);}this.cycleTimeout=this.cyclePause=0;var $cont=$(this);var $slides=opts.slideExpr?$(opts.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log("terminating; too few slides: "+els.length);return;}var opts2=buildOptions($cont,$slides,els,opts,o);if(opts2===false){return;}var startTime=opts2.continuous?10:getTimeout(els[opts2.currSlide],els[opts2.nextSlide],opts2,!opts2.backwards);if(startTime){startTime+=(opts2.delay||0);if(startTime<10){startTime=10;}debug("first timeout: "+startTime);this.cycleTimeout=setTimeout(function(){go(els,opts2,0,!opts.backwards);},startTime);}});};function handleArguments(cont,options,arg2){if(cont.cycleStop==undefined){cont.cycleStop=0;}if(options===undefined||options===null){options={};}if(options.constructor==String){switch(options){case"destroy":case"stop":var opts=$(cont).data("cycle.opts");if(!opts){return false;}cont.cycleStop++;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);}cont.cycleTimeout=0;$(cont).removeData("cycle.opts");if(options=="destroy"){destroy(opts);}return false;case"toggle":cont.cyclePause=(cont.cyclePause===1)?0:1;checkInstantResume(cont.cyclePause,arg2,cont);return false;case"pause":cont.cyclePause=1;return false;case"resume":cont.cyclePause=0;checkInstantResume(false,arg2,cont);return false;case"prev":case"next":var opts=$(cont).data("cycle.opts");if(!opts){log('options not found, "prev/next" ignored');return false;}$.fn.cycle[options](opts);return false;default:options={fx:options};}return options;}else{if(options.constructor==Number){var num=options;options=$(cont).data("cycle.opts");if(!options){log("options not found, can not advance slide");return false;}if(num<0||num>=options.elements.length){log("invalid slide index: "+num);return false;}options.nextSlide=num;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}if(typeof arg2=="string"){options.oneTimeFx=arg2;}go(options.elements,options,1,num>=options.currSlide);return false;}}return options;function checkInstantResume(isPaused,arg2,cont){if(!isPaused&&arg2===true){var options=$(cont).data("cycle.opts");if(!options){log("options not found, can not resume");return false;}if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}go(options.elements,options,1,!options.backwards);}}}function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter){try{el.style.removeAttribute("filter");}catch(smother){}}}function destroy(opts){if(opts.next){$(opts.next).unbind(opts.prevNextEvent);}if(opts.prev){$(opts.prev).unbind(opts.prevNextEvent);}if(opts.pager||opts.pagerAnchorBuilder){$.each(opts.pagerAnchors||[],function(){this.unbind().remove();});}opts.pagerAnchors=null;if(opts.destroy){opts.destroy(opts);}}function buildOptions($cont,$slides,els,options,o){var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop){opts.countdown=opts.autostopCount||els.length;}var cont=$cont[0];$cont.data("cycle.opts",opts);opts.$cont=$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];if(!$.support.opacity&&opts.cleartype){opts.after.push(function(){removeFilter(this,opts);});}if(opts.continuous){opts.after.push(function(){go(els,opts,0,!opts.backwards);});}saveOriginalOpts(opts);if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($slides);}if($cont.css("position")=="static"){$cont.css("position","relative");}if(opts.width){$cont.width(opts.width);}if(opts.height&&opts.height!="auto"){$cont.height(opts.height);}if(opts.startingSlide){opts.startingSlide=parseInt(opts.startingSlide);}else{if(opts.backwards){opts.startingSlide=els.length-1;}}if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++){opts.randomMap.push(i);}opts.randomMap.sort(function(a,b){return Math.random()-0.5;});opts.randomIndex=1;opts.startingSlide=opts.randomMap[1];}else{if(opts.startingSlide>=els.length){opts.startingSlide=0;}}opts.currSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:"absolute",top:0,left:0}).hide().each(function(i){var z;if(opts.backwards){z=first?i<=first?els.length+(i-first):first-i:els.length-i;}else{z=first?i>=first?els.length-(i-first):first-i:els.length-i;}$(this).css("z-index",z);});$(els[first]).css("opacity",1).show();removeFilter(els[first],opts);if(opts.fit&&opts.width){$slides.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}var reshape=opts.containerResize&&!$cont.innerHeight();if(reshape){var maxw=0,maxh=0;for(var j=0;j<els.length;j++){var $e=$(els[j]),e=$e[0],w=$e.outerWidth(),h=$e.outerHeight();if(!w){w=e.offsetWidth||e.width||$e.attr("width");}if(!h){h=e.offsetHeight||e.height||$e.attr("height");}maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh;}if(maxw>0&&maxh>0){$cont.css({width:maxw+"px",height:maxh+"px"});}}if(opts.pause){$cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});}if(supportMultiTransitions(opts)===false){return false;}var requeue=false;options.requeueAttempts=options.requeueAttempts||0;$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:($el.height()||this.offsetHeight||this.height||$el.attr("height")||0);this.cycleW=(opts.fit&&opts.width)?opts.width:($el.width()||this.offsetWidth||this.width||$el.attr("width")||0);if($el.is("img")){var loadingIE=($.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var loadingFF=($.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var loadingOp=($.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var loadingOther=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(loadingIE||loadingFF||loadingOp||loadingOther){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){$(o.s,o.c).cycle(options);},opts.requeueTimeout);requeue=true;return false;}else{log("could not determine size of image: "+this.src,this.cycleW,this.cycleH);}}}return true;});if(requeue){return false;}opts.cssBefore=opts.cssBefore||{};opts.cssAfter=opts.cssAfter||{};opts.cssFirst=opts.cssFirst||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(":eq("+first+")").css(opts.cssBefore);$($slides[first]).css(opts.cssFirst);if(opts.timeout){opts.timeout=parseInt(opts.timeout);if(opts.speed.constructor==String){opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed);}if(!opts.sync){opts.speed=opts.speed/2;}var buffer=opts.fx=="none"?0:opts.fx=="shuffle"?500:250;while((opts.timeout-opts.speed)<buffer){opts.timeout+=opts.speed;}}if(opts.easing){opts.easeIn=opts.easeOut=opts.easing;}if(!opts.speedIn){opts.speedIn=opts.speed;}if(!opts.speedOut){opts.speedOut=opts.speed;}opts.slideCount=els.length;opts.currSlide=opts.lastSlide=first;if(opts.random){if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.backwards){opts.nextSlide=opts.startingSlide==0?(els.length-1):opts.startingSlide-1;}else{opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;}}if(!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init)){init($cont,$slides,opts);}else{if(opts.fx!="custom"&&!opts.multiFx){log("unknown transition: "+opts.fx,"; slideshow terminating");return false;}}}var e0=$slides[first];if(opts.before.length){opts.before[0].apply(e0,[e0,e0,opts,true]);}if(opts.after.length){opts.after[0].apply(e0,[e0,e0,opts,true]);}if(opts.next){$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1);});}if(opts.prev){$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0);});}if(opts.pager||opts.pagerAnchorBuilder){buildPager(els,opts);}exposeAddSlide(opts,els);return opts;}function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=$.extend({},opts.cssBefore);opts.original.cssAfter=$.extend({},opts.cssAfter);opts.original.animIn=$.extend({},opts.animIn);opts.original.animOut=$.extend({},opts.animOut);$.each(opts.before,function(){opts.original.before.push(this);});$.each(opts.after,function(){opts.original.after.push(this);});}function supportMultiTransitions(opts){var i,tx,txs=$.fn.cycle.transitions;if(opts.fx.indexOf(",")>0){opts.multiFx=true;opts.fxs=opts.fx.replace(/\s*/g,"").split(",");for(i=0;i<opts.fxs.length;i++){var fx=opts.fxs[i];tx=txs[fx];if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){log("discarding unknown transition: ",fx);opts.fxs.splice(i,1);i--;}}if(!opts.fxs.length){log("No valid transitions named; slideshow terminating.");return false;}}else{if(opts.fx=="all"){opts.multiFx=true;opts.fxs=[];for(p in txs){tx=txs[p];if(txs.hasOwnProperty(p)&&$.isFunction(tx)){opts.fxs.push(p);}}}}if(opts.multiFx&&opts.randomizeEffects){var r1=Math.floor(Math.random()*20)+30;for(i=0;i<r1;i++){var r2=Math.floor(Math.random()*opts.fxs.length);opts.fxs.push(opts.fxs.splice(r2,1)[0]);}debug("randomized fx sequence: ",opts.fxs);}return true;}function exposeAddSlide(opts,els){opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount){opts.countdown++;}els[prepend?"unshift":"push"](s);if(opts.els){opts.els[prepend?"unshift":"push"](s);}opts.slideCount=els.length;$s.css("position","absolute");$s[prepend?"prependTo":"appendTo"](opts.$cont);if(prepend){opts.currSlide++;opts.nextSlide++;}if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($s);}if(opts.fit&&opts.width){$s.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$s.height(opts.height);}s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager||opts.pagerAnchorBuilder){$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);}if($.isFunction(opts.onAddSlide)){opts.onAddSlide($s);}else{$s.hide();}};}$.fn.cycle.resetState=function(opts,fx){fx=fx||opts.fx;opts.before=[];opts.after=[];opts.cssBefore=$.extend({},opts.original.cssBefore);opts.cssAfter=$.extend({},opts.original.cssAfter);opts.animIn=$.extend({},opts.original.animIn);opts.animOut=$.extend({},opts.original.animOut);opts.fxFn=null;$.each(opts.original.before,function(){opts.before.push(this);});$.each(opts.original.after,function(){opts.after.push(this);});var init=$.fn.cycle.transitions[fx];if($.isFunction(init)){init(opts.$cont,$(opts.elements),opts);}};function go(els,opts,manual,fwd){if(manual&&opts.busy&&opts.manualTrump){debug("manualTrump in go(), stopping active transition");$(els).stop(true,true);opts.busy=0;}if(opts.busy){debug("transition active, ignoring new tx request");return;}var p=opts.$cont[0],curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual){return;}if(!manual&&!p.cyclePause&&!opts.bounce&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))){if(opts.end){opts.end(opts);}return;}var changed=false;if((manual||!p.cyclePause)&&(opts.nextSlide!=opts.currSlide)){changed=true;var fx=opts.fx;curr.cycleH=curr.cycleH||$(curr).height();curr.cycleW=curr.cycleW||$(curr).width();next.cycleH=next.cycleH||$(next).height();next.cycleW=next.cycleW||$(next).width();if(opts.multiFx){if(opts.lastFx==undefined||++opts.lastFx>=opts.fxs.length){opts.lastFx=0;}fx=opts.fxs[opts.lastFx];opts.currFx=fx;}if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null;}$.fn.cycle.resetState(opts,fx);if(opts.before.length){$.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});}var after=function(){opts.busy=0;$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});};debug("tx firing("+fx+"); currSlide: "+opts.currSlide+"; nextSlide: "+opts.nextSlide);opts.busy=1;if(opts.fxFn){opts.fxFn(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}else{if($.isFunction($.fn.cycle[opts.fx])){$.fn.cycle[opts.fx](curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}else{$.fn.cycle.custom(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}}}if(changed||opts.nextSlide==opts.currSlide){opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];if(opts.nextSlide==opts.currSlide){opts.nextSlide=(opts.currSlide==opts.slideCount-1)?0:opts.currSlide+1;}}else{if(opts.backwards){var roll=(opts.nextSlide-1)<0;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=1;opts.currSlide=0;}else{opts.nextSlide=roll?(els.length-1):opts.nextSlide-1;opts.currSlide=roll?0:opts.nextSlide+1;}}else{var roll=(opts.nextSlide+1)==els.length;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=els.length-2;opts.currSlide=els.length-1;}else{opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1;}}}}if(changed&&opts.pager){opts.updateActivePagerLink(opts.pager,opts.currSlide,opts.activePagerClass);}var ms=0;if(opts.timeout&&!opts.continuous){ms=getTimeout(els[opts.currSlide],els[opts.nextSlide],opts,fwd);}else{if(opts.continuous&&p.cyclePause){ms=10;}}if(ms>0){p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.backwards);},ms);}}$.fn.cycle.updateActivePagerLink=function(pager,currSlide,clsName){$(pager).each(function(){$(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);});};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn.call(curr,curr,next,opts,fwd);while(opts.fx!="none"&&(t-opts.speed)<250){t+=opts.speed;}debug("calculated timeout: "+t+"; speed: "+opts.speed);if(t!==false){return t;}}return opts.timeout;}$.fn.cycle.next=function(opts){advance(opts,1);};$.fn.cycle.prev=function(opts){advance(opts,0);};function advance(opts,moveForward){var val=moveForward?1:-1;var els=opts.elements;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2){opts.randomIndex=els.length-2;}else{if(opts.randomIndex==-1){opts.randomIndex=els.length-1;}}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.random){opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap){return false;}opts.nextSlide=els.length-1;}else{if(opts.nextSlide>=els.length){if(opts.nowrap){return false;}opts.nextSlide=0;}}}}var cb=opts.onPrevNextEvent||opts.prevNextClick;if($.isFunction(cb)){cb(val>0,opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,moveForward);return false;}function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);});opts.updateActivePagerLink(opts.pager,opts.startingSlide,opts.activePagerClass);}$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a;if($.isFunction(opts.pagerAnchorBuilder)){a=opts.pagerAnchorBuilder(i,el);debug("pagerAnchorBuilder("+i+", el) returned: "+a);}else{a='<a href="#">'+(i+1)+"</a>";}if(!a){return;}var $a=$(a);if($a.parents("body").length===0){var arr=[];if($p.length>1){$p.each(function(){var $clone=$a.clone(true);$(this).append($clone);arr.push($clone[0]);});$a=$(arr);}else{$a.appendTo($p);}}opts.pagerAnchors=opts.pagerAnchors||[];opts.pagerAnchors.push($a);$a.bind(opts.pagerEvent,function(e){e.preventDefault();opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}var cb=opts.onPagerEvent||opts.pagerClick;if($.isFunction(cb)){cb(opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,opts.currSlide<i);});if(!/^click/.test(opts.pagerEvent)&&!opts.allowPagerClickBubble){$a.bind("click.cycle",function(){return false;});}if(opts.pauseOnPagerHover){$a.hover(function(){opts.$cont[0].cyclePause++;},function(){opts.$cont[0].cyclePause--;});}};$.fn.cycle.hopsFromLast=function(opts,fwd){var hops,l=opts.lastSlide,c=opts.currSlide;if(fwd){hops=c>l?c-l:opts.slideCount-l;}else{hops=c<l?l-c:l+opts.slideCount-c;}return hops;};function clearTypeFix($slides){debug("applying clearType background-color hack");function hex(s){s=parseInt(s).toString(16);return s.length<2?"0"+s:s;}function getBg(e){for(;e&&e.nodeName.toLowerCase()!="html";e=e.parentNode){var v=$.css(e,"background-color");if(v&&v.indexOf("rgb")>=0){var rgb=v.match(/\d+/g);return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2]);}if(v&&v!="transparent"){return v;}}return"#ffffff";}$slides.each(function(){$(this).css("background-color",getBg(this));});}$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide();if(typeof opts.cssBefore.opacity=="undefined"){opts.cssBefore.opacity=1;}opts.cssBefore.display="block";if(opts.slideResize&&w!==false&&next.cycleW>0){opts.cssBefore.width=next.cycleW;}if(opts.slideResize&&h!==false&&next.cycleH>0){opts.cssBefore.height=next.cycleH;}opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display="none";$(curr).css("zIndex",opts.slideCount+(rev===true?1:0));$(next).css("zIndex",opts.slideCount+(rev===true?0:1));};$.fn.cycle.custom=function(curr,next,opts,cb,fwd,speedOverride){var $l=$(curr),$n=$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut;$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=="number"){speedIn=speedOut=speedOverride;}else{speedIn=speedOut=1;}easeIn=easeOut=null;}var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,function(){cb();});};$l.animate(opts.animOut,speedOut,easeOut,function(){$l.css(opts.cssAfter);if(!opts.sync){fn();}});if(opts.sync){fn();}};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css("opacity",0);opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0;});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={top:0,left:0};}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={activePagerClass:"activeSlide",after:null,allowPagerClickBubble:false,animIn:null,animOut:null,autostop:0,autostopCount:0,backwards:false,before:null,cleartype:!$.support.opacity,cleartypeNoBg:false,containerResize:1,continuous:0,cssAfter:null,cssBefore:null,delay:0,easeIn:null,easeOut:null,easing:null,end:null,fastOnEvent:0,fit:0,fx:"fade",fxFn:null,height:"auto",manualTrump:true,next:null,nowrap:0,onPagerEvent:null,onPrevNextEvent:null,pager:null,pagerAnchorBuilder:null,pagerEvent:"click.cycle",pause:0,pauseOnPagerHover:0,prev:null,prevNextEvent:"click.cycle",random:0,randomizeEffects:1,requeueOnImageNotLoaded:true,requeueTimeout:250,rev:0,shuffle:null,slideExpr:null,slideResize:1,speed:1000,speedIn:null,speedOut:null,startingSlide:0,sync:1,timeout:4000,timeoutFn:null,updateActivePagerLink:null};})(jQuery); +/* + * jQuery Cycle Plugin Transition Definitions + * This script is a plugin for the jQuery Cycle Plugin + * Examples and documentation at: http://malsup.com/jquery/cycle/ + * Copyright (c) 2007-2010 M. Alsup + * Version: 2.73 + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + */ +(function($){$.fn.cycle.transitions.none=function($cont,$slides,opts){opts.fxFn=function(curr,next,opts,after){$(next).show();$(curr).hide();after();};};$.fn.cycle.transitions.fadeout=function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css({display:"block",opacity:1});opts.before.push(function(curr,next,opts,w,h,rev){$(curr).css("zIndex",opts.slideCount+(!rev===true?1:0));$(next).css("zIndex",opts.slideCount+(!rev===true?0:1));});opts.animIn.opacity=1;opts.animOut.opacity=0;opts.cssBefore.opacity=1;opts.cssBefore.display="block";opts.cssAfter.zIndex=0;};$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssBefore.top=h;opts.cssBefore.left=0;opts.cssFirst.top=0;opts.animIn.top=0;opts.animOut.top=-h;};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssFirst.top=0;opts.cssBefore.top=-h;opts.cssBefore.left=0;opts.animIn.top=0;opts.animOut.top=h;};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst.left=0;opts.cssBefore.left=w;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.left=0-w;};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst.left=0;opts.cssBefore.left=-w;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.left=w;};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts,fwd){if(opts.rev){fwd=!fwd;}$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.left=fwd?(next.cycleW-1):(1-next.cycleW);opts.animOut.left=fwd?-curr.cycleW:curr.cycleW;});opts.cssFirst.left=0;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.top=0;};$.fn.cycle.transitions.scrollVert=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push(function(curr,next,opts,fwd){if(opts.rev){fwd=!fwd;}$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.top=fwd?(1-next.cycleH):(next.cycleH-1);opts.animOut.top=fwd?curr.cycleH:-curr.cycleH;});opts.cssFirst.top=0;opts.cssBefore.left=0;opts.animIn.top=0;opts.animOut.left=0;};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;});opts.cssBefore.left=0;opts.cssBefore.top=0;opts.cssBefore.width=0;opts.animIn.width="show";opts.animOut.width=0;};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;});opts.cssBefore.left=0;opts.cssBefore.top=0;opts.cssBefore.height=0;opts.animIn.height="show";opts.animOut.height=0;};$.fn.cycle.transitions.shuffle=function($cont,$slides,opts){var i,w=$cont.css("overflow","visible").width();$slides.css({left:0,top:0});opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);});if(!opts.speedAdjusted){opts.speed=opts.speed/2;opts.speedAdjusted=true;}opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(i=0;i<$slides.length;i++){opts.els.push($slides[i]);}for(i=0;i<opts.currSlide;i++){opts.els.push(opts.els.shift());}opts.fxFn=function(curr,next,opts,cb,fwd){if(opts.rev){fwd=!fwd;}var $el=fwd?$(curr):$(next);$(next).css(opts.cssBefore);var count=opts.slideCount;$el.animate(opts.shuffle,opts.speedIn,opts.easeIn,function(){var hops=$.fn.cycle.hopsFromLast(opts,fwd);for(var k=0;k<hops;k++){fwd?opts.els.push(opts.els.shift()):opts.els.unshift(opts.els.pop());}if(fwd){for(var i=0,len=opts.els.length;i<len;i++){$(opts.els[i]).css("z-index",len-i+count);}}else{var z=$(curr).css("z-index");$el.css("z-index",parseInt(z)+1+count);}$el.animate({left:0,top:0},opts.speedOut,opts.easeOut,function(){$(fwd?this:curr).hide();if(cb){cb();}});});};$.extend(opts.cssBefore,{display:"block",opacity:1,top:0,left:0});};$.fn.cycle.transitions.turnUp=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=next.cycleH;opts.animIn.height=next.cycleH;opts.animOut.width=next.cycleW;});opts.cssFirst.top=0;opts.cssBefore.left=0;opts.cssBefore.height=0;opts.animIn.top=0;opts.animOut.height=0;};$.fn.cycle.transitions.turnDown=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssFirst.top=0;opts.cssBefore.left=0;opts.cssBefore.top=0;opts.cssBefore.height=0;opts.animOut.height=0;};$.fn.cycle.transitions.turnLeft=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=next.cycleW;opts.animIn.width=next.cycleW;});opts.cssBefore.top=0;opts.cssBefore.width=0;opts.animIn.left=0;opts.animOut.width=0;};$.fn.cycle.transitions.turnRight=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});$.extend(opts.cssBefore,{top:0,left:0,width:0});opts.animIn.left=0;opts.animOut.width=0;};$.fn.cycle.transitions.zoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false,true);opts.cssBefore.top=next.cycleH/2;opts.cssBefore.left=next.cycleW/2;$.extend(opts.animIn,{top:0,left:0,width:next.cycleW,height:next.cycleH});$.extend(opts.animOut,{width:0,height:0,top:curr.cycleH/2,left:curr.cycleW/2});});opts.cssFirst.top=0;opts.cssFirst.left=0;opts.cssBefore.width=0;opts.cssBefore.height=0;};$.fn.cycle.transitions.fadeZoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false);opts.cssBefore.left=next.cycleW/2;opts.cssBefore.top=next.cycleH/2;$.extend(opts.animIn,{top:0,left:0,width:next.cycleW,height:next.cycleH});});opts.cssBefore.width=0;opts.cssBefore.height=0;opts.animOut.opacity=0;};$.fn.cycle.transitions.blindX=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore.left=w;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.left=w;};$.fn.cycle.transitions.blindY=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore.top=h;opts.cssBefore.left=0;opts.animIn.top=0;opts.animOut.top=h;};$.fn.cycle.transitions.blindZ=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();var w=$cont.width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore.top=h;opts.cssBefore.left=w;opts.animIn.top=0;opts.animIn.left=0;opts.animOut.top=h;opts.animOut.left=w;};$.fn.cycle.transitions.growX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=this.cycleW/2;opts.animIn.left=0;opts.animIn.width=this.cycleW;opts.animOut.left=0;});opts.cssBefore.top=0;opts.cssBefore.width=0;};$.fn.cycle.transitions.growY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=this.cycleH/2;opts.animIn.top=0;opts.animIn.height=this.cycleH;opts.animOut.top=0;});opts.cssBefore.height=0;opts.cssBefore.left=0;};$.fn.cycle.transitions.curtainX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true,true);opts.cssBefore.left=next.cycleW/2;opts.animIn.left=0;opts.animIn.width=this.cycleW;opts.animOut.left=curr.cycleW/2;opts.animOut.width=0;});opts.cssBefore.top=0;opts.cssBefore.width=0;};$.fn.cycle.transitions.curtainY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false,true);opts.cssBefore.top=next.cycleH/2;opts.animIn.top=0;opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH/2;opts.animOut.height=0;});opts.cssBefore.height=0;opts.cssBefore.left=0;};$.fn.cycle.transitions.cover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);if(d=="right"){opts.cssBefore.left=-w;}else{if(d=="up"){opts.cssBefore.top=h;}else{if(d=="down"){opts.cssBefore.top=-h;}else{opts.cssBefore.left=w;}}}});opts.animIn.left=0;opts.animIn.top=0;opts.cssBefore.top=0;opts.cssBefore.left=0;};$.fn.cycle.transitions.uncover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(d=="right"){opts.animOut.left=w;}else{if(d=="up"){opts.animOut.top=-h;}else{if(d=="down"){opts.animOut.top=h;}else{opts.animOut.left=-w;}}}});opts.animIn.left=0;opts.animIn.top=0;opts.cssBefore.top=0;opts.cssBefore.left=0;};$.fn.cycle.transitions.toss=function($cont,$slides,opts){var w=$cont.css("overflow","visible").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(!opts.animOut.left&&!opts.animOut.top){$.extend(opts.animOut,{left:w*2,top:-h/2,opacity:0});}else{opts.animOut.opacity=0;}});opts.cssBefore.left=0;opts.cssBefore.top=0;opts.animIn.left=0;};$.fn.cycle.transitions.wipe=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.cssBefore=opts.cssBefore||{};var clip;if(opts.clip){if(/l2r/.test(opts.clip)){clip="rect(0px 0px "+h+"px 0px)";}else{if(/r2l/.test(opts.clip)){clip="rect(0px "+w+"px "+h+"px "+w+"px)";}else{if(/t2b/.test(opts.clip)){clip="rect(0px "+w+"px 0px 0px)";}else{if(/b2t/.test(opts.clip)){clip="rect("+h+"px "+w+"px "+h+"px 0px)";}else{if(/zoom/.test(opts.clip)){var top=parseInt(h/2);var left=parseInt(w/2);clip="rect("+top+"px "+left+"px "+top+"px "+left+"px)";}}}}}}opts.cssBefore.clip=opts.cssBefore.clip||clip||"rect(0px 0px 0px 0px)";var d=opts.cssBefore.clip.match(/(\d+)/g);var t=parseInt(d[0]),r=parseInt(d[1]),b=parseInt(d[2]),l=parseInt(d[3]);opts.before.push(function(curr,next,opts){if(curr==next){return;}var $curr=$(curr),$next=$(next);$.fn.cycle.commonReset(curr,next,opts,true,true,false);opts.cssAfter.display="block";var step=1,count=parseInt((opts.speedIn/13))-1;(function f(){var tt=t?t-parseInt(step*(t/count)):0;var ll=l?l-parseInt(step*(l/count)):0;var bb=b<h?b+parseInt(step*((h-b)/count||1)):h;var rr=r<w?r+parseInt(step*((w-r)/count||1)):w;$next.css({clip:"rect("+tt+"px "+rr+"px "+bb+"px "+ll+"px)"});(step++<=count)?setTimeout(f,13):$curr.css("display","none");})();});$.extend(opts.cssBefore,{display:"block",opacity:1,top:0,left:0});opts.animIn={left:0};opts.animOut={left:0};};})(jQuery); +/** + * Hybrid News JavaScript for the jQuery Cycle plugin. + */ var $j = jQuery.noConflict(); $j(document).ready( @@ -11,8 +34,8 @@ $j(document).ready( prev: 'a.slider-prev', next: 'a.slider-next', //pause: 1, - timeout: 8000, - delay: -8000, + timeout: 6000, + delay: -4000, speed: 800 }); diff --git a/wp-content/themes/hybrid-news/languages/da_DK.mo b/wp-content/themes/hybrid-news/languages/da_DK.mo new file mode 100644 index 0000000000000000000000000000000000000000..ede5d5bfba6935d27faf657e7cabde03aed3c66f Binary files /dev/null and b/wp-content/themes/hybrid-news/languages/da_DK.mo differ diff --git a/wp-content/themes/hybrid-news/languages/da_DK.po b/wp-content/themes/hybrid-news/languages/da_DK.po new file mode 100644 index 0000000000000000000000000000000000000000..c93a899d481011b97a7f9d6681a318c208cdc8f5 --- /dev/null +++ b/wp-content/themes/hybrid-news/languages/da_DK.po @@ -0,0 +1,103 @@ +msgid "" +msgstr "" +"Project-Id-Version: Hybrid News Child Theme\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-07-06 18:36-0600\n" +"PO-Revision-Date: 2010-07-25 19:40+0100\n" +"Last-Translator: Thomas Clausen <thomas@trendminers.dk>\n" +"Language-Team: ThemeHybrid\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: _e;__;esc_attr_e;esc_attr__;esc_html_e;esc_html__;_x;_ex;esc_attr_x;esc_html_x;_n;_nx;_n_noop;_nx_noop\n" +"X-Poedit-Basepath: ../\n" +"X-Poedit-SearchPath-0: .\n" + +#: functions.php:69 +msgid "Secondary Menu" +msgstr "Sekundær menu" + +#: functions.php:87 +msgid "Tertiary" +msgstr "tertiær" + +#: functions.php:88 +msgid "Utility: Header" +msgstr "Utility: Header" + +#: functions.php:151 +msgid "Medium/Feature:" +msgstr "Medium/fremhævet:" + +#: functions.php:184 +msgid "Front Page template settings" +msgstr "Forside skabelonsindstillinger" + +#: functions.php:201 +msgid "Feature Category:" +msgstr "Fremhævet kategori:" + +#: functions.php:209 +msgid "Leave blank to use sticky posts." +msgstr "Efterlad blank, for at bruge klistre indlæg." + +#: functions.php:213 +msgid "Featured Posts:" +msgstr "Fremhævede indlæg:" + +#: functions.php:216 +msgid "How many feature posts should be shown?" +msgstr "Hvor mange fremhævede indlæg skal vises?" + +#: functions.php:220 +msgid "Excerpts Category:" +msgstr "Uddragskategori:" + +#: functions.php:231 +msgid "Excerpts Posts:" +msgstr "Uddragindlæg:" + +#: functions.php:234 +msgid "How many excerpts should be shown?" +msgstr "Hvor mange uddrag skal vises?" + +#: functions.php:238 +msgid "Headline Categories:" +msgstr "Overskriftskategorier:" + +#: functions.php:240 +msgid "Multiple categories may be chosen by holding the <code>Ctrl</code> key and selecting." +msgstr "Flere kategorier kan vælges ved at klikke på <code>Ctrl</code> og klikke på kategorierne." + +#: functions.php:250 +msgid "Headlines Posts:" +msgstr "Overskriftsindlæg:" + +#: functions.php:253 +msgid "How many posts should be shown per headline category?" +msgstr "Hvor mange overskriftsindlæg skal vises?" + +#: page-front-page.php:42 +msgid "Full Story »" +msgstr "Hele indlæget »" + +#: page-front-page.php:54 +msgid "Previous Post" +msgstr "Forrige indlæg" + +#: page-front-page.php:54 +msgid "Previous" +msgstr "Forrige" + +#: page-front-page.php:55 +msgid "Pause" +msgstr "Pause" + +#: page-front-page.php:56 +msgid "Next Post" +msgstr "Næste indlæg" + +#: page-front-page.php:56 +msgid "Next" +msgstr "Næste" + diff --git a/wp-content/themes/hybrid-news/page-front-page.php b/wp-content/themes/hybrid-news/page-front-page.php index 9f32dee0b3f1023cf9995ff990714f2d13002784..9dbbd6ff1c47c325912832fbf37ebddbd6a92b53 100644 --- a/wp-content/themes/hybrid-news/page-front-page.php +++ b/wp-content/themes/hybrid-news/page-front-page.php @@ -8,14 +8,11 @@ * @subpackage Template */ -/* Get the Hybrid News theme settings. */ -$hybrid_news = get_option( 'hybrid_news_theme_settings' ); - get_header(); ?> <div class="hfeed content"> - <?php hybrid_before_content(); // Before content hook ?> + <?php do_atomic( 'before_content' ); // Before content hook ?> <!-- Begin feature slider. --> <div id="slider-container"> @@ -23,10 +20,10 @@ get_header(); ?> <div id="slider"> <?php - if ( $hybrid_news['feature_category'] ) - $feature_query = array( 'cat' => $hybrid_news['feature_category'], 'showposts' => $hybrid_news['feature_num_posts'], 'caller_get_posts' => 1 ); + if ( hybrid_get_setting( 'feature_category' ) ) + $feature_query = array( 'cat' => hybrid_get_setting( 'feature_category' ), 'showposts' => hybrid_get_setting( 'feature_num_posts' ), 'ignore_sticky_posts' => true ); else - $feature_query = array( 'post__in' => get_option( 'sticky_posts' ), 'showposts' => $hybrid_news['feature_num_posts'] ); + $feature_query = array( 'post__in' => get_option( 'sticky_posts' ), 'showposts' => hybrid_get_setting( 'feature_num_posts' ) ); ?> <?php $loop = new WP_Query( $feature_query ); ?> @@ -35,16 +32,16 @@ get_header(); ?> <div class="<?php hybrid_entry_class( 'feature' ); ?>"> - <?php get_the_image( array( 'custom_key' => array( 'Medium', 'Feature Image' ), 'size' => 'medium' ) ); ?> + <?php get_the_image( array( 'meta_key' => array( 'Medium', 'Feature Image' ), 'size' => 'medium' ) ); ?> - <?php hybrid_before_entry(); ?> + <?php do_atomic( 'before_entry' ); ?> <div class="entry-summary"> <?php the_excerpt(); ?> - <a class="more-link" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php _e('Full Story »', 'news'); ?></a> + <a class="more-link" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php _e( 'Full Story »', 'hybrid-news' ); ?></a> </div> - <?php hybrid_after_entry(); ?> + <?php do_atomic( 'after_entry' ); ?> </div> @@ -64,21 +61,21 @@ get_header(); ?> <!-- Begin excerpts section. --> <div id="excerpts"> - <?php $loop = new WP_Query( array( 'cat' => $hybrid_news['excerpt_category'], 'showposts' => $hybrid_news['excerpt_num_posts'], 'caller_get_posts' => 1, 'post__not_in' => $do_not_duplicate ) ); ?> + <?php $loop = new WP_Query( array( 'cat' => hybrid_get_setting( 'excerpt_category' ), 'showposts' => hybrid_get_setting( 'excerpt_num_posts' ), 'ignore_sticky_posts' => true, 'post__not_in' => $do_not_duplicate ) ); ?> <?php while ( $loop->have_posts() ) : $loop->the_post(); $do_not_duplicate[] = $post->ID; ?> <div class="<?php hybrid_entry_class(); ?>"> - <?php get_the_image( array( 'custom_key' => array( 'Thumbnail' ), 'size' => 'thumbnail' ) ); ?> + <?php get_the_image( array( 'meta_key' => 'Thumbnail', 'size' => 'thumbnail' ) ); ?> - <?php hybrid_before_entry(); ?> + <?php do_atomic( 'before_entry' ); ?> <div class="entry-summary"> <?php the_excerpt(); ?> </div> - <?php hybrid_after_entry(); ?> + <?php do_atomic( 'after_entry' ); ?> </div> @@ -87,15 +84,17 @@ get_header(); ?> </div> <!-- End excerpts section. --> - <?php if ( !empty( $hybrid_news['headlines_category'] ) ) : $alt = 'odd'; ?> + <?php $categories = hybrid_get_setting( 'headlines_category' ); ?> + + <?php if ( !empty( $categories ) ) : $i = 0; $alt = 'odd'; ?> <!-- Begin category headlines section. --> <div id="headlines"> - <?php foreach ( $hybrid_news['headlines_category'] as $category ) : ?> + <?php foreach ( $categories as $category ) : ?> <?php $headlines = get_posts( array( - 'numberposts' => $hybrid_news['headlines_num_posts'], + 'numberposts' => hybrid_get_setting( 'headlines_num_posts' ), 'category' => $category, 'post__not_in' => $do_not_duplicate ) ); ?> @@ -127,9 +126,9 @@ get_header(); ?> <?php endif; // End check if headline categories were selected. ?> - <?php hybrid_after_singular(); // After singular hook ?> + <?php do_atomic( 'after_singular' ); // After singular hook ?> - <?php hybrid_after_content(); // After content hook ?> + <?php do_atomic( 'after_content' ); // After content hook ?> </div><!-- .content .hfeed --> diff --git a/wp-content/themes/hybrid-news/readme.html b/wp-content/themes/hybrid-news/readme.html index 14992593e22f7ce8c0dd2b13898403462c2aa8e0..5e8bd3e6ad31179628c2d627a2a476ff877ce6ee 100644 --- a/wp-content/themes/hybrid-news/readme.html +++ b/wp-content/themes/hybrid-news/readme.html @@ -14,7 +14,7 @@ <p><em>Hybrid News</em> is, quite simply, a news theme.</p> -<p>It is a child theme for the <a href="http://themehybrid.com/themes/hybrid" title="Hybrid WordPress theme">Hybrid theme framework</a>, which means you must have <em>Hybrid</em> installed to use <em>Hybrid News</em>. Don't worry. Just because it uses a framework doesn't mean it's complicated. It just means that your site will be a lot more powerful and all you have to do is have <em>Hybrid</em> installed.</p> +<p>It is a child theme for the <a href="http://themehybrid.com/themes/hybrid" title="Hybrid WordPress theme">Hybrid parent theme</a>, which means you must have <em>Hybrid</em> installed to use <em>Hybrid News</em>. Don't worry. Just because it uses a parent theme doesn't mean it's complicated. It just means that your site will be a lot more powerful and all you have to do is have <em>Hybrid</em> installed.</p> <p>Nothing more. Nothing less.</p> @@ -24,9 +24,9 @@ <p>When you write a page, scroll down toward the bottom of the <em>Write Page</em> panel and select the template of your choosing. You can also set this as your home page by going to <em>Settings > Reading</em> and choosing the page you added the template to as your front page.</p> -<p>You'll also want to add feature images and thumbnails to your posts to make them look good. For your convenience both of these are located under the <em>Hybrid Settings</em> meta box when you write a post. Of course, <em>Hybrid</em> has a built-in image script that will automatically include images for you (if you've attached an image).</p> +<p>You'll also want to add feature images and thumbnails to your posts to make them look good. You can upload these images using the standard WordPress "featured image" functionality. Of course, <em>Hybrid</em> has a built-in image script that will automatically include images for you (if you've attached an image).</p> -<p>The settings for this page template are located at <em>Appearance > Hybrid News</em>.</p> +<p>The settings for this page template are located at <em>Appearance > Hybrid Settings</em>.</p> <h2>Widgets</h2> @@ -49,7 +49,7 @@ <p><em>Hybrid News</em> is licensed under the <a href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html" title="GNU GPL">GNU General Public License</a>, version 2 (GPL).</p> -<p>Copyright © 2008 – 2010 Justin Tadlock, Theme Hybrid</p> +<p>Copyright © 2008 – 2011 Justin Tadlock, Theme Hybrid</p> </body> </html> \ No newline at end of file diff --git a/wp-content/themes/hybrid-news/style.css b/wp-content/themes/hybrid-news/style.css index 073f430888b78362ab26d993ad91bf7e0dc3a216..98c4b79e8e5ccf965fcf8034fa381f70acae0956 100644 --- a/wp-content/themes/hybrid-news/style.css +++ b/wp-content/themes/hybrid-news/style.css @@ -1,33 +1,28 @@ /** * Theme Name: Hybrid News * Theme URI: http://themehybrid.com/themes/hybrid-news - * Description: A news-style child theme of the Hybrid theme framework. - * Version: 0.3 + * Description: A news-style child theme of the Hybrid parent theme. + * Version: 0.4 * Author: Justin Tadlock * Author URI: http://justintadlock.com * Tags: blue, theme-options, threaded-comments, sticky-post, microformats, two-columns, three-columns, fixed-width * Template: hybrid + * License: GNU General Public License v2.0 + * License URI: http://www.gnu.org/licenses/gpl-2.0.html * - * Copyright (c) 2008 - 2010 Justin Tadlock. All rights reserved. + * Copyright (c) 2008 - 2011 Justin Tadlock. All rights reserved. * http://justintadlock.com - * - * Hybrid News is released under the GNU General Public License, version 2 (GPL). - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ /* Get base CSS */ @import url('../hybrid/library/css/20px.css'); -/* Get plugins CSS */ -@import url('../hybrid/library/css/plugins.css'); - /* Get drop-downs CSS */ @import url('../hybrid/library/css/drop-downs.css'); +/* Get gallery CSS */ +@import url('../hybrid/library/css/gallery.css'); + /* Get tabs CSS (uncomment below line if using the Hybrid Tabs plugin) */ /* @import url('css/tabs.css'); */ @@ -230,8 +225,9 @@ span.pullquote { /** * Images ************************************************/ -.post img { +.hentry img { max-width: 600px; + height: auto; } img.wp-smiley { @@ -486,6 +482,16 @@ img.wp-smiley { background: #2b526b; } +#primary-menu li.feed { + float: right; + border: none; + } +#primary-menu li.feed a { + padding: 7px 18px 6px 0; + background: url(images/feed-icon.png) no-repeat right 7px; + } + + /** * Container (content/primary/secondary) ************************************************/