$(function() {
    $('#br_slideshow').before('<div id="nav" class="btn_light_nav">').cycle({
        fx:     'fade',
        speed:  '3000',
        timeout: 0,
		pager: '#nav',
		pagerAnchorBuilder: paginate,
		activePagerClass: 'active'
});
	
	
	
	function paginate(ind, el) {
	    if (ind == 0) return '<a href="#" class="lighting_thumbnails"><img src="/images/D900_curve.jpg" width="119" height="125" alt="D900 curve" /></a>';
	    else if (ind == 1) return '<a href="#" class="lighting_thumbnails"><img src="/images/D1000_curve.jpg" width="119" height="125" alt="D1000 curve" /></a>';
		else if (ind == 2) return '<a href="#" class="lighting_thumbnails"><img src="/images/D900_90_curve.jpg" width="119" height="125" alt="D900 90/30 curve" /></a>';
		else if (ind == 3) return '<a href="#" class="lighting_thumbnails"><img src="/images/D400_curve.jpg" width="119" height="125" alt="D400 curve" /></a>';
		else if (ind == 4) return '<a href="#" class="lighting_thumbnails"><img src="/images/W200_curve.jpg" width="119" height="125" alt="W200 curve" /></a>';
		else if (ind == 5) return '<a href="#" class="lighting_thumbnails"><img src="/images/W900_curve.jpg" width="119" height="125" alt="W900 curve" /></a>';
	}
});

$(function() {
    $('#br_slideshow2').before('<div id="nav" class="btn_light_nav">').cycle({
        fx:     'fade',
        speed:  '3000',
        timeout: 0,
		pager: '#nav',
		pagerAnchorBuilder: paginate,
		activePagerClass: 'active'

    });
	function paginate(ind, el) {
	    if (ind == 0) return '<a href="#" class="lighting_thumbnails"><img src="/images/D900_cube.jpg" width="119" height="125" alt="D900 cube" /></a>';
	    else if (ind == 1) return '<a href="#" class="lighting_thumbnails"><img src="/images/D1000_cube.jpg" width="119" height="125" alt="D1000 cube" /></a>';
		else if (ind == 2) return '<a href="#" class="lighting_thumbnails"><img src="/images/D900_90_cube.jpg" width="119" height="125" alt="D900 90/30 cube" /></a>';
		else if (ind == 3) return '<a href="#" class="lighting_thumbnails"><img src="/images/D400_cube.jpg" width="119" height="125" alt="D400 cube" /></a>';
		else if (ind == 4) return '<a href="#" class="lighting_thumbnails"><img src="/images/W200_cube.jpg" width="119" height="125" alt="W200 cube" /></a>';
		else if (ind == 5) return '<a href="#" class="lighting_thumbnails"><img src="/images/W900_cube.jpg" width="119" height="125" alt="W900 cube" /></a>';
	}
});

$(document).ready(function() {
    $('#slideshow_pm').after('<div id="fbnav" class="product_selection_container">').cycle({
        fx:     'fade',
        speed:  '3000',
        timeout: 0,
		pager: '#fbnav',
		pagerEvent: 'mouseover',
		pagerAnchorBuilder: paginate,
		activePagerClass: 'active',	
		allowPagerClickBubble: true,

    });

function paginate(ind, el)
	{

	    if (ind == 0) return '<div class="product_selection dropshadow"><a href="http://brightgreen.net.au/products/d900-curve/"><img src="/images/Page 2_r2_c2.gif" width="215" height="234" /><span class="quick_link">VIEW CURVE SERIES</span></a>';
	    else if (ind == 1) return '<div class="product_selection dropshadow"><a href="http://brightgreen.net.au/products/d900-cube-2/"><img src="/images/Page 2_r2_c4.gif" width="215" height="234" /><span class="quick_link">VIEW CUBE SERIES</span></a>';
		else if (ind == 2) return '<div class="product_selection dropshadow"><a href="http://brightgreen.net.au/products/dr700-retrofit/"><img src="/images/Page 2_r2_c6.gif" width="215" height="234" /><span class="quick_link">VIEW RETROFIT SERIES</span></a>';
	    // and so on
	}
	
	});
$(document).ready(function() {
    $('#homebanner').after('<div id="homebannernav" class="rbnav">').cycle({
        fx:     'fade',
        speed:  '1000',
        timeout: 4000,
		pager: '#homebannernav',
		pagerEvent: 'mouseover',
		pagerAnchorBuilder: paginate,
		activePagerClass: 'active2',

    });
	function paginate(ind, el)
	{
	    if (ind == 0) return '<div class="radiobut"><a href="#"></a></div>';
	    else if (ind == 1) return '<div class="radiobut"><a href="#"></a></div>';
		else if (ind == 2) return '<div class="radiobut"><a href="#"></a></div>';
	    else if (ind == 3) return '<div class="radiobut"><a href="#"></a></div>';
	    else if (ind == 4) return '<div class="radiobut"><a href="#"></a></div>';
	    else if (ind == 5) return '<div class="radiobut"><a href="#"></a></div>';
	    else if (ind == 6) return '<div class="radiobut"><a href="#"></a></div>';
	    // and so on
	}

});

$(document).ready(function() {
	if ($('.wordpress-post-tabs').length > 0) {
		var ul = $('.wordpress-post-tabs').find('ul').get(0);
		if ($(ul).length > 0) {
			var li = $(ul).find('li');
			if ($(li).length == 4) {
				$(li).eq(3).addClass('sep-tab');
			}
		}
	}
});
