Subversion Repositories SmartDukaan

Rev

Rev 8398 | Rev 8494 | 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
 
8434 kshitij.so 108
	$('#promotion-diwali').click(function(){
109
		$.colorbox({
110
    		width: "550px",
111
    		height: "280px",
112
    		inline: true,
113
    		href: "<h3 style='font-size:15px; text-align:center; font-weight:bold; margin-left:15px; margin-top:5px;margin-bottom:10px'>Terms and Conditions</h3>" +
114
    		"<ul style='text-align: justify; padding-right: 10px; width: 93%; padding-left: 16px; line-height: 25px;'>"+
115
    		"<li>The offer is valid on all accessories.</li>"+
116
    		"<li>A discount of 10% (upto a maximum of Rs.500) will be applicable.</li>"+
117
    		"<li>The discount can be enjoyed upon using the coupon code: <b>saholicdiwali</b></li>"+
118
    		"<li>Only one order per person will be accepted.</li>"+
119
    		"<li>The offer is valid till November 5, 2013.</li>"+ 
120
    		"<li> The offer is also valid on Cash on Delivery (COD) orders.</li>"+ 
121
    		"</ul>",
122
			onComplete: function(){
123
				trackEventWithGA('Widget', 'Saholic Diwali sticky banner is clicked', '');
124
			}
125
    	});
126
	});
6552 kshitij.so 127
 
8434 kshitij.so 128
 
129
 
6970 kshitij.so 130
	$('.insuranceInfo').click(function(){
131
		$.colorbox({
132
    		width: "520px",
133
    		height: "280px",
134
    		inline: true,
135
    		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>" +
136
    		"<ul style='text-align: justify; padding-right: 10px; width: 93%; padding-left: 16px; line-height: 25px;'>"+
137
    		"<li>Only Saholic brings to you an option to protect your smartphone against theft and burglary.</li>"+
138
    		"<li>While buying your favourite mobile from Saholic, you can opt for 1 year WorldWide theft insurance.</li>"+
139
    		"<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 140
    		"<a target='_blank' href='/static/insurance-terms' style='float: right; text-decoration: none;color:#006699';>Detailed Terms and Conditions</a>"+
6970 kshitij.so 141
    		"</ul>",
142
			onComplete: function(){
143
				trackEventWithGA('Widget', 'Insurance sticky banner is clicked', '');
144
			}
145
    	});
146
	});
147
 
148
 
8434 kshitij.so 149
 
150
 
6959 kshitij.so 151
	$('.emiInfo').click(function(){
6453 kshitij.so 152
		$.colorbox({
6967 kshitij.so 153
    		width: "590px",
8279 kshitij.so 154
    		height: "480px",
6453 kshitij.so 155
    		inline: true,
7051 kshitij.so 156
    		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 157
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/hdfc-icon.png' style='vertical-align: middle;'></div>"+
8279 kshitij.so 158
    		"<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>"+
159
    		"<div id='emi-table-hdfc' style='padding-left: 5px; display: none;'>"+
160
    		"<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'>"+
6967 kshitij.so 161
    		"<thead>"+
162
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
163
            "</thead>"+
164
            "<tbody>"+
165
            "<tr>"+
166
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
167
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
168
            "<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 169
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
170
            "<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 171
            "</tr>"+
172
            "<tr>"+
173
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
174
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>4.22%</td>"+
175
            "<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 176
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>9.67%</td>"+
177
            "<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 178
            "</tr>"+
179
            "</tbody>"+
180
            "</table>"+
181
            "<br>"+
182
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
183
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
6772 kshitij.so 184
    		"<br>"+
6967 kshitij.so 185
    		"<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>"+
186
    		"</ul>"+
6959 kshitij.so 187
    		"<br>"+
8279 kshitij.so 188
    		"</div>"+
189
    		"<div style='display: none; padding-left: 5px;' class='bank-logo'><img src='/images/citi-icon.png' style='vertical-align: middle;'></div>"+
190
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: none; 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>"+
191
    		"<div id='emi-table-citi' style='padding-left: 5px;display: none;'>"+
192
    		"<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'>"+
193
    		"<thead>"+
194
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='2'>All Inclusive Processing Fee*</th>"+
195
            "</thead>"+
196
            "<tbody>"+
197
            "<tr>"+
198
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 35%;'>3 Months</th>"+
199
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 35%;'>6 Months</th>"+
200
            "</tr>"+
201
            "<tr>"+
202
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
203
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray; text-align: center;'>4.22%</td>"+
204
            "</tr>"+
205
            "</tbody>"+
206
            "</table>"+
207
            "<br>"+
208
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
209
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
210
    		"<br>"+
211
    		"<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>"+
212
    		"</ul>"+
213
    		"<br>"+
214
    		"</div>"+
215
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/icici-icon.png' style='vertical-align: middle;'></div>"+
216
    		"<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>"+
217
    		"<div id='emi-table-icici' style='padding-left: 5px;display: none;'>"+
218
    		"<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'>"+
219
    		"<thead>"+
220
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
221
            "</thead>"+
222
            "<tbody>"+
223
            "<tr>"+
224
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
225
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
226
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
227
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
228
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
229
            "</tr>"+
230
            "<tr>"+
231
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
232
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
233
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
234
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
235
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
236
            "</tr>"+
237
            "</tbody>"+
238
            "</table>"+
239
            "<br>"+
240
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
241
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
242
    		"<br>"+
243
    		"<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>"+
244
    		"</ul>"+
245
    		"<br>"+ 
246
    		"</div>"+
247
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/sbi-icon.png' style='vertical-align: middle;'></div>"+
248
    		"<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>"+
249
    		"<div id='emi-table-sbi' style='padding-left: 5px;display: none;'>"+
250
    		"<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'>"+
251
    		"<thead>"+
252
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
253
            "</thead>"+
254
            "<tbody>"+
255
            "<tr>"+
256
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
257
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
258
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
259
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
260
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
261
            "</tr>"+
262
            "<tr>"+
263
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
264
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
265
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
266
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
267
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
268
            "</tr>"+
269
            "</tbody>"+
270
            "</table>"+
271
            "<br>"+
272
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
273
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
274
    		"<br>"+
275
    		"<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>"+
276
    		"</ul>"+
277
    		"<br>"+
278
    		"</div>"+
279
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/kotak-icon.png' style='vertical-align: middle;'></div>"+
280
    		"<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>"+
281
    		"<div id='emi-table-kotak' style='padding-left: 5px;display: none;'>"+
282
    		"<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'>"+
283
    		"<thead>"+
284
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
285
            "</thead>"+
286
            "<tbody>"+
287
            "<tr>"+
288
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
289
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
290
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
291
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
292
            "</tr>"+
293
            "<tr>"+
294
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
295
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
296
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
297
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
298
            "</tr>"+
299
            "</tbody>"+
300
            "</table>"+
301
            "<br>"+
302
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
303
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
304
    		"<br>"+
305
    		"<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>"+
306
    		"</ul>"+
307
    		"<br>"+
308
    		"</div>"+
309
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/hsbc-icon.png' style='vertical-align: middle;'></div>"+
310
    		"<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>"+
311
    		"<div id='emi-table-hsbc' style='padding-left: 5px;display:none;'>"+
312
    		"<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'>"+
313
    		"<thead>"+
314
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
315
            "</thead>"+
316
            "<tbody>"+
317
            "<tr>"+
318
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
319
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
320
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
321
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
322
            "</tr>"+
323
            "<tr>"+
324
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
325
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
326
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
327
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
328
            "</tr>"+
329
            "</tbody>"+
330
            "</table>"+
331
            "<br>"+
332
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
333
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
334
    		"<br>"+
335
    		"<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>"+
336
    		"</ul>"+
337
    		"<br>"+
338
    		"</div>"+
339
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/std-chartered-icon.png' style='vertical-align: middle;'></div>"+
340
    		"<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>"+
341
    		"<div id='emi-table-std-chart' style='padding-left: 5px;display: none;'>"+
342
    		"<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'>"+
343
    		"<thead>"+
344
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
345
            "</thead>"+
346
            "<tbody>"+
347
            "<tr>"+
348
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
349
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
350
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
351
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
352
            "</tr>"+
353
            "<tr>"+
354
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
355
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
356
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
357
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
358
            "</tr>"+
359
            "</tbody>"+
360
            "</table>"+
361
            "<br>"+
362
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
363
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
364
    		"<br>"+
365
    		"<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>"+
366
    		"</ul>"+
367
    		"<br>"+
368
    		"</div>"+
8398 kshitij.so 369
    		"<div style='display: none; padding-left: 5px;' class='bank-logo'><img src='/images/indusind-icon.png' style='vertical-align: middle;'></div>"+
370
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: none; 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>"+
8279 kshitij.so 371
    		"<div id='emi-table-indus' style='padding-left: 5px;display: none;'>"+
372
    		"<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'>"+
373
    		"<thead>"+
374
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
375
            "</thead>"+
376
            "<tbody>"+
377
            "<tr>"+
378
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
379
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
380
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
381
            "</tr>"+
382
            "<tr>"+
383
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%%</td>"+
384
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
385
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
386
            "</tr>"+
387
            "</tbody>"+
388
            "</table>"+
389
            "<br>"+
390
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
391
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
392
    		"<br>"+
393
    		"<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>"+
394
    		"</ul>"+
395
    		"<br>"+
396
    		"</div>"+
397
    		"<br><br>",
6453 kshitij.so 398
			onComplete: function(){
399
				trackEventWithGA('Widget', 'Emi info widget is clicked', '');
400
			}
401
    	});
402
	});
6245 kshitij.so 403
 
6792 vikram.rag 404
	$('a.mk_best_deal_detail').live('click', function(){
405
		var offerLinkHtml = '';
406
		if(OFFER_HELP_LINK!='$OFFER_DETAIL_LINK') {
6795 vikram.rag 407
			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 408
		}
409
		$.colorbox({
410
			width: "550px",
411
    		height: "300px",
412
    		inline: true,
413
    		href: '<h3 style="text-align: left; padding: 10px;">Offer Details</h3>' +
414
    			'<p style="text-align: justify; line-height: 22px; margin: 12px;">' + OFFER_HELP_TEXT +
415
    			'</p><span class="right">' + offerLinkHtml 
416
		});
417
	});
6453 kshitij.so 418
 
6792 vikram.rag 419
 
6245 kshitij.so 420
	$('#pickupstoreInfo').click(function(){
421
		$.colorbox({
422
    		width: "550px",
423
    		height: "370px",
424
    		inline: true,
425
    		href: "<h3>Frequently Asked Questions</h3><br />" +
7062 kshitij.so 426
		"<b style='color: black; cursor: default;'>Q)</b> What is 'Buy Online & Pickup in Store' ?<br /><br />" +
427
		"<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 />" +
428
		"<b style='color: black; cursor: default;'>Q)</b> How do i avail this facility ?<br /><br />" +
429
		"<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 />"+
430
		"<b style='color: black; cursor: default;'>Q)</b> When will the product be available for pickup ?<br /><br />" +
431
		"<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 432
 
433
			onComplete: function(){
6262 amit.gupta 434
				var ev = "Product Page";
6303 amit.gupta 435
				var label = window.location.pathname;
6264 amit.gupta 436
				if (label=="" || label=="#")
6261 amit.gupta 437
				{
6303 amit.gupta 438
					label = "";
6262 amit.gupta 439
					ev = "Home Page";
6261 amit.gupta 440
				}
6262 amit.gupta 441
				else if (label.indexOf("shipping") != -1){
442
					ev = "Shipping Page";
443
					var blkstr = [];
6263 amit.gupta 444
					jQuery("#cartDetail").find("span.cart-item-name").each(function(key,str){
6262 amit.gupta 445
						blkstr.push(str);
446
					});
6303 amit.gupta 447
					label = blkstr.join(", ");
448
				} else if (label.substr(label.lastIndexOf('/') + 1).length==5 && typeof label.substr(label.lastIndexOf('/') + 1) =="number") {
449
					ev = "Category Page";
450
				} else if (label.substr(label.lastIndexOf('-') + 1).length==7  && typeof label.substr(label.lastIndexOf('-') + 1) =="number") {
451
					ev = "Product Page";
6262 amit.gupta 452
				}
6261 amit.gupta 453
				trackEventWithGA('Pickup in Store LightBox', ev, label);
6245 kshitij.so 454
			}
455
    	});
456
	});
4126 varun.gupt 457
 
5420 amit.gupta 458
	$('.common-widget-top-bar').live('click', function(e, callback){
4126 varun.gupt 459
		var isColapsed = $(this).data('is_colapsed') == true ? true : false;
460
		var widgetBox = $(this).siblings('.common-widget-content-area');
461
		var controlBox = $(this).siblings('.common-widget-control-bar');
462
		var controlBoxArrowImg = $(this).find('img');
4210 varun.gupt 463
 
4126 varun.gupt 464
		if (isColapsed)	{
465
			if(controlBox.length > 0)	{
466
				$(controlBox).slideDown('fast', function(){
5420 amit.gupta 467
					$(widgetBox).slideDown('fast', callback);
4126 varun.gupt 468
					$(controlBoxArrowImg).attr('src', '/images/IconDownArrow_UnselectedTab.png');
469
				});
470
			} else	{
471
				$(widgetBox).slideDown();
472
				$(controlBoxArrowImg).attr('src', '/images/IconDownArrow_UnselectedTab.png');
473
			}
474
		} else	{
475
			$(widgetBox).slideUp(function(){
476
				$(controlBox).slideUp('fast');
477
				$(controlBoxArrowImg).attr('src', '/images/IconRightArrow_UnselectedTab.png');
478
			});
479
		}
480
		$(this).data('is_colapsed', !isColapsed);
481
	});
482
 
483
	/**
484
	 * Update count of products checked for comparison
485
	 **/
486
	$('#myresearch input[type="checkbox"]').live('click', function(){
4798 varun.gupt 487
		updateCompareCount();
4126 varun.gupt 488
	});
489
 
490
	$("#research_compare").live('click', function(){
491
		var seldata = "";
5322 amit.gupta 492
		var prodnames = "";
4126 varun.gupt 493
		var tot = 1;
494
		var saprt = "";
495
		var par = $('#myresearch').find('input[type=checkbox]:checked');
4926 varun.gupt 496
		var haveSameProductType = true;
497
		var productType = null;
498
 
4126 varun.gupt 499
		$(par).each(function(){
4926 varun.gupt 500
 
501
			if(productType != null && productType != $(this).attr('producttype'))	{
502
				haveSameProductType = false;
503
			}
504
			productType = $(this).attr('producttype');
505
 
4126 varun.gupt 506
			if(tot == 1)	{
5358 amit.gupta 507
				prodnames += $(this).attr("title").replace(/ +/g, '-').replace(/\/+/g,'-').replace(/-+/g,'-').toLowerCase();
4126 varun.gupt 508
				seldata += "p" + tot + "=" + $(this).val();
509
			} else	{
510
				seldata += "&p" + tot + "=" + $(this).val();
5358 amit.gupta 511
				prodnames += "-vs-" + $(this).attr("title").replace(/ +/g, '-').replace(/\/+/g,'-').replace(/-+/g,'-').toLowerCase();
4126 varun.gupt 512
			}
513
			tot ++;
514
		});
4984 varun.gupt 515
 
4926 varun.gupt 516
		if(! haveSameProductType)	{
517
			alert("Only products of same category can be compared");
518
		} else if(tot > 6)	{
4126 varun.gupt 519
			alert("Can compare upto five products only.");
520
		} else if(tot > 2)	{
5552 phani.kuma 521
			window.location = "/compare-" + productType.replace(/ +/g, '-').toLowerCase() + "/" + prodnames + "?" + seldata+"&fromsrc=comparison_widget";
4126 varun.gupt 522
		} else	{
523
			alert("Please select atleast two products");
524
		}
525
	});
526
 
527
	$("#research_delete").live('click', function(){
528
		var research_tot = $("#research_total").val();
529
		var seldata = [];
530
		var tot = 0;
531
		var saprt = "";
532
		var par = $('#myresearch').find('input[type=checkbox]:checked');
533
 
534
		$(par).each(function(){
535
			seldata.unshift($(this).val());
536
			tot ++;
537
		});
538
 
539
		if(tot > 0)	{
540
			var t = (research_tot * 1) - (tot * 1);
541
			$("#research_total").val(t);
542
 
543
			jQuery.ajax({
544
				type: "GET",
545
				url: "/deletefromresearch/[" + seldata + "]?_method=delete",
546
				success: function(msg)	{
547
					jQuery.each(seldata, function(intIndex, objValue){
548
						delete_from_storage_set("resitems", objValue);
549
						$("#myresearch").find("#" + objValue).fadeOut('slow', function() {
550
							$(this).remove();
551
							if(t === 0)	{
552
								$("#research_default").css("display", "block");
553
							}
554
						});
555
					});
4984 varun.gupt 556
 
4922 varun.gupt 557
					//Updating the count
558
					$('#research_compare_count').html($('#myresearch input[type="checkbox"]:checked').length - seldata.length);
4984 varun.gupt 559
 
560
					if ($('#myresearch input[type="checkbox"]').length - seldata.length <= 0)	{
561
						$("#myresearch").children(".common-widget-top-bar").trigger('click');
562
					}
4126 varun.gupt 563
				}
564
			});
565
		} else	{
566
			alert("Please select atleast one product");
567
		}
568
	});
569
 
570
	// No uid cookie
571
	if (!$.cookie("uid"))	{
572
		// No uid in storage
573
		if (!$.Storage.get("uid"))	{
574
			if (!$.Storage.get("resitems"))	{
575
				$.Storage.set("resitems", "[]");
576
			}
577
			if (!$.Storage.get("histitems"))	{
578
				$.Storage.set("histitems", "[]");
579
			}
580
		}
581
		else	{			// uid in storage : logout
582
			$.Storage.remove("uid");
583
			$.Storage.set("resitems", "[]");
584
			$.Storage.set("histitems", "[]");
585
		}
586
		load_research_widget();
587
		load_history_widget();
588
	}
589
	else	{				// With uid cookie
590
		var cookie = $.cookie("uid");
591
		// Just logged in merge storage items
592
		if (!$.Storage.get("uid"))	{
593
			$.Storage.set("uid", cookie);
594
			merge_history_items();
595
			load_research_items();
596
		}
597
		else	{
598
			// UID changed
599
			if ( cookie != $.Storage.get("uid"))	{
600
				$.Storage.set("uid", cookie);
601
				$.Storage.set("resitems", "[]");
602
				$.Storage.set("histitems", "[]");
603
				merge_history_items();
604
				load_research_items();
605
			}
606
			else	{		// Uid is same
607
				if (!$.Storage.get("resitems"))	{
608
					$.Storage.set("resitems", "[]");
609
					load_research_items();
610
				}
611
				else	{
612
					load_research_widget();
613
				}
614
 
615
				if (!$.Storage.get("histitems"))	{
616
					$.Storage.set("histitems", "[]");
617
					merge_history_items();
618
				}
619
				else	{
620
					load_history_widget();
621
				}
622
			}
623
		}
624
	}
4798 varun.gupt 625
 
626
	function load_research_items(){
627
		jQuery.ajax({
628
			type: "GET",
629
			url: "/myresearch",
630
			cache: false,
631
			success: function(json) {
632
			    $.Storage.set("resitems", json);
633
			    load_research_widget();
634
		    }
635
		});
636
	}
637
 
638
	function load_research_widget(){
639
		var myResearchWidgetContainer = $("#myresearch");
640
 
641
		if($(myResearchWidgetContainer).length == 0) {
642
			return;
643
		}
644
		var resitems = $.Storage.get("resitems");
645
 
646
		if (resitems == "[]") {
647
			var emptyResWidgetHtml = '<table border="0" width="100%" cellspacing="1" cellpadding="0" id="research_default">\
648
		      <tbody>\
649
		        <tr><td align="center"><b>Add items to compare list</b></td></tr>\
650
		       </tbody>\
651
		      </table>';
652
			$(myResearchWidgetContainer).find(".common-widget-content-area").html(emptyResWidgetHtml);
653
			$(myResearchWidgetContainer).children(".common-widget-top-bar").trigger('click');
654
			return;
655
		}
656
		var params = "/" + resitems;
657
 
658
		jQuery.ajax({
659
			type : "GET",
660
			url : "/myresearch" + params,
661
			cache: true,
662
			success : function(html) {
663
	   		    $("#myresearch").html(html);
664
	   			updateCompareCount();
665
 
666
			    // Product Title
667
			    $("#myresearch table td div a.truncate").each(function() {
668
						$(this).truncate({addtitle : true});
669
			    });
670
 
671
			    // Product Price
672
			    $("#myresearch table td div div.price").each(function() {
673
						$(this).truncate({addtitle : true});
674
				});
675
 
676
			    // Product Details
677
			    $("#myresearch table td div div.text").each(function() {
678
						$(this).truncate( {addtitle : true});
679
				});
680
		    }
681
		});
682
	}
7846 rajveer 683
});
684
 
7849 rajveer 685
function displayCod(item_id)	{
7846 rajveer 686
	$.colorbox({
7872 rajveer 687
		width: "400px",
688
		height: "200px",
7846 rajveer 689
		inline: true,
7873 rajveer 690
		href: "<ul style='list-style:inside; margin-left: 25px; text-align: justify; margin-right:12px; font-size:15px; line-height: 22px;'>"
7872 rajveer 691
			+ "Expected Delivery Date for "
7873 rajveer 692
			+"<li list-style:inside>Prepaid orders is " + $('#days_' + item_id).html() + "</li>"+
7879 rajveer 693
			"<li list-style:inside>Cash On Delivery orders is " + $('#coddays_' + item_id).html() + "</li>"+
7846 rajveer 694
    "</ul>",
695
    onComplete: function(){
696
	trackEventWithGA('Widget', 'COD Know More is clicked', '');
697
		}
698
	});
699
}