var $j = jQuery.noConflict(); $j(document).ready(function(){ //Hide (Collapse) the toggle containers on load $j(".toggle_container").hide(); //Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state) $j("h2.toggle").click(function(){ $j(this).toggleClass("active").next().slideToggle("slow"); return false; //Prevent the browser jump to the link anchor }); //$j("h2#active").click(); $j(".prodspectbl tr:odd").addClass("odd"); $j(".tableodd tr:odd").addClass("odd"); $j(".pozostaletable tr:odd").addClass("odd"); // Add pdf icons to pdf links $j("a[href$='.pdf']").addClass("pdf"); // Add txt icons to document links (doc, rtf, txt) //$j("a[href$='.doc'], a[href$='.txt'], a[href$='.rft']").addClass("txt"); // Add zip icons to Zip file links (zip, rar) //$j("a[href$='.zip'], a[href$='.rar']").addClass("zip"); // Add email icons to email links //$j("a[href^='mailto:']").addClass("email"); //Add external link icon to external links - //$j('a').filter(function() { //Compare the anchor tag's host name with location's host name //return this.hostname && this.hostname !== location.hostname; //}).addClass("external"); //You might also want to set the _target attribute to blank /* //$j('a').filter(function() { //Compare the anchor tag's host name with location's host name // return this.hostname && this.hostname !== location.hostname; //}).addClass("external").attr("target", "_blank"); */ }); //When page loads… $j(document).ready(function(){ $j(".tab_content").hide(); //Hide all content $j("ul.tabs li:first").addClass("active").show(); //Activate first tab $j(".tab_content:first").show(); //Show first tab content //On Click Event $j("ul.tabs li").click(function() { $j("ul.tabs li").removeClass("active"); //Remove any “active” class $j(this).addClass("active"); //Add “active” class to selected tab $j(".tab_content").hide(); //Hide all tab content var activeTab = $j(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content activeTab = activeTab.split("#"); //bugfixed by droope :) if ($j.browser.msie) {$j("#"+activeTab[activeTab.length-1]).show(); } else {$j("#"+activeTab[activeTab.length-1]).fadeIn(); } //$j("#"+activeTab[activeTab.length-1]).fadeIn(); //Fade in the active ID content return false; }); //When page loads… $j(".tab2_content").hide(); //Hide all content $j("ul.tabs2 li:first").addClass("active").show(); //Activate first tab $j(".tab2_content:first").show(); //Show first tab content //On Click Event $j("ul.tabs2 li").click(function() { $j("ul.tabs2 li").removeClass("active"); //Remove any “active” class $j(this).addClass("active"); //Add “active” class to selected tab $j(".tab2_content").hide(); //Hide all tab content var activeTab2 = $j(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content activeTab2 = activeTab2.split("#"); //bugfixed by droope :) $j("#"+activeTab2[activeTab2.length-1]).fadeIn(); //Fade in the active ID content return false; }); });