function swaptab_over(table_id){
	document.getElementById('list_top_img'+table_id).src = "../img/_layout/list_top_b.png";
	document.getElementById('list_bt_img'+table_id).src = "../img/_layout/list_bt_b.png";
	document.getElementById('list_tab_content'+table_id).style.background = "url(../img/_layout/list_mid_b.png)";
}
function swaptab_out(table_id){
	document.getElementById('list_top_img'+table_id).src = "../img/_layout/list_top.png";
	document.getElementById('list_bt_img'+table_id).src = "../img/_layout/list_bt.png";
	document.getElementById('list_tab_content'+table_id).style.background = "url(../img/_layout/list_mid.png)";
}
function s_swaptab_over(table_id){
	document.getElementById('slist_top_img'+table_id).src = "../img/_layout/slist_top_b.png";
	document.getElementById('slist_bt_img'+table_id).src = "../img/_layout/slist_bt_b.png";
	document.getElementById('slist_tab_content'+table_id).style.background = "url(../img/_layout/slist_mid_b.png)";
}
function s_swaptab_out(table_id){
	document.getElementById('slist_top_img'+table_id).src = "../img/_layout/slist_top.png";
	document.getElementById('slist_bt_img'+table_id).src = "../img/_layout/slist_bt.png";
	document.getElementById('slist_tab_content'+table_id).style.background = "url(../img/_layout/slist_mid.png)";
}



this.tipshowPreview = function(){	
	xOffset = -20;
	yOffset = -50;
	$("a.tipshow").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		$("body").append("<p id='tipshow'><img src='"+ this.rel +"' height='200' alt='url preview' />"+ c +"</p>");								 
		$("#tipshow")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");						
    },
	function(){
		this.title = this.t;	
		$("#tipshow").remove();
    });	
	$("a.tipshow").mousemove(function(e){
		$("#tipshow")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};

$(function(){
    $("ul#newsticker").liScroll({travelocity: 0.06});
}); 

//$(document).ready(function(){
//	tipshowPreview();
//});

//$.noConflict();
//jQuery(document).ready(function($) {
$(document).ready(function(){
	$("a[rel=froom]").fancybox({
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {return '<span id="fancybox-title-over">'+title+'</span>';
		}
	});
	$("a[rel=fbox]").fancybox({
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {return '<span id="fancybox-title-over">'+title+'<br><span style="font-weight:100">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + '</span></span>';
		}
	});
	$("a[rel=fbox_pm]").fancybox({
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {return '<span id="fancybox-title-over">'+title+'</span>';
		}
	});
	$("a[rel=fframe]").fancybox({
		'titleShow'		: false,
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic',
		'type'			: 'iframe',
		'autoScale'		: true
	});
	tipshowPreview();
});


function OpenLink(ThisLink){
	document.location.href=ThisLink;
}

function OpenLinkW(ThisLink){
	window.open(ThisLink);
}






