// Add to favorite
function roundNumber(num,dec){var result=Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);return result}function resPrint(){var scrWidth=screen.width;var scrHeight=screen.height;var scrRatio=roundNumber(scrWidth/scrHeight,2);var resPrint="<span id='respri';>Your display features</span><span>Aspect Ratio: <strong>";if(scrRatio==1.25||scrRatio==1.33){resPrint+="Standard 4:3"}else if(scrRatio==1.6||scrRatio==1.67){resPrint+="Wide 8:5"}else if(scrRatio==1.78){resPrint+="HD 16:9"}else if(scrRatio==1.76){resPrint+="Mobile PSP"}else if(scrRatio==0.75||(scrRatio==1.33&&scrWidth<=640)){resPrint+="Mobile VGA"}else if(scrRatio==0.6||(scrRatio==1.67&&scrWidth<=800)){resPrint+="Mobile WVGA"}else if(scrRatio==0.67||(scrRatio==1.5&&scrWidth==480)){resPrint+="Mobile iPhone"}else if(scrRatio==0.8){resPrint+="Mobile Phone"}else{resPrint="Unknown"}resPrint+="</strong></span><span> Resolution: <strong>"+scrWidth+" x "+scrHeight+"</strong></span>";document.write(resPrint)}
function add_favorite(a){title=document.title;url=document.location;try{window.external.AddFavorite(url,title)}catch(e){try{window.sidebar.addPanel(title,url,"")}catch(e){if(typeof(opera)=="object"){a.rel="sidebar";a.title=title;a.url=url;return true}else{alert('Press Ctrl-D to add page in bookmarks')}}}return false}
//D4r344 edit Script...
jQuery.noConflict();
jQuery(function($){ 
$('a#log-in, a#closein').click(function(){$('#login').slideToggle();});
;(function($){$.fn.msAccordion=function(options){$('.content').css({"display":"none"});options=$.extend({currentDiv:'1',previousDiv:'',vertical:false,defaultid:0,currentcounter:0,intervalid:0,autodelay:0,event:"click",previousTid:'',alldivs_array:new Array()},options);$(this).addClass("accordionWrapper");$(this).css({overflow:"hidden"});var elementid=$(this).attr("id");var allDivs=this.children();if(options.autodelay>0){$("#"+elementid+" > div").bind("mouseenter",function(){pause()});$("#"+elementid+" > div").bind("mouseleave",function(){startPlay()})}allDivs.each(function(current){var iCurrent=current;var sTitleID=elementid+"_msTitle_"+(iCurrent);var sContentID=sTitleID+"_msContent_"+(iCurrent);var currentDiv=allDivs[iCurrent];var totalChild=currentDiv.childNodes.length;var titleDiv=$(currentDiv).find("div.title");titleDiv.attr("id",sTitleID);var contentDiv=$(currentDiv).find("div.content");contentDiv.attr("id",sContentID);options.alldivs_array.push(sTitleID);$("#"+sTitleID).bind(options.event,function(){pause();openMe(sTitleID)})});if(options.vertical){makeVertical()};openMe(elementid+"_msTitle_"+options.defaultid);if(options.autodelay>0){startPlay()};function openMe(id){var sTitleID=id;var titleimg=$("#"+sTitleID+" img").attr("src");titleimg=titleimg.replace(".gif",".png");var iCurrent=sTitleID.split("_")[sTitleID.split("_").length-1];options.currentcounter=iCurrent;var sContentID=id+"_msContent_"+iCurrent;if($("#"+sContentID).css("display")=="none"){allDivs.each(function(current){var iCurrent=current;var sTitleID=elementid+"_msTitle_"+(iCurrent);$("#"+sTitleID).unbind("click")});if(options.previousDiv!=""){closeMe(options.previousDiv,id)};if(options.vertical){$("#"+sContentID).slideDown("slow")}else{$("#"+sTitleID+" img").attr("src",titleimg);$("#"+sContentID).show("slow",function(){allDivs.each(function(current){var iCurrent=current;var sTitleID=elementid+"_msTitle_"+(iCurrent);var sContentID=sTitleID+"_msContent_"+(iCurrent);var currentDiv=allDivs[iCurrent];var totalChild=currentDiv.childNodes.length;var titleDiv=$(currentDiv).find("div.title");titleDiv.attr("id",sTitleID);var contentDiv=$(currentDiv).find("div.content");contentDiv.attr("id",sContentID);options.alldivs_array.push(sTitleID);$("#"+sTitleID).bind(options.event,function(){pause();openMe(sTitleID)})})})}options.currentDiv=sContentID;options.previousDiv=options.currentDiv;options.previousTid=id}};function closeMe(div,preid){preid=options.previousTid;var titleimg=$("#"+preid+" img").attr("src");titleimg=titleimg.replace(".png",".gif");$("#"+preid+" img").attr("src",titleimg);$("#"+div).hide("slow")};function makeVertical(){$("#"+elementid+" > div").css({display:"block",float:"none",clear:"both"});$("#"+elementid+" > div > div.title").css({display:"block",float:"none",clear:"both"});$("#"+elementid+" > div > div.content").css({clear:"both"})};function startPlay(){options.intervalid=window.setInterval(play,options.autodelay*1000)};function play(){var sTitleId=options.alldivs_array[options.currentcounter];openMe(sTitleId);options.currentcounter++;if(options.currentcounter==options.alldivs_array.length)options.currentcounter=0};function pause(){window.clearInterval(options.intervalid)}}})(jQuery);
function initMenu(){$('#menu ul').hide();$('#menu ul:first').show();$('#menu li a').click(function(){var checkElement=$(this).next();if((checkElement.is('ul'))&&(checkElement.is(':visible'))){return false}if((checkElement.is('ul'))&&(!checkElement.is(':visible'))){$('#menu ul:visible').slideUp('normal');checkElement.slideDown('normal');return false}})}$(document).ready(function(){initMenu()});
$(document).ready(function(){$('.fotop a').click(function(){$('html, body').animate({scrollTop:0},'slow')})});
// sidebar socialbookmarks slidding
$(function() {var offset=$("#floating_panel, #floating_panelh").offset();var topPadding=0;$(window).scroll(function(){if($(window).scrollTop()>offset.top){$("#floating_panel").stop().animate({marginTop:$(window).scrollTop()-offset.top+topPadding})}else{$("#floating_panel").stop().animate({marginTop:0})}});});

});
