$.noconflict(); jquery(document).ready(function($) { //set last elements in website jquery("#content div.portfolio-one-column-circle:last").addclass("portfolio-one-column-circle-last"); jquery("#content div.portfolio-one-column-slideshow:last").addclass("portfolio-one-column-slideshow-last"); jquery("#content div.portfolio-one-column-full:last").addclass("portfolio-one-column-full-last"); jquery("#toptoolbar .menu-toptoolbar ul li a:last").addclass("last-child"); jquery("#tour ul li:last").addclass("last-child"); jquery(".menu-header ul li:first").addclass("first-child"); jquery(".menu-header ul li:last-child").addclass("last-child"); jquery("#sub-footer .menu-footer ul li:last").addclass("last-child"); jquery("#footer-tabs .tab:last").addclass("tab-last-child"); jquery("#front-page-botton-widgets div.column li.widget-container:last").addclass("last-child"); jquery("#front-page-presentation-row-4 ul li.widget-container:last-child").addclass("last-child"); jquery("#front-page-business #front-page-botton-widgets div.column:last-child").addclass("last-child"); //main menu sub menus effects jquery('.menu-header ul').superfish({ delay: 500, animation: {opacity:'show',height:'show'}, speed: 'fast', autoarrows: true, dropshadows: false }); //form replacement $("#content form").jqtransform(); //content scrollers call if ( $('#bottom-content-scroll ul li').size() > 0 ) { jquery("#bottom-content-scroll ul").bxslider({mode: 'fade', infiniteloop: true, pager: true, controls: false, auto: true, autohover: true, speed: '800', pause:'3000'}); } if ( $('#footer-partners ul li').size() > 0 ) { jquery("#footer-partners ul").bxslider({infiniteloop: true, pager: false, controls: true, auto: true, autohover: true, speed: '800', pause:'3000',displayslideqty: 5,moveslideqty: 1 }); } if ( $('#front-page-presentation-row-5 ul li').size() > 0 ) { jquery("#front-page-presentation-row-5 ul").bxslider({infiniteloop: true, pager: false, controls: true, auto: true, autohover: true, speed: '800', pause:'4000',displayslideqty: 4,moveslideqty: 1 }); } //blog accordion call jquery("#blog-accordion").accordion({autoheight: false}); //rework jquery ui tabs for tour jquery('#tour').tabs(); jquery('#tour li a').click(function() { jquery('#tour li').removeclass('ui-tabs-before-active'); jquery('#tour .ui-state-active').prevall('li').addclass('ui-tabs-before-active'); }); //add tooltips to front page news bottom posts and to content jquery('#bottom-posts a[title]').tooltip({ 'effect':'slide', 'offset':[-6, 70],'layout': '
'}); jquery('#sharing a[title]').tooltip({ 'effect':'slide', 'offset':[-20,100],'layout': '
'}); jquery('#related a[title]').tooltip({ 'effect':'slide', 'offset':[-2,70],'layout': '
'}); jquery('#content a.gototooltip[title]').tooltip({ 'effect':'slide', 'offset':[-6, 70],'layout': '
'}); jquery('#content a.tooltip-title[title]').tooltip({ 'effect':'slide', 'offset':[90, 70],'layout': '
'}); jquery('#tour a.tour-page-title[title]').tooltip({ 'effect':'slide', 'offset':[-6, 110],'layout': '
'}); jquery('#front-page-presentation-row-5 a.move-to-tooltip[title]').tooltip({ 'effect':'slide', 'offset':[-6, 110],'layout': '
'}); //add style classes to tables jquery("#content table tr:even").addclass("alternative"); jquery("#content table tr td:last-child").addclass("last"); jquery("#content table tr th:last-child").addclass("last"); jquery("#content table.pricing tr td").removeclass("last"); jquery("#content table.pricing tr").removeclass("alternative"); jquery("#content table.pricing tr.buttons td:first-child").addclass("first") jquery("#content table.pricing tr.buttons td:last-child").addclass("last"); jquery("#content table.pricing tr.content td:first-child").addclass("first"); //portfolios page peal $(".pageflip").each(function(){ $(this).hover(function() { $(this).find('img.flip').stop() .animate({width: '60px', height: '60px'}, 400); $(this).find('.icon').stop() .animate({width: '60px', height: '60px'}, 400); } , function() { $(this).find('img.flip').stop() .animate({width: '20px', height: '20px'}, 220); $(this).find('.icon').stop() .animate({width: '20px', height: '20px'}, 200); }); }); //social icons hover effect if(!jquery.browser.msie && jquery.browser.version.substring(0, 2) != "8.") { $("#toolbar-sharing a").each(function(){ if ( $.browser.msie && parseint($.browser.version, 10) == '8') { $(this).css('filter', 'alpha(opacity=50)'); } else { $(this).css('opacity', '0.5'); } $(this).hover( function(){ if ( $.browser.msie && parseint($.browser.version, 10) == '8') { $(this).stop().animate({'filter': 'alpha(opacity=100)'}, 300); } else { $(this).stop().animate({'opacity': '1'}, 300); } }, function(){ if ($.browser.msie && parseint($.browser.version, 10) == '8') { $(this).stop().animate({'filter': 'alpha(opacity=50)'}, 300); } else { $(this).stop().animate({'opacity': '0.5'}, 300); } } ) }); } //protfolio cirlce hover effect $("#content span.portfolio-icon").each(function(){ $(this).css('opacity', '0.0'); $(this).hover( function(){ $(this).stop().animate({'opacity': '1.0'}, 300); $(this).next('.blackandwhite').stop().animate({'opacity': '0.0'}, 300); }, function(){ $(this).stop().animate({'opacity': '0.0'}, 300); $(this).next('.blackandwhite').stop().animate({'opacity': '1.0'}, 300); } ) }); //modal windows calls $(".gallery-icon a").attr('rel','gallery[modal]'); $("img.alignnone, img.aligncenter, img.alignleft, img.alignright").parent().attr('rel','single-modal'); $("div.alignnone a, div.aligncenter a, div.alignleft a, div.alignright a").attr('rel','single-modal'); $("a[rel^='gallery[modal]'],a[rel^='minigallery[modal]'],a[rel^='single-modal'],a[rel^='portfolio[modal]']").prettyphoto({theme: 'duotive-modal', opacity:0.5, show_title: false, overlay_gallery:true}); //other calls jquery('.tabs,.sidebar-tabs').tabs() jquery('.accordion').accordion({autoheight: false, active:-1, collapsible: true }); jquery("#content .accordion .ui-accordion-content p:last-child").addclass("no-padding-bottom"); jquery("#content .tabs .ui-tabs-panel p:last-child").addclass("no-padding-bottom"); jquery("#table-of-content ul li:even").addclass("alternative"); //form validation $("#commentform").validate(); $("#contactform").submit(function() { if ( $("#contactform input[name=name]").val() == 'name:' ) $("#contactform input[name=name]").val(''); if ( $("#contactform input[name=email]").val() == 'e-mail:' ) $("#contactform input[name=email]").val(''); if ( $("#contactform input[name=subject]").val() == 'subject:' ) $("#contactform input[name=subject]").val(''); if ( $("#contactform textarea[name=message]").val() == 'message:' ) $("#contactform textarea[name=message]").val(''); }) $("#contactform").validate(); function showloader () { $('#contact-form-loader').fadein(); } function showresponse(responsetext, statustext, xhr, $form) { $('#contact-form-loader').fadeout(); $('#contact-confirmation-message').html(responsetext); $('#contact-confirmation-message').fadein(); } var contactformoptions = { beforesubmit: showloader, // pre-submit callback success: showresponse // post-submit callback }; $('#contactform').ajaxform(contactformoptions); }); jquery(window).load(function () { //columns heights function equalheight(){ var maxheight = 0; jquery("#front-page-presentation-row-1 div ul").each(function(index){ if (jquery(this).height() > maxheight) maxheight = jquery(this).height(); }); jquery("#front-page-presentation-row-1 div.sep").height(maxheight); } equalheight(); });