<?php

// Using hooks is absolutely the smartest, most bulletproof way to implement things like plugins,
// custom design elements, and ads. You can add your hook calls below, and they should take the 
// following form:
// add_action('thesis_hook_name', 'function_name');
// The function you name above will run at the location of the specified hook. The example
// hook below demonstrates how you can insert Thesis' default recent posts widget above
// the content in Sidebar 1:
// add_action('thesis_hook_before_sidebar_1', 'thesis_widget_recent_posts');

// Delete this line, including the dashes to the left, and add your hooks in its place.

/**
 * function custom_bookmark_links() - outputs an HTML list of bookmarking links
 * NOTE: This only works when called from inside the WordPress loop!
 * SECOND NOTE: This is really just a sample function to show you how to use custom functions!
 *
 * @since 1.0
 * @global object $post
*/
function custom_bookmark_links() {
	global $post;
?>
<ul class="bookmark_links">
	<li><a rel="nofollow" href="http://delicious.com/save?url=<?php urlencode(the_permalink()); ?>&amp;title=<?php urlencode(the_title()); ?>" onclick="window.open('http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url=<?php urlencode(the_permalink()); ?>&amp;title=<?php urlencode(the_title()); ?>', 'delicious', 'toolbar=no,width=550,height=550'); return false;" title="Bookmark this post on del.icio.us">Bookmark this article on Delicious</a></li>
</ul>
<?php
}


/*****************************************************************************/
/* CUSTOM Dennison+Wolfe FOOTER HOOK */

remove_action('thesis_hook_footer', 'thesis_attribution');
function add_custom_footer () { ?>

<div class="footer_container">
	<div id="footer-left">
		Content &#169; <?php echo date("Y"); ?> The Libbey Bowl  |  All Rights Reserved
	</div>
	<div id="footer-right">
		<a href="http://www.dennisonwolfe.com" title="Dennison+Wolfe Internet Group" target="_blank">Design and Development</a> by Dennison+Wolfe Internet Group 
	</div>
</div>
<div class="footer_bg">&nbsp;</div>
<?php }

add_action('thesis_hook_footer', 'add_custom_footer');

/*****************************************************************************/
/* CUSTOM HEADER FOR IMAGES */

remove_action('thesis_hook_header', 'thesis_attribution');
function add_custom_header () { ?>

<!-- 
<div class="headertop">
<div class="back">
<a href="/about-us/photos/past/" target="_self"><img alt="Polaroid image of our past" border="0" src="<?php bloginfo('url'); ?>/wp-content/themes/thesis_16/custom/images/header_01.png"></a>
</div>
<div class="back">
<a href="/about-us/photos/libbey-bowl-present/" target="_self"><img alt="Polaroid image of our past" border="0" src="<?php bloginfo('url'); ?>/wp-content/themes/thesis_16/custom/images/header_02.png"></a>
</div>
<div class="back">
<a href="/about-us/ojai-valley-service-foundation/" target="_self"><img alt="Polaroid image of our past" border="0" src="<?php bloginfo('url'); ?>/wp-content/themes/thesis_16/custom/images/header_03.png"></a>
</div>
<div class="back">
<a href="/the-project/" target="_self"><img alt="Polaroid image of our past" border="0" src="<?php bloginfo('url'); ?>/wp-content/themes/thesis_16/custom/images/header_04.png"></a>
</div>


</div>
 -->

<div class="slideshow">
<div class="swfobject" id="so8_1" style="width:1045px; height:330px;">
<p>The <a href="http://www.macromedia.com/go/getflashplayer" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','www.macromedia.com']);">Flash Player</a> and <a href="http://www.mozilla.com/firefox/" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','www.mozilla.com']);">a browser with Javascript support</a> are needed..</p>
</div></div>
<script type="text/javascript" defer="defer">
var so8_1 = {
	params : {
		wmode : "opaque",
		allowfullscreen : "true"},
	flashvars : {
		file : "http://libbeybowl.org/wp-content/plugins/nextgen-gallery/xml/imagerotator.php?gid=8",
		linkfromdisplay : "true",
		shownavigation : "false",
		showicons : "false",
		overstretch : "true",
		backcolor : "0x000000",
		frontcolor : "0xFFFFFF",
		lightcolor : "0xCC0000",
		width : "1045",
		height : "330"},
	attr : {
		styleclass : "slideshow",
		name : "so8"},
	start : function() {
		swfobject.embedSWF("http://libbeybowl.org/wp-content/uploads/imagerotator.swf", "so8_1", "1045", "3300", "7.0.0", false, this.flashvars, this.params , this.attr );
	}
}
so8_1.start();
</script>
<div class="ngg-clear"></div>
<div id="logotype">
<img src="http://libbeybowl.org/wp-content/uploads/2010/12/HomePageLogo.png" alt="">
</div>


<?php }

add_action('thesis_hook_before_html', 'add_custom_header');


/*****************************************************************************/
/* REMOVING WordPress STANDARD NAV BAR */

remove_action('thesis_hook_before_header', 'thesis_nav_menu');
add_action('thesis_hook_after_header', 'thesis_nav_menu');


/*****************************************************************************/
/* CUSTOM IMAGE BEFORE CONTENT */

function add_custom_image_before_content () { ?>
<?php
if(is_front_page()){
?>
<div align="center" id="image-before-content">
<a href="/the-project/"><img src="/images/home-theproject1.png" style="margin:10px 5px 0px 5px;"></a>t<a href="/blog/"><img src="/images/home-construction1.png"></a>
<a href="/the-project/upcoming-events/"><img src="/images/home-events1.png"></a><a href="/contribute/"><img src="/images/home-contribute1.png"></a>
<!-- <img src="/images/home-long-promo1.png"> -->
<!-- <a href="./"><img src="<?php bloginfo('url'); ?>/wp-content/themes/thesis_16/custom/images/before_content.jpg" border="0"></a> -->
<!-- **** New long images from Christopher Quiming 12-02-10 **** -->
<img src="/images/GalaSaveTheDate.png" style="margin:5px 0 5px 0;">
<img src="/images/HardHatTours.png" style="margin:5px 0 5px 0;">
</div>
<?php }}

add_action('thesis_hook_before_content', 'add_custom_image_before_content');


/*****************************************************************************/
/* CUSTOM IMAGE BEFORE SIDEBAR */

function add_custom_image_before_sidebar () { ?>

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="sidebar-donation-graphic"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="9785943"> <input type="image" src="<?php bloginfo('url'); ?>/wp-content/themes/thesis_16/custom/images/before_sidebars.jpg" border="0" name="submit" alt="Make a donation to help support LIbbey Bowl!"> <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"></form> 

<?php }

add_action('thesis_hook_before_sidebars', 'add_custom_image_before_sidebar');


/********* Custom 404 Hooks ************/
function custom_thesis_404_title() {
?>
You have reached a page that does not exist.
<?php
}
remove_action('thesis_hook_404_title', 'thesis_404_title');
add_action('thesis_hook_404_title', 'custom_thesis_404_title');

function custom_thesis_404_content() {
?>
<h1>Sorry about that!</h1>
<br>
<p>We recently redesigned our site, and there are a few missing links.</p>

<p>Please use the navigation above to find what you are looking for, or scroll down to the footer to see our latest blog posts.</p>


<?php
}

remove_action('thesis_hook_404_content', 'thesis_404_content');
add_action('thesis_hook_404_content', 'custom_thesis_404_content');



