$(document).ready(function(){
	/* Tabs */
	$("#tabbed").tabbed();	
	$("#tabbed2").tabbed();	
	$("#tabbed3").tabbed();	
	$("#tabbed4").tabbed();	
	
	/* Tooltip */
	$('.box a').tipTip();
	
	/* Bread Crumb */
	jQuery("#breadCrumb").jBreadCrumb();
	 
	/* Slider */
	jQuery('#newsslider2').accessNews({
		title : "",
		subtitle: "",
		speed : "slow",
		slideBy : 4,
		slideShowInterval: 100000,
		slideShowDelay: 100000
	});

	/* Select */
	$("SELECT").selectBox();
	
	/* Marquee */
	$(".scroller").weemarquee({ fade: true, width: "78%" });
	
	/* Pretty blue */
	$("area[rel^='prettyPhoto']").prettyPhoto();
	
	$(".gallery:first a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'normal',theme:'facebook',slideshow:3000, autoplay_slideshow: false});
	$(".gallery:gt(0) a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'fast',slideshow:10000, hideflash: true});

	$("#custom_content a[rel^='prettyPhoto']:first").prettyPhoto({
		custom_markup: '<div id="map_canvas" style="width:260px; height:265px"></div>',
		changepicturecallback: function(){ initialize(); }
	});

	$("#custom_content a[rel^='prettyPhoto']:last").prettyPhoto({
		custom_markup: '<div id="bsap_1259344" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6"></div><div id="bsap_1237859" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6" style="height:260px"></div><div id="bsap_1251710" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6"></div>',
		changepicturecallback: function(){ _bsap.exec(); }
	});
	
	/**************************************************************************************************************************/
	
	/* Entries hovers */
	$('.box-show').live('hover', function() {
		$(this).children('.box-image-hover').fadeIn(500);
	});
	
	$('.box-show').live('mouseleave', function() {
		$(this).children('.box-image-hover').fadeOut(500);
	});
	
	$('.data-block-image').live('hover', function() {
		$('.data-block-image-hover').fadeIn(500);
	});
	
	$('.data-block-image').live('mouseleave', function() {
		$('.data-block-image-hover').fadeOut(500);
	});
	
	$('.related').live('hover', function() {
		$(this).children('.box-image-hover').fadeIn(500);
	});
	
	$('.related').live('mouseleave', function() {
		$(this).children('.box-image-hover').fadeOut(500);
	});
	
	$('.mini-box').live('hover', function() {
		$(this).children().children('.mini-image-hover').fadeIn(500);
	});
	
	$('.mini-box').live('mouseleave', function() {
		$(this).children().children('.mini-image-hover').fadeOut(500);
	});
	
	$('.section-list').live('hover', function() {
		$(this).children('.categories-list').delay(600).fadeIn(500);
		$(this).children('.categories-list').dequeue();
	});
	
	$('.section-list').live('mouseleave', function() {
		$(this).children('.categories-list').delay(600).fadeOut(500);
		 $(this).children('.categories-list').dequeue();
	});

	$('.tabcontent ul li').live('hover', function() {
		$(this).children('.rss').delay(200).fadeIn(500);
                $(this).children('.rss').dequeue();
	});
	
	$('.tabcontent ul li').live('mouseleave', function() {
		$(this).children('.rss').delay(200).fadeOut(500);
                $(this).children('.rss').dequeue();
	});
	
});

