	function get_rss_feed(sini,tid) {
		//clear the content in the div for the next feed.
		$(sini).empty();
		$(sini).html("loading")
	 
		//$.get("<?php bloginfo('url'); ?>/?feed=rss&p=" + tid, function(d) {
		$.get("http://trienekens.com.my/?feed=rss&p=" + tid, function(d) {
	 
			//find each 'item' in the file and parse it
			$(d).find('item').each(function() {
	 
				//name the current found item this for this particular loop run
				var $item = $(this);
				// grab the post title
				var title = $item.find('title').text();
				// grab the post's URL
				var link = $item.find('link').text();
				// next, the description
				var content = $item.find('content').text();
				//don't forget the pubdate
				var pubDate = $item.find('pubDate').text();
				var subtitle = $item.find('subtitle').text();
				var locdate = $item.find('locdate').text();
	 
				// now create a var 'html' to store the markup we're using to output the feed to the browser window
				var html = "";
				html += "<div id=\"news-" + tid + "\" class=\"newspost\" >";
				html += "<h2>" + title + "</h2>";
				html += "<h3 class=\"subtitleheader\">" + "" + "</h3>";
				html += "<h3 class=\"locdate\">" + "" + "</h3>";
				html += "<p class=\"description\">" + content + "</p>";
	 
				//put that feed content on the screen!
				$(sini).html($(html));  	
				$(".newspost").show();
			});
		});
	 
	};
	
$(document).ready(function(){
if  (! $.browser.msie){
	$("#os,#wmf,#csr,#at").hover(function(){

		$(this).animate({opacity:"hide"},"fast",function(){$(this).animate({opacity:"show"},400);});
	});	


	
	
	$("#ne,#cf,#cr,#li,#cu").hover(function(){


		$(this).animate({top:-5},100,function(){$(this).animate({top:0},100);});


	});	

};

$("ul > li.at > a").hover(function(e){
$(this).css({background:"#74bb29"});
},function(){
$(this).css({background:""});
});

$('.sblinks ul li ul').hide();

$('.sblinks').find('li.current-menu-item').parent().parent().find("~ul").hide();
$('.sblinks').find('li.current-menu-item').parent().show();
if($('.sblinks').find('li.current-menu-item').hasClass("at")){
	$('.sblinks').find('li.current-menu-item ul').show();
}

	if ((screen.width>1024) )
	{
		
		$("link[rel=stylesheet]").attr({href : "http://trienekens.com.my/wp-content/themes/trienekens v2/style.css"});
	}
	else
	{
		
		$("link[rel=stylesheet]").attr({href :"http://trienekens.com.my/wp-content/themes/trienekens v2/oldstyle.css"});
	}

$("#newslist").scrollTo('h4.selected',400, {over:0.5});
$(".newslinks").click(function(e){
	//e.preventDefault();
	//$("#rssnewspost").html("<h1>loading...</h1>");
	//get_rss_feed("#rssnewspost",$(this).attr('id'));
});

$("#upbtn").click(function(e){
	e.preventDefault();
	$("#newslist").scrollTo({top:'-=100px',left:'0px'},400);
});


$("#dwnbtn").click(function(e){
	e.preventDefault();
	$("#newslist").scrollTo({top:'+=100px',left:'0px'},400);
});

$("#upbtn").hover(function(){
	$("#upbtn").css({"background-position":"0% 100%"});
},function(){
	$("#upbtn").css({"background-position":"0% 0%"});
});

$("#upbtn").mousedown(function(){
	$("#upbtn").css({"background-position":"0% 50%"});
});

$("#upbtn").mouseup(function(){
	$("#upbtn").css({"background-position":"0% 100%"});
});

$("#dwnbtn").hover(function(){
	$("#dwnbtn").css({"background-position":"0% 100%"});
},function(){
	$("#dwnbtn").css({"background-position":"0% 0%"});
});

$("#dwnbtn").mousedown(function(){
	$("#dwnbtn").css({"background-position":"0% 50%"});
});

$("#dwnbtn").mouseup(function(){
	$("#dwnbtn").css({"background-position":"0% 100%"});
});

	$('.sblinks')
		.mousewheel(function(event, delta) {
			if (delta > 0)
				$("#newslist").scrollTo({top:'-=100px',left:'0px'},700);
			else if (delta < 0)
				$("#newslist").scrollTo({top:'+=100px',left:'0px'},700);
		});	
		

});



