//super fish menu
jquery(function(){
jquery('ul.sf-menu').superfish({
autoarrows: false,
dropshadows: false,
delay: 100,
speed: 100
});
});
//home slideshow
$(function(){
jquery('#slides').slides({
preload: true,
preloadimage: './images/loading.gif',
play: 5000,
pause: 2500,
hoverpause: true,
animationstart: function(current){
jquery('.caption').animate({
bottom:-35
},100);
if (window.console && console.log) {
// example return of current slide number
console.log('animationstart on slide: ', current);
};
},
animationcomplete: function(current){
jquery('.caption').animate({
bottom:0
},200);
if (window.console && console.log) {
// example return of current slide number
console.log('animationcomplete on slide: ', current);
};
},
slidesloaded: function() {
jquery('.caption').animate({
bottom:0
},200);
}
});
});
//home tab
$(function(){
jquery(".tab_content div").hide();
jquery(".tab_content div:first").show();
jquery(".tabnav:first").addclass("current");
jquery(".tabnav").bind("click", function(){
jquery(".tab_content div").hide();
jquery(".tabnav").removeclass("current");
jquery(this).addclass("current");
var tab_select = ".tab_content ." + jquery(this).attr("id");
jquery(tab_select).show();
});
})
//inside tab
$(function(){
//initial
jquery(".inside_tabs li:first").addclass("selected");
jquery(".inside_tabs li a").before('');
jquery(".inside_tabs li a").after('');
//$(".inside_tabs li:first a").before('');
//$(".inside_tabs li:first a").after('');
jquery(".inside_tabs").nextall().hide();
jquery(".inside_tabs").next().show();
//click
jquery(".inside_tabs li a").bind("click",function(){
//remove class
jquery(".inside_tabs li").removeclass("selected");
//add class
jquery(this).parent().addclass("selected");
//hide content
jquery(".inside_tabs").nextall().hide();
//show content
var content_id = jquery(this).attr("href");
jquery(content_id).show();
return false;
})
})
//new img tit
$(window).load(function() {
var imgamount = jquery(".news_content .img").length;
for(i=0;i 0)
{
jquery('.' + mapping.targetclass).addclass('current');
if (mapping.parentclass != null && mapping.parentclass != "")
{
jquery('.' + mapping.parentclass).addclass('current');
}
}
}
}
$(document).ready(function() {
initleftmenu();
});
function checkcurrentlocation() {
var location = window.location.tostring();
for (var a = 0; a < leftmenumapping.length; a++) {
var pattern = new regexp(leftmenumapping[a].key);
if (location.search(pattern) > -1) {
if(leftmenumapping[a].key == "msg"){
var query = getqueryparams(document.location.search);
if(query.type == leftmenumapping[a].param){
return leftmenumapping[a];
}else if(typeof query.type == "undefined"){
return leftmenumapping[19];
}else{
}
}else{
return leftmenumapping[a];
}
}
}
return null;
}
////////////////////////////////////////////////////////////////////////////////////////////
//sideshow
$(function(){
jquery("a[rel=project_group_1],a[rel=project_group_2],a[rel=project_group_3],a[rel=project_group_4],a[rel=project_group_5]").fancybox({
'overlayshow' : false,
'transitionin' : 'elastic',
'transitionout' : 'elastic'
});
})
////////////////////////////////////////////////////////////////////////////////////////////
//chart link
$(function(){
jquery("#chart_btn1, #chart_btn3").click(function(){
//remove class
jquery(".inside_tabs li").removeclass("selected");
//add class
jquery(".inside_tabs li:eq(1)").addclass("selected");
//hide content
jquery(".inside_tabs").nextall().hide();
//show content
jquery("#tab2").show();
return false;
});
jquery("#chart_btn2").click(function(){
//remove class
jquery(".inside_tabs li").removeclass("selected");
//add class
jquery(".inside_tabs li:eq(4)").addclass("selected");
//hide content
jquery(".inside_tabs").nextall().hide();
//show content
jquery("#tab5").show();
return false;
});
})