$.fn.slideSwitch =  function (options){
	var defaults = {
		effectTime: 1000
	};
	var opts = $.extend(defaults, options);
		$(this).each(function(){			
			var $active = $(this).children('img.active');			
			var $next = $active.next();			
			var $next =  $active.next().length ? $active.next(): $(this).children('img:first');
			$active.addClass('last-active');
			$next.css({opacity: 0.0}).addClass('active').animate({opacity: 1.0}, defaults.effectTime, function(){
				$active.removeClass('active last-active');
			});
		})
};

$(document).ready(function() {
						   						   
	$("a#videoB").click(function() {
								
		$("div#video").slideToggle();	
		$("a#videoB").hide();
		
								});
	$(function(){$('.lbox').lightBox();}); // LIGHTBOX
	$(function(){$('.thumb a').lightBox();}); // LIGHTBOX
	$(function(){$('.sthumb a').lightBox();}); // LIGHTBOX
	$(function(){$('a.new-window').click(function(){window.open(this.href);return false;});}); // NEW WINDOW SCRIPT
    setInterval("$('.slideshow').slideSwitch({ effectTime: 1000 })",3000); // SLIDE SHOW
});
