// DG_JavaScript Document

$(document).ready(function() {
$(".newsletter").fancybox({'width': 400, 'height': 220, 'type': 'iframe'});
$(".post-testimonials").fancybox({'width': 400, 'height': 265, 'type': 'iframe'});
$(".post-topic").fancybox({'width': 400, 'height': 270, 'type': 'iframe'});
$(".post-comment").fancybox({'width': 400, 'height': 240, 'type': 'iframe'});

$(".history").fancybox({'width': 700, 'height': 350, 'type': 'iframe'});

$(".video").fancybox({'width': 710, 'height': 410, 'type': 'iframe'});

$("a[rel=dg_group]").fancybox({'titlePosition' : 'over', 'titleFormat' : function(title, currentArray, currentIndex, currentOpts) { return ''; } });

$("a.video").click(function() { $.fancybox({ 'padding' : 0, 'title' : this.title, 'width' : 680, 'height' : 495, 'href' : this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'), 'type' : 'swf', 'swf' : {'allowfullscreen':'true'}}); return false; }); 

var dgFlow = new ImageFlow();
dgFlow.init({ 'ImageFlowID': 'dgFlow', 'circular': true, 'slider': false, 'glideToStartID': false,'captions': false, 'startAnimation': true, 'reflections': false, 'reflectionPNG': true, 'slideshow': true, /*'reflectionP': 0.0 ,*/ 'aspectRatio': 3.5, 'imagesM': 0.8, 'slideshowAutoplay': true});
});
$(document).ready(function() {var interval; $('ul#myauto').roundabout({'duration': 1400 }).hover(function() {clearInterval(interval);},function() {interval = startAutoPlay();});interval = startAutoPlay();});function startAutoPlay() {return setInterval(function() {$('ul').roundabout_animateToPreviousChild();}, 5000);}

$("a.atool").hover(function(){$(this).prev().fadeIn()},function(){$(this).prev().fadeOut()});

$(document).ready(function() {
//$("a.atool").hover(function(){$(this).next().fadeIn()},$(this).next().fadeOut());
  var options = {newsList: "ul#news", startDelay: 10, tickerRate: 30, controls: true, ownControls: false,	stopOnHover: false,	resumeOffHover: true};$().newsTicker(options);
 
});
