<?php

/**

* The main template file.

*

* @package WordPress

* @subpackage Kin

*/

/**

* Get all photos

**/

$page_bg_gallery_id = get_option('pp_home_cat');

$args = array(

'post_type' => 'attachment',

'numberposts' => -1,

'post_status' => null,

'post_parent' => $page_bg_gallery_id,

'order' => 'ASC',

'orderby' => 'menu_order',

);

$bg_photo_arr = get_posts( $args );

get_header(); ?>

<?php

if(!empty($bg_photo_arr))

{

?>

<!-- Begin content -->

<div id="content_wrapper">

<?php

$pp_gallery_height = 600;

?>

<div class="inner" style="height:<?php echo $pp_gallery_height; ?>px">

<input type="hidden" id="gallery_width" name="gallery_width" value="900"/>

<table width="100%" border="0" cellspacing="5" cellpadding="0">

<tr>

<td<a href="www.mysite.com"<img src="jb.spaceforgrowth.com_files/1-397x600.png" height="600" width="397"</a</td>

<td<a href="www.mysite.com"<img src="jb.spaceforgrowth.com_files/2-397x600.png" height="600" width="397"</a</td>

<td<a href="www.mysite.com"<img src="jb.spaceforgrowth.com_files/3-397x600.png" height="600" width="397"</a</td>

<td<a href="www.mysite.com"<img src="jb.spaceforgrowth.com_files/4-397x600.png" height="600" width="397"</a</td>

</tr>

</table>

</div>

<div id="move_prev"</div>

<div id="move_next"</div>

</div>

<!-- End content -->

<br class="clear"/<br/>

<div id="content_slider_wrapper"<div id="content_slider"</div</div>

<?php

}

?>

<?php

$pp_blog_display_social = get_option('pp_blog_display_social');

if(!empty($pp_blog_display_social)):

?>

<div class="post_social">

<!-- Place this tag where you want the +1 button to render -->

<g:plusone size="medium" href="<?php echo $page->guid; ?>"</g:plusone>

<!-- Place this render call where appropriate -->

<script type="text/javascript">

(function() {

var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;

po.src = 'https://apis.google.com/js/plusone.js';

var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);

})();

</script>

<iframe src="//www.facebook.com/plugins/like.php?href=<?php echo urlencode($page->guid); ?&amp;send=false&amp;layout=button_count&amp;width=200&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21&amp;appId=268239076529520" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true" class="facebook_button"</iframe>

<a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="<?php the_title(); ?>" data-url="<?php echo $page->guid; ?>">Tweet</a<script type="text/javascript" src="//platform.twitter.com/widgets.js"</script>

</div>

<br class="clear"/>

<?php

endif; ?>

<?php

$pp_homepage_music_m4a = get_option('pp_homepage_music_m4a');

$pp_homepage_music_ogg = get_option('pp_homepage_music_ogg');

$pp_homepage_music_mp3 = get_option('pp_homepage_music_mp3');

if(!empty($pp_homepage_music_m4a) & !empty($pp_homepage_music_mp3) & !empty($pp_homepage_music_ogg))

{

?>

<!-- Audio Player -->

<div id="jquery_jplayer_1"</div>

<div id="jp_interface_1">

<a href="#" class="jp-play">Play</a>

<a href="#" class="jp-pause">Pause</a>

</div>

<?php

}

?>

<script>

$j(document).ready(function() {

<?php

if(!empty($pp_homepage_music_m4a) & !empty($pp_homepage_music_mp3) & !empty($pp_homepage_music_ogg))

{

$pp_homepage_music_play_script = '';

$pp_homepage_music_play = get_option('pp_homepage_music_play');

if(!empty($pp_homepage_music_play))

{

$pp_homepage_music_play_script = '.jPlayer("play")';

}

?>

$j("#jquery_jplayer_1").jPlayer({

ready: function () {

$j(this).jPlayer("setMedia", {

mp3: "<?php echo THEMEUPLOADURL.$pp_homepage_music_mp3; ?>",

m4a: "<?php echo THEMEUPLOADURL.$pp_homepage_music_m4a; ?>",

oga: "<?php echo THEMEUPLOADURL.$pp_homepage_music_ogg; ?>",

end: ""

})<?php echo $pp_homepage_music_play_script; ?>

},

//solution: "flash, html", // Flash with an HTML5 fallback.

swfPath: "<?php echo get_stylesheet_directory_uri(); ?>/js/",

supplied: "mp3,m4a,oga"

});

<?php

}

?>

});

</script>

<?php get_footer(); ?>