$(document).ready(function(){
	
	$('.close,#gallery_menu').show();
	slider();
	oranges();
	
	$('.lt_item_box,.rt_item_box').click(function() {
		$(this).find('#arrow').toggle();
		$(this).children('#expand').toggle();
		
	});
	
	$('.lt_opt_box,.rt_opt_box').click(function() {
		$(this).find('#arrow').hide();
		$(this).children('#expand').show();
		
	});
	
	$('#feature_slideshow').cycle({ 
    fx:    'fade', 
    pause:  1 
	});
	
	$('#gallery_slideshow').cycle({ 
    fx:     'fade', 
    speed:  'fast', 
    timeout: 0, 
    next:   '#gallery_next', 
    prev:   '#gallery_prev' 
	});
	

	$('#gallery_size').toggle(
		function () {
			$('.galleryimages').css('height','500px');
			$('#gallery_size').html('<img src="core/image_arrow_up.png"/>');
		}, 
		function () {
			$('.galleryimages').css('height','150px');
			$('#gallery_size').html('<img src="core/image_arrow_dn.png"/>');
		}
	);
	
	$(".svga").colorbox({
	iframe:true, 
	innerWidth:800, 
	innerHeight:600});
	
	$(".loc").colorbox({
	iframe:true, 
	innerWidth:400, 
	innerHeight:300,
	onClosed:function(){location.reload();}});
	
	
$('#feature_slideshow').hover(
		function () {
			$('.feature_icon').show();
			$('.feature_area').css('top','0px');
			
		}, 
		function () {
			$('.feature_icon').hide();
			$('.feature_area').css('top','95px');
			
		}
	);	
	
});










function slider()
{
$('.close').click(function() {
		$(this).parent().slideUp('fast',function(){
			$(this).next('div').toggle();
			});
		});
  
		$('.open').click(function() {
			$(this).parent().prev().slideDown('fast',function(){
				$(this).next('div').toggle();
			});
		});
}

function oranges()
{
	
	$('.lt_item_box,.rt_item_box,').hover(
		function () {
			$(this).addClass('item_box_hover');
		}, 
		function () {
			$(this).removeClass('item_box_hover');
		}
	);
	
	$('.lt_opt_box,.rt_opt_box').hover(
		function () {
			$(this).addClass('opt_box_hover');
		}, 
		function () {
			$(this).removeClass('opt_box_hover');
		}
	);
}
