Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
6967 kshitij.so 1
function toggle(containerId){
2
        var divC = document.getElementById(containerId);
3
        if (divC.style.display == 'none') {
4
            divC.style.display = 'block';
5
        } else if (divC.style.display == 'block'){
6
            divC.style.display = 'none';
7
        }
8
        else {
9
        	divC.style.display = 'none';
10
        }
11
    }
12
 
4126 varun.gupt 13
$(function(){
4984 varun.gupt 14
	function CollapsibleWidget(container)	{
15
 
16
		this.widgetContainer = container;
17
		this.collapsbiles = $(container).children('.common-widget-control-bar, .common-widget-content-area');
18
		this.isCollapsed = null;
19
 
20
		this.collapse = function()	{
21
			$(this.collapsbiles).each(function()	{
22
				$(this).slideUp();
23
			});
24
			this.isCollapsed = true;
25
		};
26
 
27
		this.open = function()	{
28
			$(this.collapsbiles).each(function()	{
29
				$(this).slideDown();
30
			});
31
			this.isCollapsed = false;
32
		};
33
 
34
		this.test = function()	{
35
		};
36
	}
4798 varun.gupt 37
 
4984 varun.gupt 38
	ResearchWidget.prototype = new CollapsibleWidget();
39
	ResearchWidget.prototype.constructor = CollapsibleWidget;
40
 
41
	function ResearchWidget(container)	{
42
		CollapsibleWidget.call(this, container);
43
	}
44
 
4798 varun.gupt 45
	function updateCompareCount()	{
46
		$('#research_compare_count').html($('#myresearch input[type="checkbox"]:checked').length);
47
	}
48
 
4126 varun.gupt 49
	/** Sidebar Widgets **/
4237 varun.gupt 50
 
6840 kshitij.so 51
	$('#otg_know_more,.otg_know_more').click(function(){
6552 kshitij.so 52
		$.colorbox({
53
    		width: "490px",
6772 kshitij.so 54
    		height: "420px",
6552 kshitij.so 55
    		inline: true,
56
    		href: "<h3 style='text-align: center; margin: 18px; font-size: 14px;'>On Time Guarantee, We Pay if we Delay</h3>" +
57
		"<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 "+
58
        "before the promised delivery date. In the rare case that we deliver an order later than promised "+
59
        "we will compensate you.This Guarantee is Valid on"+
60
        "</p>" +
61
        "<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."+
62
        "</li>"+
63
        "<li>Orders Placed using Credit/Debit Card, Net Banking, EMI, Prepaid Cash Cards."+
64
        "</li>"+
65
        "</ul>"+
6772 kshitij.so 66
        "<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. " +
67
        "GV can be applied to ANY product on Saholic.com without limitation.</p>"+
7063 kshitij.so 68
        "<span class='right'><a target='_blank' href='/static/on-time-guarantee' style='margin-right: 12px; color: #006699';>Detailed Terms & Conditions</a></span>",
6552 kshitij.so 69
        onComplete: function(){
70
		trackEventWithGA('Widget', 'OTG Know More is clicked', '');
71
			}
72
    	});
73
	});
7680 rajveer 74
 
7809 rajveer 75
	$('#cod_know_more,.cod_know_more').click(function(){
7680 rajveer 76
		$.colorbox({
7872 rajveer 77
    		width: "400px",
78
    		height: "200px",
7680 rajveer 79
    		inline: true,
7898 amit.gupta 80
    		href: "<ul style='list-style:inside; margin-left: 25px; margin-right:12px; font-size:15px; line-height: 22px;'>"
7872 rajveer 81
    			+ "Expected Delivery Date for "
7873 rajveer 82
    			+"<li list-style:inside>Prepaid orders is " + $("#shipping_time .red").html() + "</li>"+
83
    			"<li list-style:inside>" + $("#shipping_time .cod").html() + "</li>"+
7809 rajveer 84
        "</ul>",
7680 rajveer 85
        onComplete: function(){
7809 rajveer 86
		trackEventWithGA('Widget', 'COD Know More is clicked', '');
7680 rajveer 87
			}
88
    	});
89
	});
90
 
7846 rajveer 91
 
4237 varun.gupt 92
	$('#shoppingExpInfo').click(function(){
93
		$.colorbox({
4284 varun.gupt 94
    		width: "550px",
95
    		height: "320px",
4237 varun.gupt 96
    		inline: true,
97
    		href: "<h3>Shopping with Saholic.com is completely safe</h3><br />" +
4284 varun.gupt 98
		"<b>1.</b> We are part of Spice Group - India's # 1 Mobile retailer.<br /><br />" +
99
		"<b>2.</b> We procure directly from the Manufacturers - Hence we only sell genuine products with full Manufacturer Warranty.<br /><br />" +
100
		"<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 101
		"<b>4.</b> We use the best Internet Security technology - Your payment is 100% secure.<br />",
4372 varun.gupt 102
			onComplete: function(){
6261 amit.gupta 103
				trackEventWithGA('Widget', 'Safe shopping sticky banner is clicked', '');
4372 varun.gupt 104
			}
4237 varun.gupt 105
    	});
106
	});
6245 kshitij.so 107
 
6552 kshitij.so 108
 
6970 kshitij.so 109
	$('.insuranceInfo').click(function(){
110
		$.colorbox({
111
    		width: "520px",
112
    		height: "280px",
113
    		inline: true,
114
    		href: "<h3 style='font-size:15px; text-align:center; font-weight:bold; margin-left:15px; margin-top:5px;margin-bottom:10px'>Exclusively at Saholic</h3>" +
115
    		"<ul style='text-align: justify; padding-right: 10px; width: 93%; padding-left: 16px; line-height: 25px;'>"+
116
    		"<li>Only Saholic brings to you an option to protect your smartphone against theft and burglary.</li>"+
117
    		"<li>While buying your favourite mobile from Saholic, you can opt for 1 year WorldWide theft insurance.</li>"+
118
    		"<li>Introductory offer - You can opt for insurance by paying an all inclusive nominal fee of 1.5% of price of your mobile.</li>"+
7062 kshitij.so 119
    		"<a target='_blank' href='/static/insurance-terms' style='float: right; text-decoration: none;color:#006699';>Detailed Terms and Conditions</a>"+
6970 kshitij.so 120
    		"</ul>",
121
			onComplete: function(){
122
				trackEventWithGA('Widget', 'Insurance sticky banner is clicked', '');
123
			}
124
    	});
125
	});
126
 
127
 
6959 kshitij.so 128
	$('.emiInfo').click(function(){
6453 kshitij.so 129
		$.colorbox({
6967 kshitij.so 130
    		width: "590px",
131
    		height: "480px",
6453 kshitij.so 132
    		inline: true,
7051 kshitij.so 133
    		href: "<h3 style='font-size: 15px; text-align: center; font-weight: bold; margin-left: 15px; margin-bottom: 10px; margin-top: 7px;'>Completely Free EMI For 3 Months</h3>" +
6967 kshitij.so 134
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/hdfc-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 135
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9, 12 and 18 months.Completely free for 3 months<br><a onclick='toggle(\"emi-table-hdfc\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 136
    		"<div id='emi-table-hdfc' style='padding-left: 5px; display: none;'>"+
137
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
138
    		"<thead>"+
139
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
140
            "</thead>"+
141
            "<tbody>"+
142
            "<tr>"+
143
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
144
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
145
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
7011 kshitij.so 146
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
147
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
6967 kshitij.so 148
            "</tr>"+
149
            "<tr>"+
150
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
151
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>4.22%</td>"+
152
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>7.04%</td>"+
7011 kshitij.so 153
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>9.67%</td>"+
154
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>15.36%</td>"+
6967 kshitij.so 155
            "</tr>"+
156
            "</tbody>"+
157
            "</table>"+
158
            "<br>"+
159
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
160
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
6772 kshitij.so 161
    		"<br>"+
6967 kshitij.so 162
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
163
    		"</ul>"+
6959 kshitij.so 164
    		"<br>"+
6967 kshitij.so 165
    		"</div>"+
166
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/citi-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 167
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3 and 6 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-citi\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 168
    		"<div id='emi-table-citi' style='padding-left: 5px;display: none;'>"+
6970 kshitij.so 169
    		"<table width='70%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
6967 kshitij.so 170
    		"<thead>"+
171
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='2'>All Inclusive Processing Fee*</th>"+
6772 kshitij.so 172
            "</thead>"+
173
            "<tbody>"+
174
            "<tr>"+
6970 kshitij.so 175
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 35%;'>3 Months</th>"+
176
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 35%;'>6 Months</th>"+
6967 kshitij.so 177
            "</tr>"+
178
            "<tr>"+
179
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
180
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray; text-align: center;'>4.22%</td>"+
181
            "</tr>"+
182
            "</tbody>"+
183
            "</table>"+
184
            "<br>"+
185
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
186
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
187
    		"<br>"+
188
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
189
    		"</ul>"+
190
    		"<br>"+
191
    		"</div>"+
192
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/icici-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 193
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months.Completely free for 3 months<br><a  onclick='javascript:toggle(\"emi-table-icici\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 194
    		"<div id='emi-table-icici' style='padding-left: 5px;display: none;'>"+
195
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
196
    		"<thead>"+
6970 kshitij.so 197
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 198
            "</thead>"+
199
            "<tbody>"+
200
            "<tr>"+
201
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
6959 kshitij.so 202
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
203
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
204
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
205
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
206
            "</tr>"+
6772 kshitij.so 207
            "<tr>"+
7051 kshitij.so 208
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
6967 kshitij.so 209
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
210
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
211
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
212
            "<td 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 213
            "</tr>"+
6967 kshitij.so 214
            "</tbody>"+
215
            "</table>"+
216
            "<br>"+
217
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
218
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
219
    		"<br>"+
6970 kshitij.so 220
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1500.</li>"+
6967 kshitij.so 221
    		"</ul>"+
8138 kshitij.so 222
    		"<br>"+ 
6967 kshitij.so 223
    		"</div>"+
224
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/sbi-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 225
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-sbi\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 226
    		"<div id='emi-table-sbi' style='padding-left: 5px;display: none;'>"+
227
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
228
    		"<thead>"+
6970 kshitij.so 229
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 230
            "</thead>"+
231
            "<tbody>"+
6772 kshitij.so 232
            "<tr>"+
6967 kshitij.so 233
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
234
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
235
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
236
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
237
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
6772 kshitij.so 238
            "</tr>"+
239
            "<tr>"+
7051 kshitij.so 240
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
6967 kshitij.so 241
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
242
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
243
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
244
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
245
            "</tr>"+
246
            "</tbody>"+
247
            "</table>"+
248
            "<br>"+
249
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
250
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
251
    		"<br>"+
6970 kshitij.so 252
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1000.</li>"+
6967 kshitij.so 253
    		"</ul>"+
254
    		"<br>"+
255
    		"</div>"+
8138 kshitij.so 256
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/kotak-icon.png' style='vertical-align: middle;'></div>"+
257
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-kotak\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
258
    		"<div id='emi-table-kotak' style='padding-left: 5px;display: none;'>"+
259
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
260
    		"<thead>"+
261
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
262
            "</thead>"+
263
            "<tbody>"+
264
            "<tr>"+
265
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
266
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
267
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
268
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
269
            "</tr>"+
270
            "<tr>"+
271
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
272
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
273
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
274
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
275
            "</tr>"+
276
            "</tbody>"+
277
            "</table>"+
278
            "<br>"+
279
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
280
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
281
    		"<br>"+
282
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 500.</li>"+
283
    		"</ul>"+
284
    		"<br>"+
285
    		"</div>"+
6967 kshitij.so 286
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/hsbc-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 287
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-hsbc\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 288
    		"<div id='emi-table-hsbc' style='padding-left: 5px;display:none;'>"+
6970 kshitij.so 289
    		"<table width='70%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
6967 kshitij.so 290
    		"<thead>"+
6970 kshitij.so 291
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 292
            "</thead>"+
293
            "<tbody>"+
294
            "<tr>"+
7017 kshitij.so 295
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
296
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
297
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
298
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
6967 kshitij.so 299
            "</tr>"+
300
            "<tr>"+
7051 kshitij.so 301
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
7017 kshitij.so 302
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
303
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
304
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
6772 kshitij.so 305
            "</tr>"+
6967 kshitij.so 306
            "</tbody>"+
307
            "</table>"+
308
            "<br>"+
309
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
310
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
311
    		"<br>"+
6970 kshitij.so 312
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1500.</li>"+
6967 kshitij.so 313
    		"</ul>"+
314
    		"<br>"+
315
    		"</div>"+
316
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/std-chartered-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 317
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-std-chart\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 318
    		"<div id='emi-table-std-chart' style='padding-left: 5px;display: none;'>"+
319
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
320
    		"<thead>"+
6970 kshitij.so 321
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 322
            "</thead>"+
323
            "<tbody>"+
6772 kshitij.so 324
            "<tr>"+
6970 kshitij.so 325
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%%;'>3 Months</th>"+
6967 kshitij.so 326
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
327
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
328
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
6772 kshitij.so 329
            "</tr>"+
330
            "<tr>"+
7051 kshitij.so 331
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
6967 kshitij.so 332
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
333
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
334
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
6772 kshitij.so 335
            "</tr>"+
6967 kshitij.so 336
            "</tbody>"+
337
            "</table>"+
338
            "<br>"+
339
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
340
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
341
    		"<br>"+
6970 kshitij.so 342
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 500.</li>"+
6967 kshitij.so 343
    		"</ul>"+
344
    		"<br>"+
345
    		"</div>"+
346
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/axis-icon.png' style='vertical-align: middle;'></div>"+
7783 rajveer 347
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-axis\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 348
    		"<div id='emi-table-axis' style='padding-left: 5px;display: none;'>"+
349
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
350
    		"<thead>"+
6970 kshitij.so 351
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 352
            "</thead>"+
353
            "<tbody>"+
354
            "<tr>"+
355
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
356
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
357
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
358
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
359
            "</tr>"+
360
            "<tr>"+
7051 kshitij.so 361
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
6967 kshitij.so 362
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
363
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
364
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
6959 kshitij.so 365
            "</tr>"+
6967 kshitij.so 366
            "</tbody>"+
367
            "</table>"+
368
            "<br>"+
369
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
370
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
371
    		"<br>"+
6970 kshitij.so 372
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 2500.</li>"+
6967 kshitij.so 373
    		"</ul>"+
374
    		"<br>"+
375
    		"</div>"+
376
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/indusind-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 377
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 6, 9 and 12 months. <br><a onclick='javascript:toggle(\"emi-table-indus\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 378
    		"<div id='emi-table-indus' style='padding-left: 5px;display: none;'>"+
379
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
380
    		"<thead>"+
381
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
382
            "</thead>"+
383
            "<tbody>"+
6959 kshitij.so 384
            "<tr>"+
6967 kshitij.so 385
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
386
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
387
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
6959 kshitij.so 388
            "</tr>"+
389
            "<tr>"+
7051 kshitij.so 390
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%%</td>"+
6967 kshitij.so 391
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
392
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
6959 kshitij.so 393
            "</tr>"+
6772 kshitij.so 394
            "</tbody>"+
395
            "</table>"+
396
            "<br>"+
6967 kshitij.so 397
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
398
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
399
    		"<br>"+
400
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
401
    		"</ul>"+
402
    		"<br>"+
403
    		"</div>"+
404
    		"<br><br>",
6453 kshitij.so 405
			onComplete: function(){
406
				trackEventWithGA('Widget', 'Emi info widget is clicked', '');
407
			}
408
    	});
409
	});
6245 kshitij.so 410
 
6792 vikram.rag 411
	$('a.mk_best_deal_detail').live('click', function(){
412
		var offerLinkHtml = '';
413
		if(OFFER_HELP_LINK!='$OFFER_DETAIL_LINK') {
6795 vikram.rag 414
			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 415
		}
416
		$.colorbox({
417
			width: "550px",
418
    		height: "300px",
419
    		inline: true,
420
    		href: '<h3 style="text-align: left; padding: 10px;">Offer Details</h3>' +
421
    			'<p style="text-align: justify; line-height: 22px; margin: 12px;">' + OFFER_HELP_TEXT +
422
    			'</p><span class="right">' + offerLinkHtml 
423
		});
424
	});
6453 kshitij.so 425
 
6792 vikram.rag 426
 
6245 kshitij.so 427
	$('#pickupstoreInfo').click(function(){
428
		$.colorbox({
429
    		width: "550px",
430
    		height: "370px",
431
    		inline: true,
432
    		href: "<h3>Frequently Asked Questions</h3><br />" +
7062 kshitij.so 433
		"<b style='color: black; cursor: default;'>Q)</b> What is 'Buy Online & Pickup in Store' ?<br /><br />" +
434
		"<b style='color: black; cursor: default;'>A)</b> Buy Online from Saholic.Com and pickup your product from the nearest Spice Hotspot Retail Store.<br /><br />" +
435
		"<b style='color: black; cursor: default;'>Q)</b> How do i avail this facility ?<br /><br />" +
436
		"<b style='color: black; cursor: default;'>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 />"+
437
		"<b style='color: black; cursor: default;'>Q)</b> When will the product be available for pickup ?<br /><br />" +
438
		"<b style='color: black; cursor: default;'>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 />",
6245 kshitij.so 439
 
440
			onComplete: function(){
6262 amit.gupta 441
				var ev = "Product Page";
6303 amit.gupta 442
				var label = window.location.pathname;
6264 amit.gupta 443
				if (label=="" || label=="#")
6261 amit.gupta 444
				{
6303 amit.gupta 445
					label = "";
6262 amit.gupta 446
					ev = "Home Page";
6261 amit.gupta 447
				}
6262 amit.gupta 448
				else if (label.indexOf("shipping") != -1){
449
					ev = "Shipping Page";
450
					var blkstr = [];
6263 amit.gupta 451
					jQuery("#cartDetail").find("span.cart-item-name").each(function(key,str){
6262 amit.gupta 452
						blkstr.push(str);
453
					});
6303 amit.gupta 454
					label = blkstr.join(", ");
455
				} else if (label.substr(label.lastIndexOf('/') + 1).length==5 && typeof label.substr(label.lastIndexOf('/') + 1) =="number") {
456
					ev = "Category Page";
457
				} else if (label.substr(label.lastIndexOf('-') + 1).length==7  && typeof label.substr(label.lastIndexOf('-') + 1) =="number") {
458
					ev = "Product Page";
6262 amit.gupta 459
				}
6261 amit.gupta 460
				trackEventWithGA('Pickup in Store LightBox', ev, label);
6245 kshitij.so 461
			}
462
    	});
463
	});
4126 varun.gupt 464
 
5420 amit.gupta 465
	$('.common-widget-top-bar').live('click', function(e, callback){
4126 varun.gupt 466
		var isColapsed = $(this).data('is_colapsed') == true ? true : false;
467
		var widgetBox = $(this).siblings('.common-widget-content-area');
468
		var controlBox = $(this).siblings('.common-widget-control-bar');
469
		var controlBoxArrowImg = $(this).find('img');
4210 varun.gupt 470
 
4126 varun.gupt 471
		if (isColapsed)	{
472
			if(controlBox.length > 0)	{
473
				$(controlBox).slideDown('fast', function(){
5420 amit.gupta 474
					$(widgetBox).slideDown('fast', callback);
4126 varun.gupt 475
					$(controlBoxArrowImg).attr('src', '/images/IconDownArrow_UnselectedTab.png');
476
				});
477
			} else	{
478
				$(widgetBox).slideDown();
479
				$(controlBoxArrowImg).attr('src', '/images/IconDownArrow_UnselectedTab.png');
480
			}
481
		} else	{
482
			$(widgetBox).slideUp(function(){
483
				$(controlBox).slideUp('fast');
484
				$(controlBoxArrowImg).attr('src', '/images/IconRightArrow_UnselectedTab.png');
485
			});
486
		}
487
		$(this).data('is_colapsed', !isColapsed);
488
	});
489
 
490
	/**
491
	 * Update count of products checked for comparison
492
	 **/
493
	$('#myresearch input[type="checkbox"]').live('click', function(){
4798 varun.gupt 494
		updateCompareCount();
4126 varun.gupt 495
	});
496
 
497
	$("#research_compare").live('click', function(){
498
		var seldata = "";
5322 amit.gupta 499
		var prodnames = "";
4126 varun.gupt 500
		var tot = 1;
501
		var saprt = "";
502
		var par = $('#myresearch').find('input[type=checkbox]:checked');
4926 varun.gupt 503
		var haveSameProductType = true;
504
		var productType = null;
505
 
4126 varun.gupt 506
		$(par).each(function(){
4926 varun.gupt 507
 
508
			if(productType != null && productType != $(this).attr('producttype'))	{
509
				haveSameProductType = false;
510
			}
511
			productType = $(this).attr('producttype');
512
 
4126 varun.gupt 513
			if(tot == 1)	{
5358 amit.gupta 514
				prodnames += $(this).attr("title").replace(/ +/g, '-').replace(/\/+/g,'-').replace(/-+/g,'-').toLowerCase();
4126 varun.gupt 515
				seldata += "p" + tot + "=" + $(this).val();
516
			} else	{
517
				seldata += "&p" + tot + "=" + $(this).val();
5358 amit.gupta 518
				prodnames += "-vs-" + $(this).attr("title").replace(/ +/g, '-').replace(/\/+/g,'-').replace(/-+/g,'-').toLowerCase();
4126 varun.gupt 519
			}
520
			tot ++;
521
		});
4984 varun.gupt 522
 
4926 varun.gupt 523
		if(! haveSameProductType)	{
524
			alert("Only products of same category can be compared");
525
		} else if(tot > 6)	{
4126 varun.gupt 526
			alert("Can compare upto five products only.");
527
		} else if(tot > 2)	{
5552 phani.kuma 528
			window.location = "/compare-" + productType.replace(/ +/g, '-').toLowerCase() + "/" + prodnames + "?" + seldata+"&fromsrc=comparison_widget";
4126 varun.gupt 529
		} else	{
530
			alert("Please select atleast two products");
531
		}
532
	});
533
 
534
	$("#research_delete").live('click', function(){
535
		var research_tot = $("#research_total").val();
536
		var seldata = [];
537
		var tot = 0;
538
		var saprt = "";
539
		var par = $('#myresearch').find('input[type=checkbox]:checked');
540
 
541
		$(par).each(function(){
542
			seldata.unshift($(this).val());
543
			tot ++;
544
		});
545
 
546
		if(tot > 0)	{
547
			var t = (research_tot * 1) - (tot * 1);
548
			$("#research_total").val(t);
549
 
550
			jQuery.ajax({
551
				type: "GET",
552
				url: "/deletefromresearch/[" + seldata + "]?_method=delete",
553
				success: function(msg)	{
554
					jQuery.each(seldata, function(intIndex, objValue){
555
						delete_from_storage_set("resitems", objValue);
556
						$("#myresearch").find("#" + objValue).fadeOut('slow', function() {
557
							$(this).remove();
558
							if(t === 0)	{
559
								$("#research_default").css("display", "block");
560
							}
561
						});
562
					});
4984 varun.gupt 563
 
4922 varun.gupt 564
					//Updating the count
565
					$('#research_compare_count').html($('#myresearch input[type="checkbox"]:checked').length - seldata.length);
4984 varun.gupt 566
 
567
					if ($('#myresearch input[type="checkbox"]').length - seldata.length <= 0)	{
568
						$("#myresearch").children(".common-widget-top-bar").trigger('click');
569
					}
4126 varun.gupt 570
				}
571
			});
572
		} else	{
573
			alert("Please select atleast one product");
574
		}
575
	});
576
 
577
	// No uid cookie
578
	if (!$.cookie("uid"))	{
579
		// No uid in storage
580
		if (!$.Storage.get("uid"))	{
581
			if (!$.Storage.get("resitems"))	{
582
				$.Storage.set("resitems", "[]");
583
			}
584
			if (!$.Storage.get("histitems"))	{
585
				$.Storage.set("histitems", "[]");
586
			}
587
		}
588
		else	{			// uid in storage : logout
589
			$.Storage.remove("uid");
590
			$.Storage.set("resitems", "[]");
591
			$.Storage.set("histitems", "[]");
592
		}
593
		load_research_widget();
594
		load_history_widget();
595
	}
596
	else	{				// With uid cookie
597
		var cookie = $.cookie("uid");
598
		// Just logged in merge storage items
599
		if (!$.Storage.get("uid"))	{
600
			$.Storage.set("uid", cookie);
601
			merge_history_items();
602
			load_research_items();
603
		}
604
		else	{
605
			// UID changed
606
			if ( cookie != $.Storage.get("uid"))	{
607
				$.Storage.set("uid", cookie);
608
				$.Storage.set("resitems", "[]");
609
				$.Storage.set("histitems", "[]");
610
				merge_history_items();
611
				load_research_items();
612
			}
613
			else	{		// Uid is same
614
				if (!$.Storage.get("resitems"))	{
615
					$.Storage.set("resitems", "[]");
616
					load_research_items();
617
				}
618
				else	{
619
					load_research_widget();
620
				}
621
 
622
				if (!$.Storage.get("histitems"))	{
623
					$.Storage.set("histitems", "[]");
624
					merge_history_items();
625
				}
626
				else	{
627
					load_history_widget();
628
				}
629
			}
630
		}
631
	}
4798 varun.gupt 632
 
633
	function load_research_items(){
634
		jQuery.ajax({
635
			type: "GET",
636
			url: "/myresearch",
637
			cache: false,
638
			success: function(json) {
639
			    $.Storage.set("resitems", json);
640
			    load_research_widget();
641
		    }
642
		});
643
	}
644
 
645
	function load_research_widget(){
646
		var myResearchWidgetContainer = $("#myresearch");
647
 
648
		if($(myResearchWidgetContainer).length == 0) {
649
			return;
650
		}
651
		var resitems = $.Storage.get("resitems");
652
 
653
		if (resitems == "[]") {
654
			var emptyResWidgetHtml = '<table border="0" width="100%" cellspacing="1" cellpadding="0" id="research_default">\
655
		      <tbody>\
656
		        <tr><td align="center"><b>Add items to compare list</b></td></tr>\
657
		       </tbody>\
658
		      </table>';
659
			$(myResearchWidgetContainer).find(".common-widget-content-area").html(emptyResWidgetHtml);
660
			$(myResearchWidgetContainer).children(".common-widget-top-bar").trigger('click');
661
			return;
662
		}
663
		var params = "/" + resitems;
664
 
665
		jQuery.ajax({
666
			type : "GET",
667
			url : "/myresearch" + params,
668
			cache: true,
669
			success : function(html) {
670
	   		    $("#myresearch").html(html);
671
	   			updateCompareCount();
672
 
673
			    // Product Title
674
			    $("#myresearch table td div a.truncate").each(function() {
675
						$(this).truncate({addtitle : true});
676
			    });
677
 
678
			    // Product Price
679
			    $("#myresearch table td div div.price").each(function() {
680
						$(this).truncate({addtitle : true});
681
				});
682
 
683
			    // Product Details
684
			    $("#myresearch table td div div.text").each(function() {
685
						$(this).truncate( {addtitle : true});
686
				});
687
		    }
688
		});
689
	}
7846 rajveer 690
});
691
 
7849 rajveer 692
function displayCod(item_id)	{
7846 rajveer 693
	$.colorbox({
7872 rajveer 694
		width: "400px",
695
		height: "200px",
7846 rajveer 696
		inline: true,
7873 rajveer 697
		href: "<ul style='list-style:inside; margin-left: 25px; text-align: justify; margin-right:12px; font-size:15px; line-height: 22px;'>"
7872 rajveer 698
			+ "Expected Delivery Date for "
7873 rajveer 699
			+"<li list-style:inside>Prepaid orders is " + $('#days_' + item_id).html() + "</li>"+
7879 rajveer 700
			"<li list-style:inside>Cash On Delivery orders is " + $('#coddays_' + item_id).html() + "</li>"+
7846 rajveer 701
    "</ul>",
702
    onComplete: function(){
703
	trackEventWithGA('Widget', 'COD Know More is clicked', '');
704
		}
705
	});
706
}