function querySt(ji) {
    hu = window.location.search.substring(1);
    gy = hu.split("&");
    for (i=0;i<gy.length;i++) {
        ft = gy[i].split("=");
        if (ft[0] == ji) {
            return ft[1];
        }
    }
}

$(document).ready(function(){					
			$.preloadCssImages();
			$('#tab-me').tabs();
			$('#newsslider').cycle({
				fx:    'fade',
				next:   '#next',
				timeout: 5500
			});
			//console.log('well hello');
			var currentMenu = querySt("m");
			//console.log(currentMenu);
			//console.log($('#'+currentMenu));
			$('#'+currentMenu).css('color','#f00');
					
			$('.ui-tabs-nav a span').corner('top');
			$('.tab-scrollers').corner();
			$('.scroll-pane').corner();
			$('#video-gallery-wrapper').corner();
			
			$('.top').live('click', function() {
				//var targetElementSelectorString = $(this).attr('rel');
				//console.log(targetElementSelectorString);
				$('.scroll-pane')[0].scrollTo('#top');
				console.log('scrolled did it?');
			return false;			
			});	

		$('#menulinks a').click(function(){			
			$('#menulinks a').removeClass('current');
			$('#submenulinks ul').hide();
			$(this).addClass('current');
		});

			$('.scroll-pane').jScrollPane({showArrows:true,scrollbarWidth:4, scrollbarMargin:8,arrowSize:2,animateStep:8,reinitialiseOnImageLoad: true});
			$('#video-gallery-div').jScrollPane({showArrows:true,scrollbarWidth:4, scrollbarMargin:8,arrowSize:2,animateStep:8,reinitialiseOnImageLoad: true});			

		/** On click of subMenu show contenttabs **/
			var initialiseScrollpane = function(){
			$('.scroll-pane').jScrollPane({showArrows:true,scrollbarWidth:3, scrollbarMargin:8,arrowSize:2,animateStep:8,reinitialiseOnImageLoad: true});			
		}
});