$(document).ready(function(){ $('.menu li').mouseover(function(){ $(this).addClass('iehover'); }); $('.menu li').mouseout(function(){ $(this).removeClass('iehover'); }); $('.brand_linking').click(function(){ var cat = $(this).attr('rel'); $('.brand_linking').parent().removeClass('active'); $(this).parent().addClass('active'); var loader = '
'; $('.ajax_loader').html(loader); $.ajax({ type: "GET", url: "http://www.nikki.co.za/wp-content/themes/xero/scripts/nikki_ajax.php", data: "function=brand_ajax&cat="+cat, success: function(html){ $('.ajax_loader').html(html); } }); }); $('.branch_linking').click(function(){ var branch = $(this).attr('rel'); var loader = '
'; $('.ajax_loader').html(loader); $.ajax({ type: "GET", url: "nikki_ajax.php", data: "function=branch_ajax&branch="+branch, success: function(html){ $('.ajax_loader').html(html); } }); }); $('.gallery_linking').click(function(){ var gal = $(this).attr('rel'); var loader = '
'; $('.ajax_loader').html(loader); $.ajax({ type: "GET", url: "http://www.nikki.co.za/wp-content/themes/xero/scripts/nikki_ajax.php", data: "function=gallery_ajax&gal="+gal, success: function(html){ $('.ajax_loader').html(html); } }); }); });