$(document).ready(function() { $("#top-menu ul ul").css({display: "none"}); //opera fix $("#top-menu ul li").hover(function(){ $(this).find('ul:first').css({visibility: "visible",display: "none"}).slideDown("medium"); },function(){ $(this).find('ul:first').css({visibility: "hidden"}).slideUp("medium");; }); $(".slidetabs").tabs(".images > div", { effect: "fade", fadeOutSpeed: 3000, fadeInSpeed: 2600, rotate: true }).slideshow({autoplay: true, interval: 6000}); jQuery(".search-input").toggleVal(); Cufon.replace('#top-menu ul li a'); Cufon.replace('#footer-menu ul li'); Cufon.replace('.images a'); Cufon.replace('.loginform td'); Cufon.replace('h2, h3'); Cufon.replace('h2, h3'); Cufon.replace('.user-submit'); Cufon.replace('.gtitle'); loadGraphs(); function loadGraphs(element) { var host = server_http_host(); if (host == 'localhost') { var ajax_url = 'http://'+host+'/ceeor/newceeorweb/'; } else { var ajax_url = 'http://'+host+'/'; } $(".graph-box").each(function(index) { var setup_id = $(this).attr('id'); var graph_el = $(this); $.ajax({ type: 'GET', url: ajax_url+'ajax/graphs.php', data: "p_id="+setup_id, dataType: 'json', async: true, cache: true, success: function(data) { if (data['status'] != null) { graph_el.empty(); //data['html'] = 'ffewfefwfwfe'; graph_el.append(data['html']); } else { graph_el.empty(); graph_el.append('Error occured. Please contact administrator.'); } } }); }); } function server_http_host(){ var url = window.location.href; url = url.replace("http://", ""); var urlExplode = url.split("/"); var serverName = urlExplode[0]; return serverName; } });