jQuery(document).ready(/*This function gets loaded when all the HTML, not including the portlets, isloaded.*/function() {});Liferay.Portlet.ready(/*This function gets loaded after each and every portlet on the page.portletId: the current portlet's idjQueryObj: the jQuery wrapped object of the current portlet*/function(portletId, jQueryObj) {var  link1 = location.hrefif(link1.indexOf('p_p_id=')!='-1'){var test1 = link1.split('p_p_id=');		if(test1[1].indexOf('&')!='-1'){				var test2 =  test1[1].split('&');selectedPortletId = test2[0];} else {selectedPortletId = test1[1];}if(portletId == '8' && selectedPortletId=='8'){					jQuery(this).scrollTop(jQuery('#p_p_id_8_').position().top);}}});jQuery(document).last(/*This function gets loaded when everything, including the portlets, is onthe page.*/function() {});ddaccordion.init({headerclass: "silverheader", //Shared CSS class name of headers groupcontentclass: "submenu", //Shared CSS class name of contents grouprevealtype: "mouseover", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseovermouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseovercollapseprev: true, //Collapse previous content (so only one open at any time)? true/falsedefaultexpanded: [0], //index of content(s) open by default [index1, index2, etc] [] denotes no contentonemustopen: true, //Specify whether at least one header should be open always (so never all headers closed)animatedefault: false, //Should contents open by default be animated into view?persiststate: true, //persist state of opened contents within browser session?toggleclass: ["", "selected"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]togglehtml: ["", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"oninit:function(headers, expandedindices){ //custom code to run when headers have initalized//do nothing},onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed//do nothing}})/*********start accessibilty***************/function toggle (id) {var post = document.getElementById(id);if (post.className=="portletshown") { post.className="portlethidden"; } else { post.className="portletshown"; }}function changeLocation (targetURL) {window.location = targetURL;}var size;var defaultFontSize = 11;var currentFontSize = size;	var Color;var defaultColor = 'black';var currentColor = Color;	var prefsLoaded = false;/*********besarkan saiz tulisan**************/	function setFontPlus(id){size = document.getElementById(id).style.fontSize;if(size == "" || size == null) {size = 13;} else {size = size.substr(0,2);}if(size < 15) {if(size == 14) {size = eval(size) + 2;} else {size = eval(size) + 1;}var fontSize = size + "px";document.getElementById(id).style.fontSize=fontSizechangecss('td','font-size',fontSize);changecss('a','font-size',fontSize);changecss('#tajuk a','font-size',fontSize);changecss('#last_update','font-size',fontSize);changecss('#isi','font-size',fontSize);changecss('p','font-size',fontSize);changecss('input[type="text"]','font-size',fontSize);changecss('#tajuk_berita','font-size',fontSize);changecss('div','font-size',fontSize);changecss('#login a','font-size',fontSize);changecss('#b_crum a','font-size',fontSize);changecss('.applemenu div.galeri_foto','font-size',fontSize);changecss('.applemenu div.pelawat','font-size',fontSize);changecss('.applemenu div.undian','font-size',fontSize);}}// end setFontPlus/*********kecilkan saiz tulisan*************/function setFontMinus(id){size = document.getElementById(id).style.fontSize;if(size == "" || size == null) {size = 11; } else {size = size.substr(0,2);} if(size > 11) {if(size == 17) {size = eval(size) - 2;} else {size = eval(size) - 1;}var fontSize = size + "px";document.getElementById(id).style.fontSize=fontSizechangecss('td','font-size',fontSize);changecss('a','font-size',fontSize);changecss('#tajuk a','font-size',fontSize);changecss('#last_update','font-size',fontSize);changecss('#isi','font-size',fontSize);changecss('p','font-size',fontSize);changecss('input[type="text"]','font-size',fontSize);changecss('#tajuk_berita','font-size',fontSize);changecss('div','font-size',fontSize);changecss('#login a','font-size',fontSize);changecss('#b_crum a','font-size',fontSize);changecss('.applemenu div.galeri_foto','font-size',fontSize);changecss('.applemenu div.pelawat','font-size',fontSize);changecss('.applemenu div.undian','font-size',fontSize);}}/********kembalikan saiz huruf kepada asal************/function revertFontStyles(id){size = document.getElementById(id).style.fontSize;if(size == "" || size == null) {size = 11; } else {size = size.substr(0,2);} if(size > 10) {if(size == 16) {size = 11;} else {size = 11;}var fontSize = size + "px";document.getElementById(id).style.fontSize=fontSize}changecss('td','font-size','11px');changecss('a','font-size','11px');changecss('#tajuk a','font-size','14px');changecss('#last_update','font-size','11px');changecss('#isi','font-size','12px');changecss('p','font-size','12px');changecss('input[type="text"]','font-size','12px');changecss('#tajuk_berita','font-size','12px');changecss('div','font-size','12px');changecss('#login a','font-size','12px');changecss('#b_crum a','font-size','12px');changecss('.applemenu div.galeri_foto','font-size','14px');changecss('.applemenu div.pelawat','font-size','14px');changecss('.applemenu div.undian','font-size','14px');}function createCookie(name,value,days) {  if (days) {    var date = new Date();    date.setTime(date.getTime()+(days*24*60*60*1000));    var expires = "; expires="+date.toGMTString();  }  else expires = "";  document.cookie = name+"="+value+expires+"; path=/";};function readCookie(name) {  var nameEQ = name + "=";  var ca = document.cookie.split(';');  for(var i=0;i < ca.length;i++) {    var c = ca[i];    while (c.charAt(0)==' ') c = c.substring(1,c.length);    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);  }  return null;};window.onload = setUserOptions;//========================================//i just create this functioin because function createCookie not function function setCookie(c_name,value,expiredays){var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toUTCString());}function getCookie(c_name){if (document.cookie.length>0)  {  c_start=document.cookie.indexOf(c_name + "=");  if (c_start!=-1)    {    c_start=c_start + c_name.length+1;    c_end=document.cookie.indexOf(";",c_start);    if (c_end==-1) c_end=document.cookie.length;    return unescape(document.cookie.substring(c_start,c_end));    }  }return "";}//========================================function setUserOptions(){if(!prefsLoaded){cookie = readCookie("fontSize");size = cookie ? cookie : 11;cookieColor = readCookie("color");Color = cookieColor ? cookieColor : 'black';//alert(Color);if(Color=='red'){fontRed()}else if(Color=='blue'){fontBlue()}else if(Color=='green'){fontGreen()}else if(Color=='orange') {fontOrange()}else{revertStyles()}setFontSize(size);prefsLoaded = true;}}window.onunload = saveSettings;function saveSettings(){createCookie("color", Color, 365);  createCookie("fontSize", size, 365); }function setFontSize(fontSize){document.getElementById('wrapper').style.fontSize = fontSize + 'px';//alert (document.body.style.fontSize);};/**********kembalikan warna asal*************/function revertStyles(){Color='';changecss('div','color','black');changecss('#language a','color','black');changecss('#top_links a','color','black');changecss('#tajuk a','color','black');changecss('#time_date','color','black');changecss('#p_p_id_56_INSTANCE_lAMr_ .portlet-title','color','#316698');changecss('#p_p_id_56_INSTANCE_hMW4_ .portlet-title','color','#316698');changecss('#login a','color','#316698');changecss('#lagi div a','color','#990134');changecss('#isi','color','black');changecss('#isi div','color','black');changecss('.applemenu div.pelawat','color','white');changecss('.applemenu div.pelawat.selected','color','white');changecss('.applemenu div.galeri_foto','color','white');changecss('.applemenu div.galeri_foto.selected','color','white');changecss('.applemenu div.undian','color','white');changecss('.applemenu div.undian.selected','color','white');changecss('.pika_navigation a','color',Color);changecss('#footer a','color','black');changecss('#footer td','color','black');changecss('.slide_div a','color',Color);changecss('#layout-column_column-7 .portlet-title','color','#316698');changecss('#layout-column_column-1 a','color','#316698');changecss('#p_p_id_71_INSTANCE_BCon_ .nav-menu-style-1 h3 a','color','white');changecss('#layout-column_column-5 .portlet-title','color','#316698');changecss('#p_p_id_71_INSTANCE_BCon_ .nav-menu ul li a.selected','color','#316698');changecss('#p_p_id_71_INSTANCE_BCon_ .nav-menu ul li a','color','black')changecss('#navigation li a span','color','white')changecss('#navigation ul li.selected a','color','white')changecss('#navigation ul li a','color','white')changecss('#nav li ul li, #nav li ul li a','color','white')changecss('input[type="button"]','color','black');changecss('input[type="text"]','color','black');changecss('input[type="password"]','color','black');changecss('input[type="file"]','color','black');changecss('input[type="submit"]','color','black');changecss('input[type="reset"]','color','black');changecss('select','color','black');changecss('textarea','color','black');changecss('#tajuk_berita div','color','#316698');changecss('#p_p_id_59_INSTANCE_AfZg_ td','color','black');changecss('#p_p_id_visitorcounter_WAR_visitorcounterportlet_INSTANCE_UwfB_ td','color','black');}function changecss(theClass,element,value) {//Last Updated on May 21, 2008//documentation for this script at//http://www.shawnolson.net/a/503/altering-css-class-attributes-with-javascript.html var cssRules; if (document.all) { cssRules = 'rules'; } else if (document.getElementById) { cssRules = 'cssRules'; } var added = false; for (var S = 0; S < document.styleSheets.length; S++){ for (var R = 0; R < document.styleSheets[S][cssRules].length; R++) { if (document.styleSheets[S][cssRules][R].selectorText == theClass) { if(document.styleSheets[S][cssRules][R].style[element]){ document.styleSheets[S][cssRules][R].style[element] = value; added=true; break; } } } if(!added){ if(document.styleSheets[S].insertRule){ document.styleSheets[S].insertRule(theClass+' { '+element+': '+value+'; }',document.styleSheets[S][cssRules].length); } else if (document.styleSheets[S].addRule) { document.styleSheets[S].addRule(theClass,element+': '+value+';'); } } }}// end function changecss//==========================================  function ChangeColor(selectedColor){//cookieColor = readCookie("color");//Color = cookieColor ? cookieColor : 'black';//alert('Color='+Color);createCookie("color", selectedColor, 365);setCookie('selectedColor',selectedColor,365);jQuery('*').css('color',selectedColor);}//==========================================/*************tukar warna tulisan kepada warna merah**********//****changecss('<nama class@ id>','<element>','<value>');*************/function fontRed(){Color='red';    ChangeColor(Color);changecss('a','color',Color);changecss('div','color',Color);changecss('#language a','color',Color);changecss('#top_links a','color',Color);changecss('#tajuk a','color',Color);changecss('#time_date','color',Color);changecss('#p_p_id_56_INSTANCE_lAMr_ .portlet-title','color',Color);changecss('#p_p_id_56_INSTANCE_hMW4_ .portlet-title','color',Color);changecss('#login a','color',Color);changecss('#lagi div a','color',Color);changecss('#isi','color',Color);changecss('#isi div','color',Color);changecss('.applemenu div.pelawat','color',Color);changecss('.applemenu div.pelawat.selected','color',Color);changecss('.applemenu div.galeri_foto','color',Color);changecss('.applemenu div.galeri_foto.selected','color',Color);changecss('.applemenu div.undian','color',Color);changecss('.applemenu div.undian.selected','color',Color);changecss('.pika_navigation a','color',Color);changecss('#footer a','color',Color);changecss('#footer td','color',Color);changecss('.slide_div a','color',Color);changecss('#layout-column_column-7 .portlet-title','color',Color);changecss('#layout-column_column-1 a','color',Color);changecss('#p_p_id_71_INSTANCE_BCon_ .nav-menu-style-1 h3 a','color',Color);changecss('#layout-column_column-5 .portlet-title','color',Color);changecss('#p_p_id_71_INSTANCE_BCon_ .nav-menu ul li a.selected','color',Color);changecss('#p_p_id_71_INSTANCE_BCon_ .nav-menu ul li a','color',Color)changecss('#navigation li a span','color',Color)changecss('#navigation ul li.selected a','color',Color)changecss('#navigation ul li a','color',Color)changecss('#nav li ul li, #nav li ul li a','color',Color)changecss('input[type="button"]','color',Color);changecss('input[type="text"]','color',Color);changecss('input[type="password"]','color',Color);changecss('input[type="file"]','color',Color);changecss('input[type="submit"]','color',Color);changecss('input[type="reset"]','color',Color);changecss('select','color',Color);changecss('textarea','color',Color);changecss('#tajuk_berita div','color',Color);changecss('#p_p_id_59_INSTANCE_AfZg_ td','color',Color);changecss('#p_p_id_visitorcounter_WAR_visitorcounterportlet_INSTANCE_UwfB_ td','color',Color);}/*************tukar warna tulisan kepada warna biru**********//****changecss('<nama class@ id>','<element>','<value>');*************/function fontBlue(){Color='blue';    ChangeColor(Color);changecss('a','color',Color);changecss('div','color',Color);changecss('#language a','color',Color);changecss('#top_links a','color',Color);changecss('#tajuk a','color',Color);changecss('#time_date','color',Color);changecss('#p_p_id_56_INSTANCE_lAMr_ .portlet-title','color',Color);changecss('#p_p_id_56_INSTANCE_hMW4_ .portlet-title','color',Color);changecss('#login a','color',Color);changecss('#lagi div a','color',Color);changecss('#isi','color',Color);changecss('#isi div','color',Color);changecss('.applemenu div.pelawat','color',Color);changecss('.applemenu div.pelawat.selected','color',Color);changecss('.applemenu div.galeri_foto','color',Color);changecss('.applemenu div.galeri_foto.selected','color',Color);changecss('.applemenu div.undian','color',Color);changecss('.applemenu div.undian.selected','color',Color);changecss('.pika_navigation a','color',Color);changecss('#footer a','color',Color);changecss('#footer td','color',Color);changecss('.slide_div a','color',Color);changecss('#layout-column_column-7 .portlet-title','color',Color);changecss('#layout-column_column-1 a','color',Color);changecss('#p_p_id_71_INSTANCE_BCon_ .nav-menu-style-1 h3 a','color',Color);changecss('#layout-column_column-5 .portlet-title','color',Color);changecss('#p_p_id_71_INSTANCE_BCon_ .nav-menu ul li a.selected','color',Color);changecss('#p_p_id_71_INSTANCE_BCon_ .nav-menu ul li a','color',Color)changecss('#navigation li a span','color',Color)changecss('#navigation ul li.selected a','color',Color)changecss('#navigation ul li a','color',Color)changecss('#nav li ul li, #nav li ul li a','color',Color)changecss('input[type="button"]','color',Color);changecss('input[type="text"]','color',Color);changecss('input[type="password"]','color',Color);changecss('input[type="file"]','color',Color);changecss('input[type="submit"]','color',Color);changecss('input[type="reset"]','color',Color);changecss('select','color',Color);changecss('textarea','color',Color);changecss('#tajuk_berita div','color',Color);changecss('#p_p_id_59_INSTANCE_AfZg_ td','color',Color);changecss('#p_p_id_visitorcounter_WAR_visitorcounterportlet_INSTANCE_UwfB_ td','color',Color);}/*************tukar warna tulisan kepada warna green **********//****changecss('<nama class@ id>','<element>','<value>');*************/function fontGreen(){Color='green';    ChangeColor(Color);changecss('a','color',Color);changecss('div','color',Color);changecss('#language a','color',Color);changecss('#top_links a','color',Color);changecss('#tajuk a','color',Color);changecss('#time_date','color',Color);changecss('#p_p_id_56_INSTANCE_lAMr_ .portlet-title','color',Color);changecss('#p_p_id_56_INSTANCE_hMW4_ .portlet-title','color',Color);changecss('#login a','color',Color);changecss('#lagi div a','color',Color);changecss('#isi','color',Color);changecss('#isi div','color',Color);changecss('.applemenu div.pelawat','color',Color);changecss('.applemenu div.pelawat.selected','color',Color);changecss('.applemenu div.galeri_foto','color',Color);changecss('.applemenu div.galeri_foto.selected','color',Color);changecss('.applemenu div.undian','color',Color);changecss('.applemenu div.undian.selected','color',Color);changecss('.pika_navigation a','color',Color);changecss('#footer a','color',Color);changecss('#footer td','color',Color);changecss('.slide_div a','color',Color);changecss('#layout-column_column-7 .portlet-title','color',Color);changecss('#layout-column_column-1 a','color',Color);changecss('#p_p_id_71_INSTANCE_BCon_ .nav-menu-style-1 h3 a','color',Color);changecss('#layout-column_column-5 .portlet-title','color',Color);changecss('#p_p_id_71_INSTANCE_BCon_ .nav-menu ul li a.selected','color',Color);changecss('#p_p_id_71_INSTANCE_BCon_ .nav-menu ul li a','color',Color)changecss('#navigation li a span','color',Color)changecss('#navigation ul li.selected a','color',Color)changecss('#navigation ul li a','color',Color)changecss('#nav li ul li, #nav li ul li a','color',Color)changecss('input[type="button"]','color',Color);changecss('input[type="text"]','color',Color);changecss('input[type="password"]','color',Color);changecss('input[type="file"]','color',Color);changecss('input[type="submit"]','color',Color);changecss('input[type="reset"]','color',Color);changecss('select','color',Color);changecss('textarea','color',Color);changecss('#tajuk_berita div','color',Color);changecss('#p_p_id_59_INSTANCE_AfZg_ td','color',Color);changecss('#p_p_id_visitorcounter_WAR_visitorcounterportlet_INSTANCE_UwfB_ td','color',Color);}/*************tukar warna tulisan kepada warna orange**********//****changecss('<nama class@ id>','<element>','<value>');*************/function fontOrange(){Color='orange';changecss('body','color',Color);changecss('a','color',Color);changecss('#nav a','color',Color);changecss('a:hover','color',Color);changecss('.title2_font','color',Color);changecss('.content_font','color',Color);changecss('input[type="text"], input[type="password"], input[type="file"],input[type="submit"], input[type="button"], input[type="reset"], select, textarea, .textarea','color',Color);}/*******end accessibility************/jQuery(document).ready(function (){jQuery("#pikame").PikaChoose();});jQuery(document).ready(function(){jQuery(".slide_button").click(function(){jQuery("#slide_panel").slideToggle("slow");jQuery(this).toggleClass("minus_icon"); return false;});//cookieColor = readCookie("color");readColor=getCookie('selectedColor');//Color = cookieColor ? cookieColor : 'black';//alert('readColor='+readColor);if(readColor!=''){ChangeColor(readColor);}});        function formatText(index, panel) {  return index + "";    }            jQuery(function () {                    jQuery('.anythingSlider').anythingSlider({                easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin                autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.                delay: 3000,                    // How long between slide transitions in AutoPlay mode                startStopped: false,            // If autoPlay is on, this can force it to start stopped                animationTime: 600,             // How long the slide transition takes                hashTags: true,                 // Should links change the hashtag in the URL?                buildNavigation: true,          // If true, builds and list of anchor links to link to each slide        		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover        		startText: ">",             // Start text        stopText: ".",               // Stop text        navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)            });                        jQuery("#slide-jump").click(function(){                jQuery('.anythingSlider').anythingSlider(6);            });                    });jQuery(document).ready(function(){jQuery("#myController").jFlow({slides: "#slides",controller: ".jFlowControl", // must be class, use . signslideWrapper : "#jFlowSlide", // must be id, use # signselectedWrapper: "jFlowSelected",  // just pure text, no signauto: true,		//auto change slide, default truewidth: "770px",height: "140px",duration: 400,prev: ".jFlowPrev", // must be class, use . signnext: ".jFlowNext" // must be class, use . sign});});jQuery(document).ready(function(){	jQuery("#slider").easySlider({auto: true, continuous: true});});jQuery(document).ready(function(){    jQuery("#example > ul").tabs();  });jQuery(function() {        jQuery('#gallery a').lightBox();    });// Begin jQuery jQuery(document).ready(function() { /* =Reflection Nav-------------------------------------------------------------------------- */	     // Append span to each LI to add reflection     jQuery("#nav-reflection li").append("<span></span>");	     // Animate buttons, move reflection and fade     jQuery("#nav-reflection a").hover(function() {        jQuery(this).stop().animate({ marginTop: "-10px" }, 200);        jQuery(this).parent().find("span").stop().animate({ marginTop: "18px", opacity: 0.25 }, 200);    },function(){        jQuery(this).stop().animate({ marginTop: "0px" }, 300);        jQuery(this).parent().find("span").stop().animate({ marginTop: "1px", opacity: 1 }, 300);    }); /* =Shadow Nav-------------------------------------------------------------------------- */     // Append shadow image to each LI     jQuery("#nav-shadow li").append('<img class="shadow" src="/html/themes/kpkk_awr/images/kpkk_awr/related_links/icons-shadow.jpg" width="81" height="27" alt="" />');     // Animate buttons, shrink and fade shadow     jQuery("#nav-shadow li").hover(function() {    	var e = this;        jQuery(e).find("a").stop().animate({ marginTop: "-14px" }, 250, function() {        	jQuery(e).find("a").animate({ marginTop: "-10px" }, 250);        });        jQuery(e).find("img.shadow").stop().animate({ width: "80%", height: "20px", marginLeft: "8px", opacity: 0.25 }, 250);    },function(){    	var e = this;        jQuery(e).find("a").stop().animate({ marginTop: "4px" }, 250, function() {        	jQuery(e).find("a").animate({ marginTop: "0px" }, 250);        });        jQuery(e).find("img.shadow").stop().animate({ width: "100%", height: "27px", marginLeft: "0px", opacity: 1 }, 250);    }); // End jQuery });// Begin jQuery jQuery(document).ready(function() { /* =Reflection Nav-------------------------------------------------------------------------- */	     // Append span to each LI to add reflection     jQuery("#nav-reflection1 li").append("<span></span>");	     // Animate buttons, move reflection and fade     jQuery("#nav-reflection1 a").hover(function() {        jQuery(this).stop().animate({ marginTop: "-10px" }, 200);        jQuery(this).parent().find("span").stop().animate({ marginTop: "18px", opacity: 0.25 }, 200);    },function(){        jQuery(this).stop().animate({ marginTop: "0px" }, 300);        jQuery(this).parent().find("span").stop().animate({ marginTop: "1px", opacity: 1 }, 300);    }); /* =Shadow Nav-------------------------------------------------------------------------- */     // Append shadow image to each LI     jQuery("#nav-shadow1 li").append('<img class="shadow" src="/html/themes/classic/images/common/related_links/icons-shadow.jpg" width="81" height="27" alt="" />');     // Animate buttons, shrink and fade shadow     jQuery("#nav-shadow1 li").hover(function() {    	var e = this;        jQuery(e).find("a").stop().animate({ marginTop: "-14px" }, 250, function() {        	jQuery(e).find("a").animate({ marginTop: "-10px" }, 250);        });        jQuery(e).find("img.shadow").stop().animate({ width: "80%", height: "20px", marginLeft: "8px", opacity: 0.25 }, 250);    },function(){    	var e = this;        jQuery(e).find("a").stop().animate({ marginTop: "4px" }, 250, function() {        	jQuery(e).find("a").animate({ marginTop: "0px" }, 250);        });        jQuery(e).find("img.shadow").stop().animate({ width: "100%", height: "27px", marginLeft: "0px", opacity: 1 }, 250);    }); // End jQuery });