Rev 5038 | Rev 6981 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
$(function(){$("#userSelector .default").truncate({addtitle: true});function submitSeachForm() {var query = $.trim($('#query').val());if(query != '' && query != 'Search for more items...') {$('#formSearch').submit();} else {$('#query').focus();}}/** Search in Header **/$('#query').val('Search for more items...').focus(function(){$(this).val('');}).blur(function(){if ($(this).val() == '') $(this).val('Search for more items...');});$('#searchButton').click(function(){submitSeachForm();});$('input.mk_filter').change(function(){var search = window.location.search;if(window.location.search=="") {search = "?";}var currenturl = window.location.pathname + search;if(this.checked) {window.location = (currenturl) + this.value;} else {window.location = (currenturl).replace(this.value, "");}});$('a.mk_filter').click(function(){//first remove all fqs except category and sub category when//any of the category links are clickedvar search = window.location.search;if(window.location.search=="") {search = "?";}var currenturl = window.location.pathname + search;classNames = $(this).attr("class");if(classNames.indexOf("mk_bold") >= 0) {//if this is selected category filter, remove subcategory filter from urlwindow.location = currenturl.replace($(this).closest('ul').find('.mk_bold.mk_subcategory').attr("value"), "");}else {//check if sub-category is changed, if yes then remove the previous sub-category and add this sub-categoryif(classNames.indexOf("mk_subcategory") >= 0) {window.location = currenturl.replace($(this).closest('ul').find('.mk_bold.mk_subcategory').attr("value"), "") + $(this).attr("value");}else {window.location = (currenturl).replace($(this).closest('ul').find('.mk_bold.mk_category').attr("value"), "").replace($(this).closest('ul').find('.mk_bold.mk_subcategory').attr("value"),"") + $(this).attr("value");}}});$('a.mk_filter_close').click(function(){var search = window.location.search;if(window.location.search=="") {search = "?";}var currenturl = window.location.pathname + search;var newurl = currenturl;var filterValue = $(this).attr("value");if(filterValue.indexOf("F_50010")>-1){$(this).closest('div').find('.mk_filter_close').each(function(index,value){newurl = newurl.replace($(value).attr("value"), "");});} else {newurl = newurl.replace($(this).attr("value"), "");}window.location = newurl;});$('body').mouseup(function(){var userSelector = $('#userSelector');var isMouseOnUserSelector = $(userSelector).data('is_mouse_on_user_selector');if (typeof(isMouseOnUserSelector) == 'boolean' && !isMouseOnUserSelector) {$(userSelector).children('ul').hide();$(userSelector).data('usermenustate', false);$(userSelector).removeClass('active');}});$('#userSelector').click(function(){var userMenuState = $(this).data('usermenustate');if (typeof(userMenuState) == 'undefined' || !userMenuState) {$(this).addClass('active');$(this).children('ul').show();$(this).data('usermenustate', true);} else {$(this).removeClass('active');$(this).children('ul').hide();$(this).data('usermenustate', false);}}).hover(function(){$(this).data('is_mouse_on_user_selector', true);}, function(){$(this).data('is_mouse_on_user_selector', false);});/** Press Coverage Section **/$('#asSeenOnBS').click(function(){window.open('http://www.business-standard.com/india/news/spice-launches-online-shopping-portal-saholiccom/434451/', '_blank');trackEventWithGA('Press Coverage', 'Logo Click', 'Business Standard');});$('#asSeenOnTOI').click(function(){window.open("http://articles.timesofindia.indiatimes.com/2012-01-25/telecom/30662542_1_nokia-s-windows-phone-nokia-lumia-smartphone", '_blank');trackEventWithGA('Press Coverage', 'Logo Click', 'The Times of India');});$('#asSeenOnWSJ').click(function(){window.open('http://online.wsj.com/article/SB10001424052702304447804576412930555639142.html', '_blank');trackEventWithGA('Press Coverage', 'Logo Click', 'The Wall Street Journal');});$('#asSeenOnMC').click(function(){window.open("http://www.moneycontrol.com/news/technology/nokia-lumia-710-available-for-approximately-rs15700_655601.html", '_blank');trackEventWithGA('Press Coverage', 'Logo Click', 'Money Control');});});