var top_url = ''+window.top.location+''; //alert(top_url); var broken_url = top_url.split("/"); var size = broken_url.length; var check_page = (size-2)*1; //alert('---------->'+broken_url[check_page-1]); var browser_version = parseInt($.browser.version); $.holdReady(true); $.getScript("https://apis.google.com/js/plusone.js", function() { $("#___plusone_0").css('margin-top','14px'); $.holdReady(false); if(browser_version==7 && $.browser.msie) { $("#___plusone_0").css('margin-left','135px'); } }); $(window).load(function() { if(document.getElementById('slider')) { $('#slider').nivoSlider(); } if($('.nivo-controlNav')) { setTimeout("$('.nivo-controlNav').css('z-index',1000)",2000); } }); $(document).ready(function() { $('#get_quote').hide(); }); function get_quote_open() { //alert('---------------'); $('#get_quote').slideDown(600); //$('#get_quote').show(); $("#body_bg").attr('style','') } function close_quote(){ $('#get_quote').slideUp(600); //$('#get_quote').hide(); $("#body_bg").attr('style','margin-top:0px;') } /*START: Featured Image Slider*/ $(document).ready(function(){ if(document.getElementById('mycarousel')) { $('#mycarousel').jcarousel(); } }); /*END: Featured Image Slider*/ $(function(){ $('#slides').slides({ preload: true, //preloadImage: '', preloadImage: $("#blog_template").val+'/images/home_img/loading.gif', play: 5000, pause: 5000, hoverPause: true, animationStart: function(){ $('.caption').animate({ bottom:-35 },100); }, animationComplete: function(current){ $('.caption').animate({ bottom:0 },200); if (window.console && console.log) { // example return of current slide number //console.log(current); }; } }); }); $("#slides").css('opacity','0'); $(document).ready(function(){ $(".paging_content").show(); $("#mycarousel").css('visibility','visible'); $("#slides").css('opacity','1'); $(".slide_testimonial").css('width','400px'); $(".slide_testimonial p").css('width','400px'); $("#menu-item-653").click(function(){ $.session("testimonial_sel",1); }); $(".slide_testimonial span").click(function(){ $.session("testimonial_sel",1); }); $("#testimonial_post a").click(function(){ $.session("testimonial_sel",1); }); /*START: Remove enquiery link from sitemap*/ $(".sitemap .page-item-331").remove(); /*END: Remove enquiery link from sitemap*/ //alert('---------->'+$.session("testimonial_sel")); if(broken_url[check_page]=='about-us'||broken_url[check_page-1]=='about-us') { $('#menu-item-364').css('padding-top','0px'); } if(broken_url[check_page]=='about-us') { $('#menu-item-364').css('paddint-top','16px'); } //alert('---------->'+broken_url[check_page]); $("#mycarousel a,img").click(function(){ $.session("featured_work_sel",1); }); var success = 1; $("#menu-service_menu li ul").hide(); // hides all service sub menu //alert('---------->'+broken_url[check_page-1]); /*START: Menu highlighting*/ if(broken_url[check_page-1]=='about-us') { $("#menu-item-259").addClass('current_page_item'); } else if(broken_url[check_page-1]=='our-services' || broken_url[check_page-1]=='services') { $("#menu-item-750").addClass('current_page_item'); } else if(broken_url[check_page-1]=='work') { $("#menu-item-655").addClass('current_page_item'); } else if(broken_url[check_page-2]=='work') { $("#menu-item-655").addClass('current_page_item'); } /*END: Menu highlighting*/ $("#menu-item-655").click(function(){ $.session("work_menu_sel",1); }); if($.session("work_menu_sel")==1) { $("#menu-item-598").children().show(); } $.session("work_menu_sel",'2'); /*START: Paging*/ //alert('---------->'+$(".paging_content").length); var total_page_length = $(".paging_content").length; //alert('---------->'+total_page_length); total_page_length = Math.ceil(total_page_length/6); //alert('---------->'+total_page_length); var cur_page = 1; $(".paging_content").each(function(i,variable){ var temp = (i+1)*1; if(temp>6) { $(this).hide(); } }); if(cur_page==1) { $("#prev_page_link").css('visibility','hidden'); } else { $("#prev_page_link").css('visibility','visible'); } $("#next_page_link").click(function(){ cur_page = cur_page+1; var to_hide = (cur_page-1)*6; var to_show = cur_page*6; if(cur_page==total_page_length) { $("#next_page_link").css('visibility','hidden'); } else { $("#next_page_link").css('visibility','visible'); } if(cur_page==1) { $("#prev_page_link").css('visibility','hidden'); } else { $("#prev_page_link").css('visibility','visible'); } $(".paging_content").each(function(i,variable){ var temp = (i+1)*1; if(temp>to_hide && temp <= to_show) { //alert('---------->'+temp); $(this).show(); } else { $(this).hide(); } }); }); $("#prev_page_link").click(function(){ cur_page = cur_page-1; var to_hide = (cur_page-1)*6; var to_show = cur_page*6; if(cur_page==total_page_length) { $("#next_page_link").css('visibility','hidden'); } else { $("#next_page_link").css('visibility','visible'); } if(cur_page==1) { $("#prev_page_link").css('visibility','hidden'); } else { $("#prev_page_link").css('visibility','visible'); } $(".paging_content").each(function(i,variable){ var temp = (i+1)*1; if(temp>to_hide && temp <= to_show) { //alert('---------->'+temp); $(this).show(); } else { $(this).hide(); } }); }); if(total_page_length==1) { $("#prev_page_link").css('visibility','hidden'); $("#next_page_link").css('visibility','hidden'); } /*END: Paging*/ if(broken_url[check_page]=='our-services') { $(".entry-title").remove(); $(".entry-content").parent().addClass('ourwork_new'); } $(".acsu_h1_div").hide(); /*Start : Remove Site Map link */ $(".sitemap a").each(function(){ if($(this).attr('title')=='sitemap') { $(this).parent().remove(); } }); /*Stop : Remove Site Map link */ $("#testimonial_post a:last").css('border-bottom','none'); if(broken_url[check_page-1]=='featured-work' || broken_url[check_page-1]=='websites-work') { $(".imag_dtls p").each(function(i,variable){ if(i==0) { $(this).css('text-align','center'); } }); } //$(".imag_dtls p:first").css('text-align','center'); $("#mycarousel div:last").css('border-right','none'); //$(".blog_listing p:first").removeClass('entry-meta').addClass('entry-blog'); $(".blog_listing p:nth-child(2)").removeClass('entry-meta').addClass('entry-blog'); $("#menu-service_menu sub-menu").each(function(){ $(this).hide(); }); $("#service_menu_sub_menu .current-menu-item").children().show(); $("#service_menu_sub_menu .current-category-parent").children().show(); $("#home_body_bg").css('background-color','#000000'); $('#___plusone_0').css('margin-top','14px'); $("#service_menu_sub_menu").show(); $(".current-post-parent").addClass('current-menu-item'); //$(".current-menu-parent").addClass('current-menu-item'); if(browser_version==7 && $.browser.msie) { $("#___plusone_0").css('margin-left','135px'); } }); /*Start : Display Old Content*/ function showOldContent() { $("#old_content").slideDown('slow'); if($.browser.msie) { $('html, body').animate({scrollTop: 1210}, 800); } else { $('html, body').animate({scrollTop: 1210}, 800); } } function closeOldContent() { $("#old_content").slideUp('slow'); } /*Stop : Display Old Content*/