Subversion Repositories SmartDukaan

Rev

Rev 6840 | Rev 6967 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4126 varun.gupt 1
$(function(){
4984 varun.gupt 2
	function CollapsibleWidget(container)	{
3
 
4
		this.widgetContainer = container;
5
		this.collapsbiles = $(container).children('.common-widget-control-bar, .common-widget-content-area');
6
		this.isCollapsed = null;
7
 
8
		this.collapse = function()	{
9
			$(this.collapsbiles).each(function()	{
10
				$(this).slideUp();
11
			});
12
			this.isCollapsed = true;
13
		};
14
 
15
		this.open = function()	{
16
			$(this.collapsbiles).each(function()	{
17
				$(this).slideDown();
18
			});
19
			this.isCollapsed = false;
20
		};
21
 
22
		this.test = function()	{
23
		};
24
	}
4798 varun.gupt 25
 
4984 varun.gupt 26
	ResearchWidget.prototype = new CollapsibleWidget();
27
	ResearchWidget.prototype.constructor = CollapsibleWidget;
28
 
29
	function ResearchWidget(container)	{
30
		CollapsibleWidget.call(this, container);
31
	}
32
 
4798 varun.gupt 33
	function updateCompareCount()	{
34
		$('#research_compare_count').html($('#myresearch input[type="checkbox"]:checked').length);
35
	}
36
 
4126 varun.gupt 37
	/** Sidebar Widgets **/
4237 varun.gupt 38
 
6840 kshitij.so 39
	$('#otg_know_more,.otg_know_more').click(function(){
6552 kshitij.so 40
		$.colorbox({
41
    		width: "490px",
6772 kshitij.so 42
    		height: "420px",
6552 kshitij.so 43
    		inline: true,
44
    		href: "<h3 style='text-align: center; margin: 18px; font-size: 14px;'>On Time Guarantee, We Pay if we Delay</h3>" +
45
		"<p style='text-align: justify; margin-left: 12px; margin-right: 12px; margin-bottom: 9px; line-height: 22px;'>Saholic stands for 100% on time delivery. We ensure all your orders reach your doorstep on or "+
46
        "before the promised delivery date. In the rare case that we deliver an order later than promised "+
47
        "we will compensate you.This Guarantee is Valid on"+
48
        "</p>" +
49
        "<ul style='list-style: disc none none; margin-left: 25px; text-align: justify; margin-right:12px; line-height: 22px;'><li>All Mobiles, Cameras, Laptops, Tablets and Accessories above Rs. 2000 in value."+
50
        "</li>"+
51
        "<li>Orders Placed using Credit/Debit Card, Net Banking, EMI, Prepaid Cash Cards."+
52
        "</li>"+
53
        "</ul>"+
6772 kshitij.so 54
        "<p style='text-align: justify; line-height: 22px; margin: 12px;'>Compensation for delay is in the form of Gift Vouchers at the rate of Rs. 50 per business day. " +
55
        "GV can be applied to ANY product on Saholic.com without limitation.</p>"+
6598 amit.gupta 56
        "<span class='right'><a target='_blank' href='/static/on-time-guarantee' style='margin-right: 12px';>Detailed Terms & Conditions</a></span>",
6552 kshitij.so 57
        onComplete: function(){
58
		trackEventWithGA('Widget', 'OTG Know More is clicked', '');
59
			}
60
    	});
61
	});
62
 
4237 varun.gupt 63
	$('#shoppingExpInfo').click(function(){
64
		$.colorbox({
4284 varun.gupt 65
    		width: "550px",
66
    		height: "320px",
4237 varun.gupt 67
    		inline: true,
68
    		href: "<h3>Shopping with Saholic.com is completely safe</h3><br />" +
4284 varun.gupt 69
		"<b>1.</b> We are part of Spice Group - India's # 1 Mobile retailer.<br /><br />" +
70
		"<b>2.</b> We procure directly from the Manufacturers - Hence we only sell genuine products with full Manufacturer Warranty.<br /><br />" +
71
		"<b>3.</b> We provide free Next Day Delivery to most locations - You can check the delivery time to your location by entering your pin code on the product page.<br /><br />" +
6173 kshitij.so 72
		"<b>4.</b> We use the best Internet Security technology - Your payment is 100% secure.<br />",
4372 varun.gupt 73
			onComplete: function(){
6261 amit.gupta 74
				trackEventWithGA('Widget', 'Safe shopping sticky banner is clicked', '');
4372 varun.gupt 75
			}
4237 varun.gupt 76
    	});
77
	});
6245 kshitij.so 78
 
6552 kshitij.so 79
 
6959 kshitij.so 80
	$('.emiInfo').click(function(){
6453 kshitij.so 81
		$.colorbox({
6959 kshitij.so 82
    		width: "580px",
83
    		height: "475px",
6453 kshitij.so 84
    		inline: true,
6552 kshitij.so 85
    		href: "<h3 style='font-size: 14px; margin: 5px;'>EMI Details</h3><br />" +
6772 kshitij.so 86
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; padding-right: 10px;'><li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
87
    		"<br>"+
6959 kshitij.so 88
    		"<li>EMI Rate and Minimum Amount are as follows</li>"+
89
    		"<br>"+
6772 kshitij.so 90
            "<table width='94%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;margin-left: 0px'>"+
91
            "<thead>"+
6959 kshitij.so 92
            "<th style='border-width: 1px 0px 1px 1px; border-style: solid;border-color: gray;'></th>"+
93
            "<th style='border-width: 1px 0px 0px 1px; border-style: solid; border-color: gray;text-align:center;font-weight:normal'>Minimum</th>"+
94
            "<th style='border:1px solid gray;text-align: center;' colspan='5'>All Inclusive Processing Fee*</th>"+
6772 kshitij.so 95
            "</thead>"+
96
            "<tbody>"+
97
            "<tr>"+
6959 kshitij.so 98
            "<td style='border-left: 1px solid gray;border-bottom: 1px solid gray;text-align: center;width:9%;'>Bank</th>"+
99
            "<td style='border-left: 1px solid gray;border-bottom: 1px solid gray;text-align: center;width:9%;'>Amount</th>"+
100
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
101
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
102
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
103
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
104
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
105
            "</tr>"+
6772 kshitij.so 106
            "<tr>"+
6959 kshitij.so 107
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>HDFC</td>"+
108
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>200</td>"+
109
            "<td rowspan='2' style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
110
            "<td rowspan='2' style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>4.22%</td>"+
111
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>7.04%</td>"+
112
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>9.67%</td>"+
113
            "<td rowspan='2' style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>NA</td>"+
6772 kshitij.so 114
            "</tr>"+
115
            "<tr>"+
6959 kshitij.so 116
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>CitiBank</td>"+
117
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>200</td>"+
118
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>NA</td>"+
119
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>NA</td>"+
6772 kshitij.so 120
            "</tr>"+
121
            "<tr>"+
6959 kshitij.so 122
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>ICICI</td>"+
123
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>1500</td>"+
124
            "<td rowspan='7' style='border-left: 1px solid gray; border-right: 0px solid gray; border-bottom: 1px solid gray; text-align: center;'>3.13%</td>"+
125
            "<td rowspan='7' style='border-left: 1px solid gray; border-right: 0px solid gray; border-bottom: 1px solid gray; text-align: center;'>5.58%</td>"+
126
            "<td rowspan='6' style='border-left: 1px solid gray; border-right: 0px solid gray; border-bottom: 1px solid gray; text-align: center;'>8.47%</td>"+
127
            "<td rowspan='6' style='border-left: 1px solid gray; border-right: 0px solid gray; border-bottom: 1px solid gray; text-align: center;'>11.53%</td>"+
128
            "<td rowspan='4' style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
6772 kshitij.so 129
            "</tr>"+
130
            "<tr>"+
6959 kshitij.so 131
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>SBI</td>"+
132
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>1000</td>"+
6772 kshitij.so 133
            "</tr>"+
134
            "<tr>"+
6959 kshitij.so 135
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>AXIS</td>"+
136
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>2500</td>"+
6772 kshitij.so 137
            "</tr>"+
6959 kshitij.so 138
            "<tr>"+
139
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>IndusInd</td>"+
140
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>200</td>"+
141
            "</tr>"+
142
            "<tr>"+
143
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Standard Chartered</td>"+
144
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>2500</td>"+
145
            "<td rowspan='3' style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>NA</td>"+
146
            "</tr>"+
147
            "<tr>"+
148
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>KOTAK</td>"+
149
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>500</td>"+
150
            "</tr>"+
151
            "<tr>"+
152
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>HSBC</td>"+
153
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>2000</td>"+
154
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>NA</td>"+
155
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>NA</td>"+
156
            "</tr>"+
6772 kshitij.so 157
            "</tbody>"+
158
            "</table>"+
159
            "<br>"+
6959 kshitij.so 160
            "<li>No charges will be levied by the bank.</li>"+
161
            "<br>"+
6772 kshitij.so 162
            "<li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li>"+
163
            "<br>"+
164
            "<li>As you pay the installments, correspondingly your credit limit increases.</li>"+
165
            "</ul>",
6453 kshitij.so 166
			onComplete: function(){
167
				trackEventWithGA('Widget', 'Emi info widget is clicked', '');
168
			}
169
    	});
170
	});
6245 kshitij.so 171
 
6792 vikram.rag 172
	$('a.mk_best_deal_detail').live('click', function(){
173
		var offerLinkHtml = '';
174
		if(OFFER_HELP_LINK!='$OFFER_DETAIL_LINK') {
6795 vikram.rag 175
			offerLinkHtml = '<a target="_blank" href="' +OFFER_HELP_LINK + '" style="z-index: 1; float: right; bottom: 0px; right: 0px; margin: 15px; position: relative;">More</a></span>';
6792 vikram.rag 176
		}
177
		$.colorbox({
178
			width: "550px",
179
    		height: "300px",
180
    		inline: true,
181
    		href: '<h3 style="text-align: left; padding: 10px;">Offer Details</h3>' +
182
    			'<p style="text-align: justify; line-height: 22px; margin: 12px;">' + OFFER_HELP_TEXT +
183
    			'</p><span class="right">' + offerLinkHtml 
184
		});
185
	});
6453 kshitij.so 186
 
6792 vikram.rag 187
 
6245 kshitij.so 188
	$('#pickupstoreInfo').click(function(){
189
		$.colorbox({
190
    		width: "550px",
191
    		height: "370px",
192
    		inline: true,
193
    		href: "<h3>Frequently Asked Questions</h3><br />" +
194
		"<b>Q)</b> What is 'Buy Online & Pickup in Store' ?<br /><br />" +
195
		"<b>A)</b> Buy Online from Saholic.Com and pickup your product from the nearest Spice Hotspot Retail Store.<br /><br />" +
196
		"<b>Q)</b> How do i avail this facility ?<br /><br />" +
197
		"<b>A)</b> Simply select Pickup In Store On the Shipping Page and select your nearest store. Please note this facility is available only in Delhi/NCR.</a><br /><br />"+
198
		"<b>Q)</b> When will the product be available for pickup ?<br /><br />" +
199
		"<b>A)</b> You can enter your pin code on the Product Page to find estimated time to deliver. After placing the order we will also give you the estimated date for pickup.</a><br /><br />",
200
 
201
			onComplete: function(){
6262 amit.gupta 202
				var ev = "Product Page";
6303 amit.gupta 203
				var label = window.location.pathname;
6264 amit.gupta 204
				if (label=="" || label=="#")
6261 amit.gupta 205
				{
6303 amit.gupta 206
					label = "";
6262 amit.gupta 207
					ev = "Home Page";
6261 amit.gupta 208
				}
6262 amit.gupta 209
				else if (label.indexOf("shipping") != -1){
210
					ev = "Shipping Page";
211
					var blkstr = [];
6263 amit.gupta 212
					jQuery("#cartDetail").find("span.cart-item-name").each(function(key,str){
6262 amit.gupta 213
						blkstr.push(str);
214
					});
6303 amit.gupta 215
					label = blkstr.join(", ");
216
				} else if (label.substr(label.lastIndexOf('/') + 1).length==5 && typeof label.substr(label.lastIndexOf('/') + 1) =="number") {
217
					ev = "Category Page";
218
				} else if (label.substr(label.lastIndexOf('-') + 1).length==7  && typeof label.substr(label.lastIndexOf('-') + 1) =="number") {
219
					ev = "Product Page";
6262 amit.gupta 220
				}
6261 amit.gupta 221
				trackEventWithGA('Pickup in Store LightBox', ev, label);
6245 kshitij.so 222
			}
223
    	});
224
	});
4126 varun.gupt 225
 
5420 amit.gupta 226
	$('.common-widget-top-bar').live('click', function(e, callback){
4126 varun.gupt 227
		var isColapsed = $(this).data('is_colapsed') == true ? true : false;
228
		var widgetBox = $(this).siblings('.common-widget-content-area');
229
		var controlBox = $(this).siblings('.common-widget-control-bar');
230
		var controlBoxArrowImg = $(this).find('img');
4210 varun.gupt 231
 
4126 varun.gupt 232
		if (isColapsed)	{
233
			if(controlBox.length > 0)	{
234
				$(controlBox).slideDown('fast', function(){
5420 amit.gupta 235
					$(widgetBox).slideDown('fast', callback);
4126 varun.gupt 236
					$(controlBoxArrowImg).attr('src', '/images/IconDownArrow_UnselectedTab.png');
237
				});
238
			} else	{
239
				$(widgetBox).slideDown();
240
				$(controlBoxArrowImg).attr('src', '/images/IconDownArrow_UnselectedTab.png');
241
			}
242
		} else	{
243
			$(widgetBox).slideUp(function(){
244
				$(controlBox).slideUp('fast');
245
				$(controlBoxArrowImg).attr('src', '/images/IconRightArrow_UnselectedTab.png');
246
			});
247
		}
248
		$(this).data('is_colapsed', !isColapsed);
249
	});
250
 
251
	/**
252
	 * Update count of products checked for comparison
253
	 **/
254
	$('#myresearch input[type="checkbox"]').live('click', function(){
4798 varun.gupt 255
		updateCompareCount();
4126 varun.gupt 256
	});
257
 
258
	$("#research_compare").live('click', function(){
259
		var seldata = "";
5322 amit.gupta 260
		var prodnames = "";
4126 varun.gupt 261
		var tot = 1;
262
		var saprt = "";
263
		var par = $('#myresearch').find('input[type=checkbox]:checked');
4926 varun.gupt 264
		var haveSameProductType = true;
265
		var productType = null;
266
 
4126 varun.gupt 267
		$(par).each(function(){
4926 varun.gupt 268
 
269
			if(productType != null && productType != $(this).attr('producttype'))	{
270
				haveSameProductType = false;
271
			}
272
			productType = $(this).attr('producttype');
273
 
4126 varun.gupt 274
			if(tot == 1)	{
5358 amit.gupta 275
				prodnames += $(this).attr("title").replace(/ +/g, '-').replace(/\/+/g,'-').replace(/-+/g,'-').toLowerCase();
4126 varun.gupt 276
				seldata += "p" + tot + "=" + $(this).val();
277
			} else	{
278
				seldata += "&p" + tot + "=" + $(this).val();
5358 amit.gupta 279
				prodnames += "-vs-" + $(this).attr("title").replace(/ +/g, '-').replace(/\/+/g,'-').replace(/-+/g,'-').toLowerCase();
4126 varun.gupt 280
			}
281
			tot ++;
282
		});
4984 varun.gupt 283
 
4926 varun.gupt 284
		if(! haveSameProductType)	{
285
			alert("Only products of same category can be compared");
286
		} else if(tot > 6)	{
4126 varun.gupt 287
			alert("Can compare upto five products only.");
288
		} else if(tot > 2)	{
5552 phani.kuma 289
			window.location = "/compare-" + productType.replace(/ +/g, '-').toLowerCase() + "/" + prodnames + "?" + seldata+"&fromsrc=comparison_widget";
4126 varun.gupt 290
		} else	{
291
			alert("Please select atleast two products");
292
		}
293
	});
294
 
295
	$("#research_delete").live('click', function(){
296
		var research_tot = $("#research_total").val();
297
		var seldata = [];
298
		var tot = 0;
299
		var saprt = "";
300
		var par = $('#myresearch').find('input[type=checkbox]:checked');
301
 
302
		$(par).each(function(){
303
			seldata.unshift($(this).val());
304
			tot ++;
305
		});
306
 
307
		if(tot > 0)	{
308
			var t = (research_tot * 1) - (tot * 1);
309
			$("#research_total").val(t);
310
 
311
			jQuery.ajax({
312
				type: "GET",
313
				url: "/deletefromresearch/[" + seldata + "]?_method=delete",
314
				success: function(msg)	{
315
					jQuery.each(seldata, function(intIndex, objValue){
316
						delete_from_storage_set("resitems", objValue);
317
						$("#myresearch").find("#" + objValue).fadeOut('slow', function() {
318
							$(this).remove();
319
							if(t === 0)	{
320
								$("#research_default").css("display", "block");
321
							}
322
						});
323
					});
4984 varun.gupt 324
 
4922 varun.gupt 325
					//Updating the count
326
					$('#research_compare_count').html($('#myresearch input[type="checkbox"]:checked').length - seldata.length);
4984 varun.gupt 327
 
328
					if ($('#myresearch input[type="checkbox"]').length - seldata.length <= 0)	{
329
						$("#myresearch").children(".common-widget-top-bar").trigger('click');
330
					}
4126 varun.gupt 331
				}
332
			});
333
		} else	{
334
			alert("Please select atleast one product");
335
		}
336
	});
337
 
338
	// No uid cookie
339
	if (!$.cookie("uid"))	{
340
		// No uid in storage
341
		if (!$.Storage.get("uid"))	{
342
			if (!$.Storage.get("resitems"))	{
343
				$.Storage.set("resitems", "[]");
344
			}
345
			if (!$.Storage.get("histitems"))	{
346
				$.Storage.set("histitems", "[]");
347
			}
348
		}
349
		else	{			// uid in storage : logout
350
			$.Storage.remove("uid");
351
			$.Storage.set("resitems", "[]");
352
			$.Storage.set("histitems", "[]");
353
		}
354
		load_research_widget();
355
		load_history_widget();
356
	}
357
	else	{				// With uid cookie
358
		var cookie = $.cookie("uid");
359
		// Just logged in merge storage items
360
		if (!$.Storage.get("uid"))	{
361
			$.Storage.set("uid", cookie);
362
			merge_history_items();
363
			load_research_items();
364
		}
365
		else	{
366
			// UID changed
367
			if ( cookie != $.Storage.get("uid"))	{
368
				$.Storage.set("uid", cookie);
369
				$.Storage.set("resitems", "[]");
370
				$.Storage.set("histitems", "[]");
371
				merge_history_items();
372
				load_research_items();
373
			}
374
			else	{		// Uid is same
375
				if (!$.Storage.get("resitems"))	{
376
					$.Storage.set("resitems", "[]");
377
					load_research_items();
378
				}
379
				else	{
380
					load_research_widget();
381
				}
382
 
383
				if (!$.Storage.get("histitems"))	{
384
					$.Storage.set("histitems", "[]");
385
					merge_history_items();
386
				}
387
				else	{
388
					load_history_widget();
389
				}
390
			}
391
		}
392
	}
4798 varun.gupt 393
 
394
	function load_research_items(){
395
		jQuery.ajax({
396
			type: "GET",
397
			url: "/myresearch",
398
			cache: false,
399
			success: function(json) {
400
			    $.Storage.set("resitems", json);
401
			    load_research_widget();
402
		    }
403
		});
404
	}
405
 
406
	function load_research_widget(){
407
		var myResearchWidgetContainer = $("#myresearch");
408
 
409
		if($(myResearchWidgetContainer).length == 0) {
410
			return;
411
		}
412
		var resitems = $.Storage.get("resitems");
413
 
414
		if (resitems == "[]") {
415
			var emptyResWidgetHtml = '<table border="0" width="100%" cellspacing="1" cellpadding="0" id="research_default">\
416
		      <tbody>\
417
		        <tr><td align="center"><b>Add items to compare list</b></td></tr>\
418
		       </tbody>\
419
		      </table>';
420
			$(myResearchWidgetContainer).find(".common-widget-content-area").html(emptyResWidgetHtml);
421
			$(myResearchWidgetContainer).children(".common-widget-top-bar").trigger('click');
422
			return;
423
		}
424
		var params = "/" + resitems;
425
 
426
		jQuery.ajax({
427
			type : "GET",
428
			url : "/myresearch" + params,
429
			cache: true,
430
			success : function(html) {
431
	   		    $("#myresearch").html(html);
432
	   			updateCompareCount();
433
 
434
			    // Product Title
435
			    $("#myresearch table td div a.truncate").each(function() {
436
						$(this).truncate({addtitle : true});
437
			    });
438
 
439
			    // Product Price
440
			    $("#myresearch table td div div.price").each(function() {
441
						$(this).truncate({addtitle : true});
442
				});
443
 
444
			    // Product Details
445
			    $("#myresearch table td div div.text").each(function() {
446
						$(this).truncate( {addtitle : true});
447
				});
448
		    }
449
		});
450
	}
4126 varun.gupt 451
});