jQuery(function(){ $('ul.tabs').each(function(){ // For each set of tabs, we want to keep track of // which tab is active and it's associated content var $active, $content, $links = $(this).find('a'); // Use the first link as the initial active tab $active = $links.first().addClass('active'); $content = $($active.attr('href')); // Hide the remaining content $links.not(':first').each(function () { $($(this).attr('href')).hide(); }); // Bind the click event handler $(this).on('click', 'a', function(e){ // Make the old tab inactive. $active.removeClass('active'); $content.hide(); // Update the variables with the new link and content $active = $(this); $content = $($(this).attr('href')); // Make the tab active. $active.addClass('active'); $content.show(); // Prevent the anchor's default click action e.preventDefault(); }); }); jQuery('ul.sf-menu').superfish({ autoArrows : false, animation : {opacity:'show', height:'show'}, easing: 'easeInOutBounce' }); var container = jQuery(".expand"); jQuery("#open-close").click(function(event) { event.preventDefault(); if (container.is(":visible")) { container.slideUp(300); } else { container.slideDown(200); } }); var container2 = jQuery(".expand2"); jQuery("#open-close2").click(function(event) { event.preventDefault(); if (container2.is(":hidden")) { container2.slideDown(200); } else { container2.slideUp(300); } }); jQuery.supersized({ // Functionality slide_interval : 4000, // Length between transitions transition : 1, // 0-None, 1-Fade, 2-Slide Top, 3-Slide Right, 4-Slide Bottom, 5-Slide Left, 6-Carousel Right, 7-Carousel Left transition_speed : 1800, // Speed of transition // Components slide_links : 'blank',// Individual links for each slide (Options: false, 'num', 'name', 'blank') slides : [ // Slideshow Images {image : 'contentbg/1.jpg', title : 'Image', thumb : 'contentbg/thumb1.jpg', url : ''}, {image : 'contentbg/2.jpg', title : 'Image', thumb : 'contentbg/thumb2.jpg', url : ''}, {image : 'contentbg/3.jpg', title : 'Image', thumb : 'contentbg/thumb3.jpg', url : ''}, {image : 'contentbg/4.jpg', title : 'Image', thumb : 'contentbg/thumb4.jpg', url : ''}, {image : 'contentbg/5.jpg', title : 'Image', thumb : 'contentbg/thumb5.jpg', url : ''}, {image : 'contentbg/6.jpg', title : 'Image', thumb : 'contentbg/thumb6.jpg', url : ''}, {image : 'contentbg/7.jpg', title : 'Image', thumb : 'contentbg/thumb7.jpg', url : ''}, {image : 'contentbg/8.jpg', title : 'Image', thumb : 'contentbg/thumb8.jpg', url : ''}, {image : 'contentbg/9.jpg', title : 'Image', thumb : 'contentbg/thumb9.jpg', url : ''}, {image : 'contentbg/10.jpg', title : 'Image', thumb : 'contentbg/thumb10.jpg', url : ''} ] }); }); function send() { $("#form-main").submit(function() { $(this).ajaxSubmit(options); return false; // cancel conventional submit }); } /** * Copyright 2010 by GlamThumbs Team. * * This is an example to demostrate the BookmarkApp.js by GlamThumbs Team. * Reference: http://glamthumbs.com/BookmarkApp.js * Reference: http://stackoverflow.com/questions/992844/add-to-browser-favorites-bookmarks-from-javascript-but-for-all-browsers-mine-doe * */ BookmarkApp = function () { var isIEmac = false; /*@cc_on @if(@_jscript&&!(@_win32||@_win16)&&(@_jscript_version<5.5)) isIEmac=true; @end @*/ var isMSIE = (-[1,]) ? false : true; var cjTitle = document.title; // Bookmark title var cjHref = location.href; // Bookmark url function hotKeys() { var ua = navigator.userAgent.toLowerCase(); var str = ''; var isWebkit = (ua.indexOf('webkit') != - 1); var isMac = (ua.indexOf('mac') != - 1); if (ua.indexOf('konqueror') != - 1) { str = 'CTRL + B'; // Konqueror } else if (window.home || isWebkit || isIEmac || isMac) { str = (isMac ? 'Command/Cmd' : 'CTRL') + ' + D'; // Netscape, Safari, iCab, IE5/Mac } return ((str) ? 'Press ' + str + ' to bookmark this page.' : str); } function isIE8() { var rv = -1; if (navigator.appName == 'Microsoft Internet Explorer') { var ua = navigator.userAgent; var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})"); if (re.exec(ua) != null) { rv = parseFloat(RegExp.$1); } } if (rv > - 1) { if (rv >= 8.0) { return true; } } return false; } function addBookmark(a) { try { if (typeof a == "object" && a.tagName.toLowerCase() == "a") { a.style.cursor = 'pointer'; if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) { window.sidebar.addPanel(cjTitle, cjHref, ""); // Gecko return false; } else if (isMSIE && typeof window.external == "object") { if (isIE8()) { window.external.AddToFavoritesBar(cjHref, cjTitle); // IE 8 } else { window.external.AddFavorite(cjHref, cjTitle); // IE <=7 } return false; } else if (window.opera) { a.href = cjHref; a.title = cjTitle; a.rel = 'sidebar'; // Opera 7+ return true; } else { alert(hotKeys()); } } else { throw "Error occured.\r\nNote, only A tagname is allowed!"; } } catch (err) { alert(err); } } return { addBookmark : addBookmark } }();